summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS7
-rw-r--r--runtime/autoload/dist/vimindent.vim21
-rw-r--r--runtime/autoload/netrw.vim14
-rw-r--r--runtime/doc/builtin.txt5
-rw-r--r--runtime/doc/indent.txt11
-rw-r--r--runtime/doc/index.txt2
-rw-r--r--runtime/doc/intro.txt8
-rw-r--r--runtime/doc/options.txt6
-rw-r--r--runtime/doc/os_haiku.txt4
-rw-r--r--runtime/doc/popup.txt3
-rw-r--r--runtime/doc/quickref.txt3
-rw-r--r--runtime/doc/repeat.txt5
-rw-r--r--runtime/doc/rileft.txt2
-rw-r--r--runtime/doc/syntax.txt17
-rw-r--r--runtime/doc/tags6
-rw-r--r--runtime/doc/terminal.txt2
-rw-r--r--runtime/doc/textprop.txt5
-rw-r--r--runtime/doc/todo.txt48
-rw-r--r--runtime/doc/userfunc.txt4
-rw-r--r--runtime/doc/usr_41.txt2
-rw-r--r--runtime/doc/usr_52.txt1
-rw-r--r--runtime/doc/various.txt2
-rw-r--r--runtime/filetype.vim2
-rw-r--r--runtime/ftplugin/abaqus.vim43
-rw-r--r--runtime/ftplugin/lua.vim7
-rw-r--r--runtime/ftplugin/markdown.vim36
-rw-r--r--runtime/ftplugin/poefilter.vim13
-rw-r--r--runtime/ftplugin/ssa.vim13
-rw-r--r--runtime/indent/testdir/vim.in18
-rw-r--r--runtime/indent/testdir/vim.ok20
-rw-r--r--runtime/indent/vim.vim4
-rw-r--r--runtime/optwin.vim4
-rw-r--r--runtime/synmenu.vim2
-rw-r--r--runtime/syntax/c.vim2
-rw-r--r--runtime/syntax/markdown.vim89
-rw-r--r--runtime/syntax/poefilter.vim167
-rw-r--r--runtime/syntax/sed.vim105
-rw-r--r--runtime/syntax/ssa.vim63
-rw-r--r--runtime/tutor/tutor.es55
-rw-r--r--runtime/tutor/tutor.es.utf-855
40 files changed, 653 insertions, 223 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index b33c37bff..e840ac2d0 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -171,6 +171,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/perl.vim @petdance @dkearns
runtime/ftplugin/pod.vim @petdance @dkearns
+runtime/ftplugin/poefilter.vim @ObserverOfTime
runtime/ftplugin/postscr.vim @mrdubya
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
@@ -192,6 +193,7 @@ runtime/ftplugin/sdoc.vim @gpanders
runtime/ftplugin/sh.vim @dkearns
runtime/ftplugin/solution.vim @dkearns
runtime/ftplugin/spec.vim @ignatenkobrain
+runtime/ftplugin/ssa.vim @ObserverOfTime
runtime/ftplugin/swayconfig.vim @jamespeapen
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/tap.vim @petdance
@@ -397,6 +399,7 @@ runtime/syntax/perl.vim @petdance
runtime/syntax/php.vim @TysonAndre
runtime/syntax/plsql.vim @lee-lindley
runtime/syntax/pod.vim @petdance
+runtime/syntax/poefilter.vim @ObserverOfTime
runtime/syntax/postscr.vim @mrdubya
runtime/syntax/privoxy.vim @dkearns
runtime/syntax/prolog.vim @XVilka
@@ -424,12 +427,14 @@ runtime/syntax/sass.vim @tpope
runtime/syntax/scala.vim @derekwyatt
runtime/syntax/scss.vim @tpope
runtime/syntax/sdoc.vim @gpanders
+runtime/syntax/sed.vim @dkearns
runtime/syntax/sh.vim @cecamp
runtime/syntax/sm.vim @cecamp
runtime/syntax/spec.vim @ignatenkobrain
-runtime/syntax/srt.vim @ObserverOfTime
runtime/syntax/sqloracle.vim @chrisbra
runtime/syntax/squirrel.vim @zenmatic
+runtime/syntax/srt.vim @ObserverOfTime
+runtime/syntax/ssa.vim @ObserverOfTime
runtime/syntax/sshconfig.vim @Jakuje
runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
diff --git a/runtime/autoload/dist/vimindent.vim b/runtime/autoload/dist/vimindent.vim
index 00977dc3d..24e2c9396 100644
--- a/runtime/autoload/dist/vimindent.vim
+++ b/runtime/autoload/dist/vimindent.vim
@@ -2,7 +2,7 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
-# Last Change: 2022 Sep 24
+# Last Change: 2022 Oct 15
# NOTE: Whenever you change the code, make sure the tests are still passing:
#
@@ -156,7 +156,7 @@ const ASSIGNS_HEREDOC: string = $'^\%({COMMENT}\)\@!.*\%({HEREDOC_OPERATOR}\)\s\
# CD_COMMAND {{{3
-const CD_COMMAND: string = $'[lt]\=cd!\=\s\+-{END_OF_COMMAND}'
+const CD_COMMAND: string = $'\<[lt]\=cd!\=\s\+-{END_OF_COMMAND}'
# HIGHER_ORDER_COMMAND {{{3
@@ -178,7 +178,7 @@ const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%(' .. patt
# MAPPING_COMMAND {{{3
-const MAPPING_COMMAND: string = '\%(\<sil\%[ent]!\=\s\+\)\=[nvxsoilct]\=\%(nore\|un\)map!\=\s'
+const MAPPING_COMMAND: string = '\%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)map!\=\s'
# NORMAL_COMMAND {{{3
@@ -222,7 +222,7 @@ END
const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
.. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
- .. $'\|^\s*elseif\=\s\+\%({OPERATOR}\)\@!'
+ .. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
# STARTS_CURLY_BLOCK {{{3
@@ -354,7 +354,7 @@ const LINE_CONTINUATION_AT_SOL: string = '^\s*\%('
const RANGE_AT_SOL: string = '^\s*:\S'
# }}}1
# Interface {{{1
-export def Expr(lnum: number): number # {{{2
+export def Expr(lnum = v:lnum): number # {{{2
# line which is indented
var line_A: dict<any> = {text: getline(lnum), lnum: lnum}
# line above, on which we'll base the indent of line A
@@ -409,6 +409,7 @@ export def Expr(lnum: number): number # {{{2
line_A->CacheBracketBlock()
endif
if line_A.lnum->IsInside('BracketBlock')
+ var is_in_curly_block: bool = IsInCurlyBlock()
for block: dict<any> in b:vimindent.block_stack
if line_A.lnum <= block.startlnum
continue
@@ -416,8 +417,7 @@ export def Expr(lnum: number): number # {{{2
if !block->has_key('startindent')
block.startindent = Indent(block.startlnum)
endif
- if !block.is_curly_block
- && !b:vimindent.block_stack[0].is_curly_block
+ if !is_in_curly_block
return BracketBlockIndent(line_A, block)
endif
endfor
@@ -520,7 +520,7 @@ enddef
def g:GetVimIndent(): number # {{{2
# for backward compatibility
- return Expr(v:lnum)
+ return Expr()
enddef
# }}}1
# Core {{{1
@@ -997,6 +997,11 @@ def IsRightBelow(lnum: number, syntax: string): bool # {{{3
&& lnum > b:vimindent.endlnum
enddef
+def IsInCurlyBlock(): bool # {{{3
+ return b:vimindent.block_stack
+ ->indexof((_, block: dict<any>): bool => block.is_curly_block) >= 0
+enddef
+
def IsInThisBlock(line_A: dict<any>, lnum: number): bool # {{{3
var pos: list<number> = getcurpos()
cursor(lnum, [lnum, '$']->col())
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 7d1a35c1a..29310aabd 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1791,8 +1791,10 @@ fun! s:NetrwOptionsRestore(vt)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
if !exists("{a:vt}netrw_optionsave")
" call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("<slnum>"))
-" call Decho("..doing filetype detect anyway")
- filetype detect
+ if !isdirectory(expand('%'))
+" call Decho("..doing filetype detect anyway")
+ filetype detect
+ endif
" call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
" call Decho("..ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
" call Dret("s:NetrwOptionsRestore : ".a:vt."netrw_optionsave doesn't exist")
@@ -1904,9 +1906,11 @@ fun! s:NetrwOptionsRestore(vt)
" were having their filetype detect-generated settings overwritten by
" NetrwOptionRestore.
if &ft != "netrw"
-" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
- filetype detect
-" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
+ if !isdirectory(expand('%'))
+" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
+ filetype detect
+" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
+ endif
endif
" call Decho("(s:NetrwOptionsRestore) lines=".&lines)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index c2283358b..d1d18c5c7 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 10
+*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5404,7 +5404,8 @@ listener_add({callback} [, {buf}]) *listener_add()*
the change; one if unknown or the whole line
was affected; this is a byte index, first
character has a value of one.
- When lines are inserted the values are:
+ When lines are inserted (not when a line is split, e.g. by
+ typing CR in Insert mode) the values are:
lnum line above which the new line is added
end equal to "lnum"
added number of lines inserted
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 38c173bce..8cae93ab8 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 9.0. Last change: 2022 May 21
+*indent.txt* For Vim version 9.0. Last change: 2022 Oct 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -982,9 +982,12 @@ indentation: >
PYTHON *ft-python-indent*
-The amount of indent can be set for the following situations. The examples
-given are the defaults. Note that the dictionary values are set to an
-expression, so that you can change the value of 'shiftwidth' later.
+The amount of indent can be set with the `g:python_indent` |Dictionary|, which
+needs to be created before adding the items: >
+ let g:python_indent = {}
+The examples given are the defaults. Note that the dictionary values are set
+to an expression, so that you can change the value of 'shiftwidth' later
+without having to update these values.
Indent after an open paren: >
let g:python_indent.open_paren = 'shiftwidth() * 2'
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 4c0d653c7..9de498b37 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 9.0. Last change: 2022 Jun 11
+*index.txt* For Vim version 9.0. Last change: 2022 Oct 15
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index 7813177c2..5cbaf6733 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -1,4 +1,4 @@
-*intro.txt* For Vim version 9.0. Last change: 2022 Sep 12
+*intro.txt* For Vim version 9.0. Last change: 2022 Oct 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -122,10 +122,10 @@ http://www.vim.org/maillist.php
Bug reports: *bugs* *bug-reports* *bugreport.vim*
There are three ways to report bugs:
-1. Open an issue on GitHub: https://github.com/vim/vim/issues
- The text will be forwarded to the vim-dev maillist.
-2. For issues with runtime files, look in the header for an email address or
+1. For issues with runtime files, look in the header for an email address or
any other way to report it to the maintainer.
+2. Open an issue on GitHub: https://github.com/vim/vim/issues
+ The text will be forwarded to the vim-dev maillist.
3. Send bug reports to: Vim Developers <vim-dev@vim.org>
This is a maillist, you need to become a member first and many people will
see the message. If you don't want that, e.g. because it is a security
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9ecb64e59..5beb6a283 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 9.0. Last change: 2022 Oct 03
+*options.txt* For Vim version 9.0. Last change: 2022 Oct 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7534,7 +7534,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When on, splitting a window will put the new window below the current
one. |:split|
- *'splitkeep'* *'spk'
+ *'splitkeep'* *'spk'*
'splitkeep' 'spk' string (default "cursor")
global
The value of this option determines the scroll behavior when opening,
@@ -7548,7 +7548,7 @@ A jump table for the options with a short description can be found at |Q_op|.
For the "screen" and "topline" values, the cursor position will be
changed when necessary. In this case, the jumplist will be populated
with the previous cursor position. For "screen", the text cannot always
- be kept on the same screen line when 'wrap' is enabled.
+ be kept on the same screen line when 'wrap' is enabled.
*'splitright'* *'spr'* *'nosplitright'* *'nospr'*
'splitright' 'spr' boolean (default off)
diff --git a/runtime/doc/os_haiku.txt b/runtime/doc/os_haiku.txt
index be08b4a31..1a808625f 100644
--- a/runtime/doc/os_haiku.txt
+++ b/runtime/doc/os_haiku.txt
@@ -47,7 +47,7 @@ features you can enable/disable.
Haiku uses "ncurses6" as its terminal library, therefore you need to have
"ncurses6_devel" package installed from HaikuDepot in order to configure
-the Haiku build. Just append "--with-tlib=ncurses6" to ./configure command
+the Haiku build. Just append "--with-tlib=ncurses" to ./configure command.
Now you should use "make" to compile Vim, then "make install" to install it.
For seamless integration into Haiku, the GUI-less vim binary should be
@@ -56,12 +56,14 @@ additionally installed over the GUI version. Typical build commands are:
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
+ --with-tlib=ncurses \
make clean
make install
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
+ --with-tlib=ncurses \
--disable-gui
make clean
make install
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index 59896ecfc..f611fd977 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -1,4 +1,4 @@
-*popup.txt* For Vim version 9.0. Last change: 2022 Jun 16
+*popup.txt* For Vim version 9.0. Last change: 2022 Oct 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -366,7 +366,6 @@ popup_findpreview() *popup_findpreview()*
Get the |window-ID| for the popup preview window.
Return zero if there is none.
-
popup_getoptions({id}) *popup_getoptions()*
Return the {options} for popup {id} in a Dict.
A zero value means the option was not set. For "zindex" the
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index fab98302f..370e1f2fa 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -1,4 +1,4 @@
-*quickref.txt* For Vim version 9.0. Last change: 2022 Oct 02
+*quickref.txt* For Vim version 9.0. Last change: 2022 Oct 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -785,6 +785,7 @@ Short explanation of each option: *option-list*
'lines' number of lines in the display
'linespace' 'lsp' number of pixel lines to use between characters
'lisp' automatic indenting for Lisp
+'lispoptions' 'lop' changes how Lisp indenting is done
'lispwords' 'lw' words that change how lisp indenting works
'list' show <Tab> and <EOL>
'listchars' 'lcs' characters for displaying in list mode
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 059c6393d..0f79afdf4 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -628,6 +628,11 @@ When Vim starts up, after processing your .vimrc, it scans all directories in
directories are added to 'runtimepath'. Then all the plugins are loaded.
See |packload-two-steps| for how these two steps can be useful.
+To allow for calling into package functionality while parsing your .vimrc,
+|:colorscheme| and |autoload| will both automatically search under 'packpath'
+as well in addition to 'runtimepath'. See the documentation for each for
+details.
+
In the example Vim will find "pack/foo/start/foobar/plugin/foo.vim" and adds
"~/.vim/pack/foo/start/foobar" to 'runtimepath'.
diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt
index 31a382b6c..623ac387b 100644
--- a/runtime/doc/rileft.txt
+++ b/runtime/doc/rileft.txt
@@ -1,4 +1,4 @@
-*rileft.txt* For Vim version 9.0. Last change: 2022 Apr 03
+*rileft.txt* For Vim version 9.0. Last change: 2022 Oct 12
VIM REFERENCE MANUAL by Avner Lottem
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 1775af73b..89ac893fe 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.0. Last change: 2022 Oct 03
+*syntax.txt* For Vim version 9.0. Last change: 2022 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3021,16 +3021,25 @@ satisfied with it for my own projects.
SED *sed.vim* *ft-sed-syntax*
To make tabs stand out from regular blanks (accomplished by using Todo
-highlighting on the tabs), define "highlight_sedtabs" by putting >
-
- :let highlight_sedtabs = 1
+highlighting on the tabs), define "g:sed_highlight_tabs" by putting >
+ :let g:sed_highlight_tabs = 1
+<
in the vimrc file. (This special highlighting only applies for tabs
inside search patterns, replacement texts, addresses or text included
by an Append/Change/Insert command.) If you enable this option, it is
also a good idea to set the tab width to one character; by doing that,
you can easily count the number of tabs in a string.
+GNU sed allows comments after text on the same line. BSD sed only allows
+comments where "#" is the first character of the line. To enforce BSD-style
+comments, i.e. mark end-of-line comments as errors, use: >
+
+ :let g:sed_dialect = "bsd"
+<
+Note that there are other differences between GNU sed and BSD sed which are
+not (yet) affected by this setting.
+
Bugs:
The transform command (y) is treated exactly like the substitute
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 639938f6f..7c25a9aa2 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -451,6 +451,7 @@ $quote eval.txt /*$quote*
'lines' options.txt /*'lines'*
'linespace' options.txt /*'linespace'*
'lisp' options.txt /*'lisp'*
+'lispoptions' options.txt /*'lispoptions'*
'lispwords' options.txt /*'lispwords'*
'list' options.txt /*'list'*
'listchars' options.txt /*'listchars'*
@@ -458,6 +459,7 @@ $quote eval.txt /*$quote*
'lmap' options.txt /*'lmap'*
'lnr' options.txt /*'lnr'*
'loadplugins' options.txt /*'loadplugins'*
+'lop' options.txt /*'lop'*
'lpl' options.txt /*'lpl'*
'lrm' options.txt /*'lrm'*
'ls' options.txt /*'ls'*
@@ -954,6 +956,7 @@ $quote eval.txt /*$quote*
'spelloptions' options.txt /*'spelloptions'*
'spellsuggest' options.txt /*'spellsuggest'*
'spf' options.txt /*'spf'*
+'spk' options.txt /*'spk'*
'spl' options.txt /*'spl'*
'splitbelow' options.txt /*'splitbelow'*
'splitkeep' options.txt /*'splitkeep'*
@@ -5547,6 +5550,7 @@ TerminalWinOpen autocmd.txt /*TerminalWinOpen*
TextChanged autocmd.txt /*TextChanged*
TextChangedI autocmd.txt /*TextChangedI*
TextChangedP autocmd.txt /*TextChangedP*
+TextChangedT autocmd.txt /*TextChangedT*
TextYankPost autocmd.txt /*TextYankPost*
Transact-SQL ft_sql.txt /*Transact-SQL*
U undo.txt /*U*
@@ -5574,7 +5578,6 @@ VimResume autocmd.txt /*VimResume*
VimSuspend autocmd.txt /*VimSuspend*
Vimball-copyright pi_vimball.txt /*Vimball-copyright*
Virtual-Replace-mode insert.txt /*Virtual-Replace-mode*
-VisVim if_ole.txt /*VisVim*
Visual visual.txt /*Visual*
Visual-mode visual.txt /*Visual-mode*
W motion.txt /*W*
@@ -9034,6 +9037,7 @@ popup_dialog() popup.txt /*popup_dialog()*
popup_dialog-example popup.txt /*popup_dialog-example*
popup_filter_menu() popup.txt /*popup_filter_menu()*
popup_filter_yesno() popup.txt /*popup_filter_yesno()*
+popup_findecho() popup.txt /*popup_findecho()*
popup_findinfo() popup.txt /*popup_findinfo()*
popup_findpreview() popup.txt /*popup_findpreview()*
popup_getoptions() popup.txt /*popup_getoptions()*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index 4d02558e4..3acc51382 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 9.0. Last change: 2022 Jun 09
+*terminal.txt* For Vim version 9.0. Last change: 2022 Oct 10
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/textprop.txt b/runtime/doc/textprop.txt
index 4aa00acae..2ecf4af2e 100644
--- a/runtime/doc/textprop.txt
+++ b/runtime/doc/textprop.txt
@@ -1,4 +1,4 @@
-*textprop.txt* For Vim version 9.0. Last change: 2022 Sep 21
+*textprop.txt* For Vim version 9.0. Last change: 2022 Oct 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -172,6 +172,9 @@ prop_add({lnum}, {col}, {props})
wrap wrap the text to the next line
truncate truncate the text to make it fit
When omitted "truncate" is used.
+ Note that this applies to the individual text
+ property, the 'wrap' option sets the overall
+ behavior
All fields except "type" are optional.
It is an error when both "length" and "end_lnum" or "end_col"
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 0e125204c..d6562d5a9 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 9.0. Last change: 2022 Oct 03
+*todo.txt* For Vim version 9.0. Last change: 2022 Oct 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -39,22 +39,12 @@ browser use: https://github.com/vim/vim/issues/1234
-------------------- Known bugs and current work -----------------------
'smoothscroll':
+- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
- computing 'scrolloff' position row use w_skipcol
-Add a string to the 'display' option ("smoothscroll" ?) to make CTRL-E and
-CTRL-Y scroll one screen line, also if this means the first line doesn't start
-with the first character (like what happens with a last line that doesn't
-fit). Display "<<<" at the start of the first visible line (like "@@@" is
-displayed in the last line). (Arseny Nasokin, #5154)
-Neovim PR: https://github.com/neovim/neovim/pull/11014
+Check textprop right/above/below with 'number' set and "n" in 'cpo'.
-Use :defer command:
- - Use "D" flag of writefile() and mkdir() in tests.
- (testdir/test_p*.vim done)
-
-Fix for powershell: #11257
-
-Change boolean 'splitscroll' into string 'splitkeep'. #11258
+Don't do anything for ":!". #11372
Further Vim9 improvements, possibly after launch:
@@ -70,7 +60,8 @@ Further Vim9 improvements, possibly after launch:
Popup windows:
- Add a function to redraw a specific popup window. Esp. to be used when
editing the command line, when screen updating doesn't happen. (Shougo)
- #10210 Probably need to update all popup windows (they may overlap)
+ #10210 Example that shows the need on the issue.
+ Probably need to update all popup windows (they may overlap)
If the display is scrolled need to redraw everything later.
- Add a flag to make a popup window focusable?
CTRL-W P cycle over any preview window or focusable popup, end up back in
@@ -174,7 +165,10 @@ Terminal emulator window:
conversions.
Autoconf: must use autoconf 2.69, later version generates lots of warnings
-- try using autoconf 2.71 and fix all "obsolete" warnings
+- try using autoconf 2.71 and fix all "obsolete" warnings #11322
+
+Problem with Visual highlight when 'linebreak' and 'showbreak' are set.
+#11272
Can deref_func_name() and deref_function_name() be merged?
@@ -196,10 +190,17 @@ feature is supported or not. Replaces the xterm mechanism to request each
entry separately. #6609
Multiplexers (screen, tmux) can request it to the underlying terminal, and
pass it on with modifications.
+How to get all the text quickly (also over ssh)? Can we use a side channel?
Using "A" and "o" in manually created fold (in empty buffer) does not behave
consistenly (James McCoy, #10698)
+In a timer callback, when using ":echo" and then input() the message is
+overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
+#11299
+
+Syntax include problem: #11277. Related to Patch 8.2.2761
+
To avoid flicker: add an option that when a screen clear is requested, instead
of clearing it draws everything and uses "clear to end of line" for every line.
Resetting 't_ut' already causes this?
@@ -233,11 +234,10 @@ MS-Windows: did path modifier :p:8 stop working? #8600
Version of getchar() that does not move the cursor - #10603 Use a separate
argument for the new flag.
-Add "lastline" entry to 'fillchars' to specify a character instead of '@'.
-#10963
-
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
+Can we add highlighting to ":echowindow"?
+
Information for a specific terminal (e.g. gnome, tmux, konsole, alacritty) is
spread out. Make a section with copy/paste examples of script and pointers to
more information.
@@ -450,8 +450,6 @@ find them. (Max Kukartsev, #6218)
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
-Sound: support on Mac? Or does libcanberra work there?
-
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
"--cleanFOO" does not result in an error. (#5537)
@@ -601,6 +599,11 @@ negative. (see #4326)
tab page. (Ingo Karkat, #4324)
:call settabwinvar(1, 1, '&cmdheight', 2) also doesn't work well.
+When opening a file, allow for specifying the initial column position:
+ vim +12:5 file.txt line 12 column 5
+ :edit +12:5 file.txt
+Should probably use the column as the character index.
+
This modeline throws unexpected errors: (#4165)
vim: syn=nosyntax
@@ -3074,9 +3077,6 @@ Macintosh:
line is too short. Add a word in 'scrollopt' to allow moving the cursor
to longer line that is visible. A similar thing is done for the GUI when
using the horizontal scrollbar.
-7 VisVim can only open one file. Hard to solve: each opened file is passed
- with a separate invocation, would need to use timestamps to know the
- invocations belong together.
8 When giving a ":bwipeout" command a file-changed dialog may popup for this
buffer, which is pointless. (Mike Williams)
8 On MS-Windows ":make" doesn't show output while it is working. Use the
diff --git a/runtime/doc/userfunc.txt b/runtime/doc/userfunc.txt
index 806d8f76b..46bd0c855 100644
--- a/runtime/doc/userfunc.txt
+++ b/runtime/doc/userfunc.txt
@@ -482,6 +482,10 @@ then define the function like this: >
echo "Done!"
endfunction
+If the file doesn't exist, Vim will also search in 'packpath' (under "start")
+to allow calling packages' functions from your .vimrc when the packages have
+not been added to 'runtimepath' yet (see |packages|).
+
The file name and the name used before the # in the function must match
exactly, and the defined function must have the name exactly as it will be
called. In Vim9 script the "g:" prefix must be used: >
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 97e1d5ce9..1d5c7e58a 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 9.0. Last change: 2022 Jun 23
+*usr_41.txt* For Vim version 9.0. Last change: 2022 Oct 07
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/doc/usr_52.txt b/runtime/doc/usr_52.txt
index 46f01089d..787dd91e6 100644
--- a/runtime/doc/usr_52.txt
+++ b/runtime/doc/usr_52.txt
@@ -159,6 +159,7 @@ relative path: >
This will search for the script "monthlib.vim" in the autoload directories of
'runtimepath'. With Unix one of the directories often is "~/.vim/autoload".
+It will also search under 'packpath', under "start".
The main advantage of this is that this script can be easily shared with other
scripts. You do need to make sure that the script name is unique, since Vim
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 6a6c3b666..6f24515d7 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 9.0. Last change: 2022 Sep 19
+*various.txt* For Vim version 9.0. Last change: 2022 Oct 13
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index d36078223..eb4a5d76b 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2022 Sep 27
+" Last Change: 2022 Oct 12
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim
index 3faeff621..5931cd921 100644
--- a/runtime/ftplugin/abaqus.vim
+++ b/runtime/ftplugin/abaqus.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Abaqus finite element input file (www.abaqus.com)
" Maintainer: Carl Osterwisch <costerwi@gmail.com>
-" Last Change: 2022 Aug 03
+" Last Change: 2022 Oct 08
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -66,25 +66,44 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if !exists("no_plugin_maps") && !exists("no_abaqus_maps")
- " Define keys used to move [count] keywords backward or forward.
- noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR>
- noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR>
+ " Map [[ and ]] keys to move [count] keywords backward or forward
+ nnoremap <silent><buffer> ]] :call <SID>Abaqus_NextKeyword(1)<CR>
+ nnoremap <silent><buffer> [[ :call <SID>Abaqus_NextKeyword(-1)<CR>
+ function! <SID>Abaqus_NextKeyword(direction)
+ .mark '
+ if a:direction < 0
+ let flags = 'b'
+ else
+ let flags = ''
+ endif
+ let l:count = abs(a:direction) * v:count1
+ while l:count > 0 && search("^\\*\\a", flags)
+ let l:count -= 1
+ endwhile
+ endfunction
- " Define key to toggle commenting of the current line or range
+ " Map \\ to toggle commenting of the current line or range
noremap <silent><buffer> <LocalLeader><LocalLeader>
\ :call <SID>Abaqus_ToggleComment()<CR>j
function! <SID>Abaqus_ToggleComment() range
- if strpart(getline(a:firstline), 0, 2) == "**"
- " Un-comment all lines in range
- silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
- else
- " Comment all lines in range
- silent execute a:firstline . ',' . a:lastline . 's/^/**/'
- endif
+ if strpart(getline(a:firstline), 0, 2) == "**"
+ " Un-comment all lines in range
+ silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
+ else
+ " Comment all lines in range
+ silent execute a:firstline . ',' . a:lastline . 's/^/**/'
+ endif
+ endfunction
+
+ " Map \s to swap first two comma separated fields
+ noremap <silent><buffer> <LocalLeader>s :call <SID>Abaqus_Swap()<CR>
+ function! <SID>Abaqus_Swap() range
+ silent execute a:firstline . ',' . a:lastline . 's/\([^*,]*\),\([^,]*\)/\2,\1/'
endfunction
let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]"
\ . "|unmap <buffer> <LocalLeader><LocalLeader>"
+ \ . "|unmap <buffer> <LocalLeader>s"
endif
" Undo must be done in nocompatible mode for <LocalLeader>.
diff --git a/runtime/ftplugin/lua.vim b/runtime/ftplugin/lua.vim
index aaa61f71d..c28b8aecf 100644
--- a/runtime/ftplugin/lua.vim
+++ b/runtime/ftplugin/lua.vim
@@ -3,7 +3,8 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Max Ischenko <mfi@ukr.net>
" Contributor: Dorai Sitaram <ds26@gte.com>
-" Last Change: 2022 Sep 05
+" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
+" Last Change: 2022 Oct 15
if exists("b:did_ftplugin")
finish
@@ -19,9 +20,11 @@ setlocal formatoptions-=t formatoptions+=croql
let &l:define = '\<function\|\<local\%(\s\+function\)\='
+" TODO: handle init.lua
+setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal suffixesadd=.lua
-let b:undo_ftplugin = "setlocal cms< com< def< fo< sua<"
+let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
diff --git a/runtime/ftplugin/markdown.vim b/runtime/ftplugin/markdown.vim
index fc1d9e068..2b963f139 100644
--- a/runtime/ftplugin/markdown.vim
+++ b/runtime/ftplugin/markdown.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
-" Language: Markdown
-" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2019 Dec 05
+" Language: Markdown
+" Maintainer: Tim Pope <https://github.com/tpope/vim-markdown>
+" Last Change: 2022 Oct 13
if exists("b:did_ftplugin")
finish
@@ -9,18 +9,33 @@ endif
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
+let s:keepcpo= &cpo
+set cpo&vim
+
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=<!--%s-->
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
-setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:
+setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
if exists('b:undo_ftplugin')
- let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
+ let b:undo_ftplugin .= "|setl cms< com< fo< flp< et< ts< sts< sw<"
else
- let b:undo_ftplugin = "setl cms< com< fo< flp<"
+ let b:undo_ftplugin = "setl cms< com< fo< flp< et< ts< sts< sw<"
+endif
+
+if get(g:, 'markdown_recommended_style', 1)
+ setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
+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
function! s:NotCodeBlock(lnum) abort
- return synIDattr(synID(v:lnum, 1, 1), 'name') !=# 'markdownCode'
+ return synIDattr(synID(a:lnum, 1, 1), 'name') !=# 'markdownCode'
endfunction
function! MarkdownFold() abort
@@ -64,11 +79,14 @@ function! MarkdownFoldText() abort
return hash_indent.' '.title.' '.linecount
endfunction
-if has("folding") && exists("g:markdown_folding")
+if has("folding") && get(g:, "markdown_folding", 0)
setlocal foldexpr=MarkdownFold()
setlocal foldmethod=expr
setlocal foldtext=MarkdownFoldText()
- let b:undo_ftplugin .= " foldexpr< foldmethod< foldtext<"
+ let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
endif
+let &cpo = s:keepcpo
+unlet s:keepcpo
+
" vim:set sw=2:
diff --git a/runtime/ftplugin/poefilter.vim b/runtime/ftplugin/poefilter.vim
new file mode 100644
index 000000000..92c2def63
--- /dev/null
+++ b/runtime/ftplugin/poefilter.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: PoE item filter
+" Maintainer: ObserverOfTime <chronobserver@disroot.org>
+" Last Change: 2022 Oct 07
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/ssa.vim b/runtime/ftplugin/ssa.vim
new file mode 100644
index 000000000..04cc7a9bd
--- /dev/null
+++ b/runtime/ftplugin/ssa.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: SubStation Alpha
+" Maintainer: ObserverOfTime <chronobserver@disroot.org>
+" Last Change: 2022 Oct 10
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=:;,:!: commentstring=;\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/indent/testdir/vim.in b/runtime/indent/testdir/vim.in
index 87c044a9b..55acf6fde 100644
--- a/runtime/indent/testdir/vim.in
+++ b/runtime/indent/testdir/vim.in
@@ -869,3 +869,21 @@ echo
})
enddef
" END_INDENT
+
+" START_INDENT
+echo {
+k: () => {
+if true
+echo
+popup_setoptions(id,
+{title: 'title'})
+endif
+}
+}
+" END_INDENT
+
+" START_INDENT
+if true
+elseif
+endif
+" END_INDENT
diff --git a/runtime/indent/testdir/vim.ok b/runtime/indent/testdir/vim.ok
index 2326934f9..c6ba08430 100644
--- a/runtime/indent/testdir/vim.ok
+++ b/runtime/indent/testdir/vim.ok
@@ -849,7 +849,7 @@ endfor
echo []
+ []
+ [{a: 1,
- b: 2}]
+ b: 2}]
}
" END_INDENT
@@ -869,3 +869,21 @@ def Foo()
})
enddef
" END_INDENT
+
+" START_INDENT
+echo {
+ k: () => {
+ if true
+ echo
+ popup_setoptions(id,
+ {title: 'title'})
+ endif
+ }
+}
+" END_INDENT
+
+" START_INDENT
+if true
+elseif
+endif
+" END_INDENT
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index 2f59dfc86..2cb32372d 100644
--- a/runtime/indent/vim.vim
+++ b/runtime/indent/vim.vim
@@ -3,7 +3,7 @@ vim9script
# Vim indent file
# Language: Vim script
# Maintainer: Bram Moolenaar <Bram@vim.org>
-# Last Change: 2022 Sep 27
+# Last Change: 2022 Oct 5
# Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -15,7 +15,7 @@ b:undo_indent = 'setlocal indentkeys< indentexpr<'
import autoload '../autoload/dist/vimindent.vim'
-setlocal indentexpr=vimindent.Expr(v:lnum)
+setlocal indentexpr=vimindent.Expr()
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=},=else,=cat,=finall,=END,0\\
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
setlocal indentkeys-=0#
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 0649a1e76..360cde5ab 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2022 Oct 02
+" Last Change: 2022 Oct 15
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@@ -956,6 +956,8 @@ if has("lispindent")
call <SID>BinOptionL("lisp")
call <SID>AddOption("lispwords", gettext("words that change how lisp indenting works"))
call <SID>OptionL("lw")
+ call <SID>AddOption("lispoptions", gettext("options for Lisp indenting"))
+ call <SID>OptionL("lop")
endif
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 947b16cdc..9d7da7dee 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -2,7 +2,7 @@
" This file is normally sourced from menu.vim.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2022 Feb 04
+" Last Change: 2022 Oct 04
" Define the SetSyn function, used for the Syntax menu entries.
" Set 'filetype' and also 'syntax' if it is manually selected.
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 890e9ae1a..50878a78e 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2022 Apr 24
+" Last Change: 2022 Oct 05
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/markdown.vim b/runtime/syntax/markdown.vim
index 17b61c2fa..44187ff18 100644
--- a/runtime/syntax/markdown.vim
+++ b/runtime/syntax/markdown.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Markdown
-" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Maintainer: Tim Pope <https://github.com/tpope/vim-markdown>
" Filenames: *.markdown
-" Last Change: 2020 Jan 14
+" Last Change: 2022 Oct 13
if exists("b:current_syntax")
finish
@@ -12,6 +12,12 @@ if !exists('main_syntax')
let main_syntax = 'markdown'
endif
+if has('folding')
+ let s:foldmethod = &l:foldmethod
+ let s:foldtext = &l:foldtext
+endif
+let s:iskeyword = &l:iskeyword
+
runtime! syntax/html.vim
unlet! b:current_syntax
@@ -26,17 +32,33 @@ for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
if s:type =~ '\.'
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
endif
- exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
+ syn case match
+ exe 'syn include @markdownHighlight_'.tr(s:type,'.','_').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
unlet! b:current_syntax
let s:done_include[matchstr(s:type,'[^.]*')] = 1
endfor
unlet! s:type
unlet! s:done_include
+syn spell toplevel
+if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod
+ let &l:foldmethod = s:foldmethod
+ unlet s:foldmethod
+endif
+if exists('s:foldtext') && s:foldtext !=# &l:foldtext
+ let &l:foldtext = s:foldtext
+ unlet s:foldtext
+endif
+if s:iskeyword !=# &l:iskeyword
+ let &l:iskeyword = s:iskeyword
+endif
+unlet s:iskeyword
+
if !exists('g:markdown_minlines')
let g:markdown_minlines = 50
endif
execute 'syn sync minlines=' . g:markdown_minlines
+syn sync linebreaks=1
syn case ignore
syn match markdownValid '[<>]\c[a-z/$!]\@!' transparent contains=NONE
@@ -52,16 +74,16 @@ syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHea
syn match markdownHeadingRule "^[=-]\+$" contained
-syn region markdownH1 matchgroup=markdownH1Delimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
-syn region markdownH2 matchgroup=markdownH2Delimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
-syn region markdownH3 matchgroup=markdownH3Delimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
-syn region markdownH4 matchgroup=markdownH4Delimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
-syn region markdownH5 matchgroup=markdownH5Delimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
-syn region markdownH6 matchgroup=markdownH6Delimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
+syn region markdownH1 matchgroup=markdownH1Delimiter start=" \{,3}#\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
+syn region markdownH2 matchgroup=markdownH2Delimiter start=" \{,3}##\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
+syn region markdownH3 matchgroup=markdownH3Delimiter start=" \{,3}###\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
+syn region markdownH4 matchgroup=markdownH4Delimiter start=" \{,3}####\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
+syn region markdownH5 matchgroup=markdownH5Delimiter start=" \{,3}#####\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
+syn region markdownH6 matchgroup=markdownH6Delimiter start=" \{,3}######\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn match markdownBlockquote ">\%(\s\|$\)" contained nextgroup=@markdownBlock
-syn region markdownCodeBlock start=" \|\t" end="$" contained
+syn region markdownCodeBlock start="^\n\( \{4,}\|\t\)" end="^\ze \{,3}\S.*$" keepend
" TODO: real nesting
syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained
@@ -79,7 +101,7 @@ syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained
-syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart
+syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^][]*\%(\[\_[^][]*\]\_[^][]*\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
@@ -88,31 +110,38 @@ let s:concealends = ''
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
let s:concealends = ' concealends'
endif
-exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
-exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\w\@<!_\S\@=" end="\S\@<=_\w\@!" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
-exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" skip="\\\*" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
-exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\w\@<!__\S\@=" end="\S\@<=__\w\@!" skip="\\_" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
-exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
-exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\w\@<!___\S\@=" end="\S\@<=___\w\@!" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
+exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\*\S\@=" end="\S\@<=\*\|^$" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
+exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\w\@<!_\S\@=" end="\S\@<=_\w\@!\|^$" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
+exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\*\*\S\@=" end="\S\@<=\*\*\|^$" skip="\\\*" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
+exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\w\@<!__\S\@=" end="\S\@<=__\w\@!\|^$" skip="\\_" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
+exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\*\*\*\S\@=" end="\S\@<=\*\*\*\|^$" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
+exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\w\@<!___\S\@=" end="\S\@<=___\w\@!\|^$" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
+exe 'syn region markdownStrike matchgroup=markdownStrikeDelimiter start="\~\~\S\@=" end="\S\@<=\~\~\|^$" contains=markdownLineStart,@Spell' . s:concealends
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart
-syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*````*.*$" end="^\s*````*\ze\s*$" keepend
+syn region markdownCodeBlock matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\).*$" end="^\s*\z1\ze\s*$" keepend
+syn region markdownCodeBlock matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\).*$" end="^\s*\z1\ze\s*$" keepend
syn match markdownFootnote "\[^[^\]]\+\]"
syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:"
-if main_syntax ==# 'markdown'
- let s:done_include = {}
- for s:type in g:markdown_fenced_languages
- if has_key(s:done_include, matchstr(s:type,'[^.]*'))
- continue
- endif
- exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*````*\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*````*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') . s:concealends
- let s:done_include[matchstr(s:type,'[^.]*')] = 1
- endfor
- unlet! s:type
- unlet! s:done_include
+let s:done_include = {}
+for s:type in g:markdown_fenced_languages
+ if has_key(s:done_include, matchstr(s:type,'[^.]*'))
+ continue
+ endif
+ exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
+ exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
+ let s:done_include[matchstr(s:type,'[^.]*')] = 1
+endfor
+unlet! s:type
+unlet! s:done_include
+
+if get(b:, 'markdown_yaml_head', get(g:, 'markdown_yaml_head', main_syntax ==# 'markdown'))
+ syn include @markdownYamlTop syntax/yaml.vim
+ unlet! b:current_syntax
+ syn region markdownYamlHead start="\%^---$" end="^\%(---\|\.\.\.\)\s*$" keepend contains=@markdownYamlTop,@Spell
endif
syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]"
@@ -156,6 +185,8 @@ hi def link markdownBold htmlBold
hi def link markdownBoldDelimiter markdownBold
hi def link markdownBoldItalic htmlBoldItalic
hi def link markdownBoldItalicDelimiter markdownBoldItalic
+hi def link markdownStrike htmlStrike
+hi def link markdownStrikeDelimiter markdownStrike
hi def link markdownCodeDelimiter Delimiter
hi def link markdownEscape Special
diff --git a/runtime/syntax/poefilter.vim b/runtime/syntax/poefilter.vim
new file mode 100644
index 000000000..f7e92034e
--- /dev/null
+++ b/runtime/syntax/poefilter.vim
@@ -0,0 +1,167 @@
+" Vim syntax file
+" Language: PoE item filter
+" Maintainer: ObserverOfTime <chronobserver@disroot.org>
+" Filenames: *.filter
+" Last Change: 2022 Oct 07
+
+if exists('b:current_syntax')
+ finish
+endif
+
+let s:cpo_save = &cpoptions
+set cpoptions&vim
+
+" Comment
+syn keyword poefilterTodo TODO NOTE XXX contained
+syn match poefilterCommentTag /\[[0-9A-Z\[\]]\+\]/ contained
+syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell
+
+" Blocks
+syn keyword poefilterBlock Show Hide
+
+" Conditions
+syn keyword poefilterCondition
+ \ AlternateQuality
+ \ AnyEnchantment
+ \ BlightedMap
+ \ Corrupted
+ \ ElderItem
+ \ ElderMap
+ \ FracturedItem
+ \ Identified
+ \ Mirrored
+ \ Replica
+ \ Scourged
+ \ ShapedMap
+ \ ShaperItem
+ \ SynthesisedItem
+ \ UberBlightedMap
+ \ skipwhite nextgroup=poefilterBoolean
+syn keyword poefilterCondition
+ \ ArchnemesisMod
+ \ BaseType
+ \ Class
+ \ EnchantmentPassiveNode
+ \ HasEnchantment
+ \ HasExplicitMod
+ \ ItemLevel
+ \ SocketGroup
+ \ Sockets
+ \ skipwhite nextgroup=poefilterOperator,poefilterString
+syn keyword poefilterCondition
+ \ AreaLevel
+ \ BaseArmour
+ \ BaseDefencePercentile
+ \ BaseEnergyShield
+ \ BaseEvasion
+ \ BaseWard
+ \ CorruptedMods
+ \ DropLevel
+ \ EnchantmentPassiveNum
+ \ GemLevel
+ \ HasEaterOfWorldsImplicit
+ \ HasSearingExarchImplicit
+ \ Height
+ \ LinkedSockets
+ \ MapTier
+ \ Quality
+ \ StackSize
+ \ Width
+ \ skipwhite nextgroup=poefilterOperator,poefilterNumber
+syn keyword poefilterCondition
+ \ GemQualityType
+ \ skipwhite nextgroup=poefilterString,poefilterQuality
+syn keyword poefilterCondition
+ \ HasInfluence
+ \ skipwhite nextgroup=poefilterString,poefilterInfluence
+syn keyword poefilterCondition
+ \ Rarity
+ \ skipwhite nextgroup=poefilterString,poefilterRarity
+
+" Actions
+syn keyword poefilterAction
+ \ PlayAlertSound
+ \ PlayAlertSoundPositional
+ \ skipwhite nextgroup=poefilterNumber,poefilterDisable
+syn keyword poefilterAction
+ \ CustomAlertSound
+ \ CustomAlertSoundOptional
+ \ skipwhite nextgroup=poefilterString
+syn keyword poefilterAction
+ \ DisableDropSound
+ \ EnableDropSound
+ \ DisableDropSoundIfAlertSound
+ \ EnableDropSoundIfAlertSound
+ \ skipwhite nextgroup=poefilterBoolean
+syn keyword poefilterAction
+ \ MinimapIcon
+ \ SetBackgroundColor
+ \ SetBorderColor
+ \ SetFontSize
+ \ SetTextColor
+ \ skipwhite nextgroup=poefilterNumber
+syn keyword poefilterAction
+ \ PlayEffect
+ \ skipwhite nextgroup=poefilterColour
+
+" Operators
+syn match poefilterOperator /!\|[<>=]=\?/ contained
+ \ skipwhite nextgroup=poefilterString,poefilterNumber,
+ \ poefilterQuality,poefilterRarity,poefilterInfluence
+
+" Arguments
+syn match poefilterString /[-a-zA-Z0-9:,']/ contained contains=@Spell
+ \ skipwhite nextgroup=poefilterString,poefilterNumber,
+ \ poefilterQuality,poefilterRarity,poefilterInfluence
+syn region poefilterString matchgroup=poefilterQuote keepend
+ \ start=/"/ end=/"/ concealends contained contains=@Spell
+ \ skipwhite nextgroup=poefilterString,poefilterNumber,
+ \ poefilterQuality,poefilterRarity,poefilterInfluence
+syn match poefilterNumber /-1\|0\|[1-9][0-9]*/ contained
+ \ skipwhite nextgroup=poefilterString,poefilterNumber,
+ \ poefilterQuality,poefilterRarity,poefilterInfluence,poefilterColour
+syn keyword poefilterBoolean True False contained
+
+" Special arguments (conditions)
+syn keyword poefilterQuality Superior Divergent Anomalous Phantasmal
+ \ contained skipwhite nextgroup=poefilterString,poefilterQuality
+syn keyword poefilterRarity Normal Magic Rare Unique
+ \ contained skipwhite nextgroup=poefilterString,poefilterRarity
+syn keyword poefilterInfluence Shaper Elder
+ \ Crusader Hunter Redeemer Warlord None
+ \ contained skipwhite nextgroup=poefilterString,poefilterInfluence
+
+" Special arguments (actions)
+syn keyword poefilterColour Red Green Blue Brown
+ \ White Yellow Cyan Grey Orange Pink Purple
+ \ contained skipwhite nextgroup=poefilterShape,poefilterTemp
+syn keyword poefilterShape Circle Diamond Hecagon Square Star Triangle
+ \ Cross Moon Raindrop Kite Pentagon UpsideDownHouse contained
+syn keyword poefilterDisable None contained
+syn keyword poefilterTemp Temp contained
+
+" Colours
+
+hi def link poefilterAction Statement
+hi def link poefilterBlock Structure
+hi def link poefilterBoolean Boolean
+hi def link poefilterColour Special
+hi def link poefilterComment Comment
+hi def link poefilterCommentTag SpecialComment
+hi def link poefilterCondition Conditional
+hi def link poefilterDisable Constant
+hi def link poefilterInfluence Special
+hi def link poefilterNumber Number
+hi def link poefilterOperator Operator
+hi def link poefilterQuality Special
+hi def link poefilterQuote Delimiter
+hi def link poefilterRarity Special
+hi def link poefilterShape Special
+hi def link poefilterString String
+hi def link poefilterTemp StorageClass
+hi def link poefilterTodo Todo
+
+let b:current_syntax = 'poefilter'
+
+let &cpoptions = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/syntax/sed.vim b/runtime/syntax/sed.vim
index 63b39db81..d1f631df4 100644
--- a/runtime/syntax/sed.vim
+++ b/runtime/syntax/sed.vim
@@ -1,30 +1,42 @@
" Vim syntax file
-" Language: sed
-" Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
-" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim
-" Last Change: 2010 May 29
+" Language: sed
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
+" Contributor: Jack Haden-Enneking
+" Last Change: 2022 Oct 15
" quit when a syntax file was already loaded
if exists("b:current_syntax")
- finish
+ finish
endif
+syn keyword sedTodo contained TODO FIXME XXX
+
syn match sedError "\S"
syn match sedWhitespace "\s\+" contained
syn match sedSemicolon ";"
syn match sedAddress "[[:digit:]$]"
syn match sedAddress "\d\+\~\d\+"
-syn region sedAddress matchgroup=Special start="[{,;]\s*/\(\\/\)\="lc=1 skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
-syn region sedAddress matchgroup=Special start="^\s*/\(\\/\)\=" skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
-syn match sedComment "^\s*#.*$"
-syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace
+syn region sedAddress matchgroup=Special start="[{,;]\s*/\%(\\/\)\="lc=1 skip="[^\\]\%(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
+syn region sedAddress matchgroup=Special start="^\s*/\%(\\/\)\=" skip="[^\\]\%(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
+syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\%($\|;\)" contains=sedSemicolon,sedWhitespace
+if exists("g:sed_dialect") && g:sed_dialect ==? "bsd"
+ syn match sedComment "^\s*#.*$" contains=sedTodo
+else
+ syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\ze#" contains=sedSemicolon,sedWhitespace
+ syn match sedComment "#.*$" contains=sedTodo
+endif
syn match sedLabel ":[^;]*"
-syn match sedLineCont "^\(\\\\\)*\\$" contained
-syn match sedLineCont "[^\\]\(\\\\\)*\\$"ms=e contained
+syn match sedLineCont "^\%(\\\\\)*\\$" contained
+syn match sedLineCont "[^\\]\%(\\\\\)*\\$"ms=e contained
syn match sedSpecial "[{},!]"
-if exists("highlight_sedtabs")
- syn match sedTab "\t" contained
+
+" continue to silently support the old name
+let s:highlight_tabs = v:false
+if exists("g:highlight_sedtabs") || get(g:, "sed_highlight_tabs", 0)
+ let s:highlight_tabs = v:true
+ syn match sedTab "\t" contained
endif
" Append/Change/Insert
@@ -34,39 +46,39 @@ syn region sedBranch matchgroup=sedFunction start="[bt]" matchgroup=sedSemicolon
syn region sedRW matchgroup=sedFunction start="[rw]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace
" Substitution/transform with various delimiters
-syn region sedFlagwrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained
-syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagwrite contained
+syn region sedFlagWrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained
+syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagWrite contained
syn match sedRegexpMeta "[.*^$]" contained
syn match sedRegexpMeta "\\." contains=sedTab contained
syn match sedRegexpMeta "\[.\{-}\]" contains=sedTab contained
syn match sedRegexpMeta "\\{\d\*,\d*\\}" contained
-syn match sedRegexpMeta "\\(.\{-}\\)" contains=sedTab contained
-syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained
+syn match sedRegexpMeta "\\%(.\{-}\\)" contains=sedTab contained
+syn match sedReplaceMeta "&\|\\\%($\|.\)" contains=sedTab contained
" Metacharacters: $ * . \ ^ [ ~
" @ is used as delimiter and treated on its own below
-let __at = char2nr("@")
-let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
+let s:at = char2nr("@")
+let s:i = char2nr(" ") " ASCII: 32, EBCDIC: 64
if has("ebcdic")
- let __sed_last = 255
+ let s:last = 255
else
- let __sed_last = 126
+ let s:last = 126
endif
-let __sed_metacharacters = '$*.\^[~'
-while __sed_i <= __sed_last
- let __sed_delimiter = escape(nr2char(__sed_i), __sed_metacharacters)
- if __sed_i != __at
- exe 'syn region sedAddress matchgroup=Special start=@\\'.__sed_delimiter.'\(\\'.__sed_delimiter.'\)\=@ skip=@[^\\]\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'I\=@ contains=sedTab'
- exe 'syn region sedRegexp'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.__sed_i
- exe 'syn region sedReplacement'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag'
- endif
- let __sed_i = __sed_i + 1
+let s:metacharacters = '$*.\^[~'
+while s:i <= s:last
+ let s:delimiter = escape(nr2char(s:i), s:metacharacters)
+ if s:i != s:at
+ exe 'syn region sedAddress matchgroup=Special start=@\\'.s:delimiter.'\%(\\'.s:delimiter.'\)\=@ skip=@[^\\]\%(\\\\\)*\\'.s:delimiter.'@ end=@'.s:delimiter.'[IM]\=@ contains=sedTab'
+ exe 'syn region sedRegexp'.s:i 'matchgroup=Special start=@'.s:delimiter.'\%(\\\\\|\\'.s:delimiter.'\)*@ skip=@[^\\'.s:delimiter.']\%(\\\\\)*\\'.s:delimiter.'@ end=@'.s:delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.s:i
+ exe 'syn region sedReplacement'.s:i 'matchgroup=Special start=@'.s:delimiter.'\%(\\\\\|\\'.s:delimiter.'\)*@ skip=@[^\\'.s:delimiter.']\%(\\\\\)*\\'.s:delimiter.'@ end=@'.s:delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=@sedFlags'
+ endif
+ let s:i = s:i + 1
endwhile
-syn region sedAddress matchgroup=Special start=+\\@\(\\@\)\=+ skip=+[^\\]\(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta
-syn region sedRegexp64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64
-syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag
+syn region sedAddress matchgroup=Special start=+\\@\%(\\@\)\=+ skip=+[^\\]\%(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta
+syn region sedRegexp64 matchgroup=Special start=+@\%(\\\\\|\\@\)*+ skip=+[^\\@]\%(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64
+syn region sedReplacement64 matchgroup=Special start=+@\%(\\\\\|\\@\)*+ skip=+[^\\@]\%(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag
-" Since the syntax for the substituion command is very similar to the
+" Since the syntax for the substitution command is very similar to the
" syntax for the transform command, I use the same pattern matching
" for both commands. There is one problem -- the transform command
" (y) does not allow any flags. To save memory, I ignore this problem.
@@ -80,7 +92,7 @@ hi def link sedComment Comment
hi def link sedDelete Function
hi def link sedError Error
hi def link sedFlag Type
-hi def link sedFlagwrite Constant
+hi def link sedFlagWrite Constant
hi def link sedFunction Function
hi def link sedLabel Label
hi def link sedLineCont Special
@@ -88,23 +100,24 @@ hi def link sedPutHoldspc Function
hi def link sedReplaceMeta Special
hi def link sedRegexpMeta Special
hi def link sedRW Constant
-hi def link sedSemicolon Special
+hi def link sedSemicolon Special
hi def link sedST Function
hi def link sedSpecial Special
+hi def link sedTodo Todo
hi def link sedWhitespace NONE
-if exists("highlight_sedtabs")
-hi def link sedTab Todo
+if s:highlight_tabs
+ hi def link sedTab Todo
endif
-let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
-while __sed_i <= __sed_last
-exe "hi def link sedRegexp".__sed_i "Macro"
-exe "hi def link sedReplacement".__sed_i "NONE"
-let __sed_i = __sed_i + 1
+let s:i = char2nr(" ") " ASCII: 32, EBCDIC: 64
+while s:i <= s:last
+ exe "hi def link sedRegexp".s:i "Macro"
+ exe "hi def link sedReplacement".s:i "NONE"
+ let s:i = s:i + 1
endwhile
-
-unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters
+unlet s:i s:last s:delimiter s:metacharacters s:at
+unlet s:highlight_tabs
let b:current_syntax = "sed"
-" vim: sts=4 sw=4 ts=8
+" vim: nowrap sw=2 sts=2 ts=8 noet:
diff --git a/runtime/syntax/ssa.vim b/runtime/syntax/ssa.vim
new file mode 100644
index 000000000..a5dbf37c3
--- /dev/null
+++ b/runtime/syntax/ssa.vim
@@ -0,0 +1,63 @@
+" Vim syntax file
+" Language: SubStation Alpha
+" Maintainer: ObserverOfTime <chronobserver@disroot.org>
+" Filenames: *.ass,*.ssa
+" Last Change: 2022 Oct 10
+
+if exists('b:current_syntax')
+ finish
+endif
+
+" Comments
+syn keyword ssaTodo TODO FIXME NOTE XXX contained
+syn match ssaComment /^\(;\|!:\).*$/ contains=ssaTodo,@Spell
+syn match ssaTextComment /{[^}]*}/ contained contains=@Spell
+
+" Sections
+syn match ssaSection /^\[[a-zA-Z0-9+ ]\+\]$/
+
+" Headers
+syn match ssaHeader /^[^;!:]\+:/ skipwhite nextgroup=ssaField
+
+" Fields
+syn match ssaField /[^,]*/ contained skipwhite nextgroup=ssaDelimiter
+
+" Time
+syn match ssaTime /\d:\d\d:\d\d\.\d\d/ contained skipwhite nextgroup=ssaDelimiter
+
+" Delimiter
+syn match ssaDelimiter /,/ contained skipwhite nextgroup=ssaField,ssaTime,ssaText
+
+" Text
+syn match ssaText /\(^Dialogue:\(.*,\)\{9}\)\@<=.*$/ contained contains=@ssaTags,@Spell
+syn cluster ssaTags contains=ssaOverrideTag,ssaEscapeChar,ssaTextComment,ssaItalics,ssaBold,ssaUnderline,ssaStrikeout
+
+" Override tags
+syn match ssaOverrideTag /{\\[^}]\+}/ contained contains=@NoSpell
+
+" Special characters
+syn match ssaEscapeChar /\\[nNh{}]/ contained contains=@NoSpell
+
+" Markup
+syn region ssaItalics start=/{\\i1}/ end=/{\\i0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
+syn region ssaBold start=/{\\b1}/ end=/{\\b0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
+syn region ssaUnderline start=/{\\u1}/ end=/{\\u0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
+syn region ssaStrikeout start=/{\\s1}/ end=/{\\s0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
+
+hi def link ssaDelimiter Delimiter
+hi def link ssaComment Comment
+hi def link ssaEscapeChar SpecialChar
+hi def link ssaField String
+hi def link ssaHeader Label
+hi def link ssaSection StorageClass
+hi def link ssaOverrideTag Special
+hi def link ssaTextComment Comment
+hi def link ssaTime Number
+hi def link ssaTodo Todo
+
+hi ssaBold cterm=bold gui=bold
+hi ssaItalics cterm=italic gui=italic
+hi ssaStrikeout cterm=strikethrough gui=strikethrough
+hi ssaUnderline cterm=underline gui=underline
+
+let b:current_syntax = 'srt'
diff --git a/runtime/tutor/tutor.es b/runtime/tutor/tutor.es
index 7619fbc49..ed9397c02 100644
--- a/runtime/tutor/tutor.es
+++ b/runtime/tutor/tutor.es
@@ -91,7 +91,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Lección 1.4: EDITAR TEXTO - BORRAR
+ Lección 1.4: EDITAR TEXTO - INSERTAR
** Pulse i para insertar texto. **
@@ -248,9 +248,12 @@ Ahora continúe con la Lección 2.
Una lista resumida de movimientos:
w - hasta el comienzo de la siguiente palabra, EXCLUYENDO su primer
carácter.
- e - hasta el final de la palabra actual, INCLUYENDO su primer carácter.
+ e - hasta el final de la palabra actual, INCLUYENDO el último carácter.
$ - hasta el final de la línea, INCLUYENDO el último carácter.
+ Por tanto, al escribir de borrará desde la posición del cursor, hasta
+ el final de la palabra.
+
NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
operador, moverá el cursor como se especifica en la lista anterior.
@@ -262,7 +265,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
1. Mueva el cursor al comienzo de la línea marcada con --->.
- 2. Escriba 2w para mover el cursor dos palabras hacia adelante.
+ 2. Escriba 2w para mover el cursor dos palabras hacia adelante.
3. Escriba 3e para mover el cursor al final de la tercera palabra hacia
adelante.
@@ -271,7 +274,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
5. Repita el paso 2 y 3 con diferentes números.
----> Esto es solo una línea con palabra donde poder moverse.
+---> Esto es solo una línea con palabras donde poder moverse.
6. Pase a la lección 2.5.
@@ -288,15 +291,15 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
anteriormente, añada un contador antes del movimiento para eliminar más:
d número movimiento
- 1. Mueva el cursos a la primera palabra en MAYÚSCULAS en la línea
- marcada con --->.
+ 1. Mueva el cursor al inicio de la primera palabra en MAYÚSCULAS en la
+ línea marcada con --->.
2. Escriba d2w para eliminar las dos palabras en MAYÚSCULAS.
3. Repita los pasos 1 y 2 con diferentes contadores para eliminar
las siguientes palabras en MAYÚSCULAS con un comando.
----> esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
+---> Esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
@@ -319,7 +322,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
---> 1) Las rosas son rojas,
---> 2) El barro es divertido,
----> 3) Las violetas son azules,
+---> 3) La violeta es azul,
---> 4) Tengo un coche,
---> 5) Los relojes dan la hora,
---> 6) El azúcar es dulce
@@ -362,7 +365,7 @@ mencionados anteriormente.
3. Para borrar desde el cursor hasta el final de una línea pulse: d$
4. Para borrar una línea entera pulse: dd
- 5. Para repetir un movimiento precédalo con un número: 2w
+ 5. Para repetir un movimiento anteponga un número: 2w
6. El formato para un comando de cambio es:
operador [número] movimiento
donde:
@@ -394,7 +397,7 @@ mencionados anteriormente.
5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto.
---> d) ¿Puedes aprenderla tú?
----> b) Las violetas son azules,
+---> b) La violeta es azul,
---> c) La inteligencia se aprende,
---> a) Las rosas son rojas,
@@ -426,7 +429,7 @@ NOTA: Recuerde que debería aprender practicando.
Lección 3.3: EL COMANDO CAMBIAR
- ** Para cambiar hasta el final de una línea, escriba ce . **
+ ** Para cambiar hasta el final de una palabra, escriba ce . **
1. Mueva el cursor a la primera línea inferior marcada con --->.
@@ -477,7 +480,7 @@ NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe.
escriba p . Esto pega el texto después del cursor (si se borró una
línea, al pegarla, esta se situará en la línea debajo del cursor).
- 2. Para sustituir el carácter bajo el cursor, pulse r y luego el
+ 2. Para reemplazar el carácter bajo el cursor, pulse r y luego el
carácter que quiere que esté en ese lugar.
3. El operador change le permite cambiar desde la posición del cursor
@@ -585,11 +588,11 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
---> Laas mejores épocas para ver laas flores son laas primaveras.
4. Para cambiar cada ocurrencia de la cadena de caracteres entre dos líneas,
- Pulse :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
+ Escriba :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
de líneas donde se realizará la sustitución.
- Pulse :%s/old/new/g para cambiar cada ocurrencia en todo el
+ Escriba :%s/old/new/g para cambiar cada ocurrencia en todo el
archivo.
- Pulse :%s/old/new/gc para encontrar cada ocurrencia en todo el
+ Escriba :%s/old/new/gc para encontrar cada ocurrencia en todo el
archivo, pidiendo confirmación para
realizar la sustitución o no.
@@ -602,19 +605,19 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
número G mueve el cursor a ese número de línea.
gg mueve el cursor a la primera línea del archivo.
- 2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
- Pulsando ? seguido de una frase busca la frase hacia ATRÁS.
+ 2. Escribiendo / seguido de una frase busca la frase hacia ADELANTE.
+ Escribiendo ? seguido de una frase busca la frase hacia ATRÁS.
Después de una búsqueda pulse n para encontrar la aparición
siguiente en la misma dirección o N para buscar en dirección opuesta.
3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza
la pareja correspondiente.
- 4. Para cambiar viejo en el primer nuevo en una línea pulse :s/viejo/nuevo
- Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g
- Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g
- Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g
- Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
+ 4. Para cambiar viejo en el primer nuevo en una línea escriba :s/viejo/nuevo
+ Para cambiar todos los viejo por nuevo en una línea escriba :s/viejo/nuevo/g
+ Para cambiar frases entre dos números de líneas escriba :#,#s/viejo/nuevo/g
+ Para cambiar viejo por nuevo en todo el fichero escriba :%s/viejo/nuevo/g
+ Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -631,7 +634,7 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
3. Como ejemplo escriba ls después del ! y luego pulse <INTRO>. Esto
le mostrará una lista de su directorio, igual que si estuviera en el
- símbolo del sistema. Si ls no funciona utilice !:dir .
+ símbolo del sistema. Si ls no funciona utilice :!dir .
NOTA: De esta manera es posible ejecutar cualquier comando externo,
también incluyendo argumentos.
@@ -680,7 +683,7 @@ NOTA: Si saliera de Vim y volviera a entrar de nuevo con vim TEST , el
:'<,'>
4. Pulse w TEST , donde TEST es un nombre de archivo que aún no existe.
- Verifique que :'<,'>w TEST antes de pulsar <INTRO>.
+ Verifique que ve :'<,'>w TEST antes de pulsar <INTRO>.
5. Vim escribirá las líneas seleccionadas en el archivo TEST. Utilice
:!dir o :!ls para verlo. ¡No lo elimine todavía! Lo utilizaremos
@@ -759,7 +762,7 @@ NOTA: También puede leer la salida de un comando externo. Por ejemplo,
---> Después de pulsar o el cursor se sitúa en la línea abierta en modo Insertar.
4. Para abrir una línea por ENCIMA del cursor, simplemente pulse una O
- mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente.
+ mayúscula, en lugar de una o minúscula. Pruebe esto en la línea siguiente.
---> Abra una línea sobre esta pulsando O cuando el cursor está en esta línea.
@@ -893,7 +896,7 @@ NOTA: Si quiere ignorar las mayúsculas y minúsculas, solo para un comando
'hls' 'hlsearch' resalta todas las coincidencias de la frases
Puedes utilizar tanto los nombre largos o cortos de las opciones.
- 7. Añade "no" para inhabilitar una opción: :set noic
+ 7. Añada "no" para inhabilitar una opción: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lección 7: OBTENER AYUDA
diff --git a/runtime/tutor/tutor.es.utf-8 b/runtime/tutor/tutor.es.utf-8
index a04d453f7..d6187ff8d 100644
--- a/runtime/tutor/tutor.es.utf-8
+++ b/runtime/tutor/tutor.es.utf-8
@@ -91,7 +91,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Lección 1.4: EDITAR TEXTO - BORRAR
+ Lección 1.4: EDITAR TEXTO - INSERTAR
** Pulse i para insertar texto. **
@@ -248,9 +248,12 @@ Ahora continúe con la Lección 2.
Una lista resumida de movimientos:
w - hasta el comienzo de la siguiente palabra, EXCLUYENDO su primer
carácter.
- e - hasta el final de la palabra actual, INCLUYENDO su primer carácter.
+ e - hasta el final de la palabra actual, INCLUYENDO el último carácter.
$ - hasta el final de la línea, INCLUYENDO el último carácter.
+ Por tanto, al escribir de borrará desde la posición del cursor, hasta
+ el final de la palabra.
+
NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
operador, moverá el cursor como se especifica en la lista anterior.
@@ -262,7 +265,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
1. Mueva el cursor al comienzo de la línea marcada con --->.
- 2. Escriba 2w para mover el cursor dos palabras hacia adelante.
+ 2. Escriba 2w para mover el cursor dos palabras hacia adelante.
3. Escriba 3e para mover el cursor al final de la tercera palabra hacia
adelante.
@@ -271,7 +274,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
5. Repita el paso 2 y 3 con diferentes números.
----> Esto es solo una línea con palabra donde poder moverse.
+---> Esto es solo una línea con palabras donde poder moverse.
6. Pase a la lección 2.5.
@@ -288,15 +291,15 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
anteriormente, añada un contador antes del movimiento para eliminar más:
d número movimiento
- 1. Mueva el cursos a la primera palabra en MAYÚSCULAS en la línea
- marcada con --->.
+ 1. Mueva el cursor al inicio de la primera palabra en MAYÚSCULAS en la
+ línea marcada con --->.
2. Escriba d2w para eliminar las dos palabras en MAYÚSCULAS.
3. Repita los pasos 1 y 2 con diferentes contadores para eliminar
las siguientes palabras en MAYÚSCULAS con un comando.
----> esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
+---> Esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
@@ -319,7 +322,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
---> 1) Las rosas son rojas,
---> 2) El barro es divertido,
----> 3) Las violetas son azules,
+---> 3) La violeta es azul,
---> 4) Tengo un coche,
---> 5) Los relojes dan la hora,
---> 6) El azúcar es dulce
@@ -362,7 +365,7 @@ mencionados anteriormente.
3. Para borrar desde el cursor hasta el final de una línea pulse: d$
4. Para borrar una línea entera pulse: dd
- 5. Para repetir un movimiento precédalo con un número: 2w
+ 5. Para repetir un movimiento anteponga un número: 2w
6. El formato para un comando de cambio es:
operador [número] movimiento
donde:
@@ -394,7 +397,7 @@ mencionados anteriormente.
5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto.
---> d) ¿Puedes aprenderla tú?
----> b) Las violetas son azules,
+---> b) La violeta es azul,
---> c) La inteligencia se aprende,
---> a) Las rosas son rojas,
@@ -426,7 +429,7 @@ NOTA: Recuerde que debería aprender practicando.
Lección 3.3: EL COMANDO CAMBIAR
- ** Para cambiar hasta el final de una línea, escriba ce . **
+ ** Para cambiar hasta el final de una palabra, escriba ce . **
1. Mueva el cursor a la primera línea inferior marcada con --->.
@@ -477,7 +480,7 @@ NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe.
escriba p . Esto pega el texto después del cursor (si se borró una
línea, al pegarla, esta se situará en la línea debajo del cursor).
- 2. Para sustituir el carácter bajo el cursor, pulse r y luego el
+ 2. Para reemplazar el carácter bajo el cursor, pulse r y luego el
carácter que quiere que esté en ese lugar.
3. El operador change le permite cambiar desde la posición del cursor
@@ -585,11 +588,11 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
---> Laas mejores épocas para ver laas flores son laas primaveras.
4. Para cambiar cada ocurrencia de la cadena de caracteres entre dos líneas,
- Pulse :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
+ Escriba :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
de líneas donde se realizará la sustitución.
- Pulse :%s/old/new/g para cambiar cada ocurrencia en todo el
+ Escriba :%s/old/new/g para cambiar cada ocurrencia en todo el
archivo.
- Pulse :%s/old/new/gc para encontrar cada ocurrencia en todo el
+ Escriba :%s/old/new/gc para encontrar cada ocurrencia en todo el
archivo, pidiendo confirmación para
realizar la sustitución o no.
@@ -602,19 +605,19 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
número G mueve el cursor a ese número de línea.
gg mueve el cursor a la primera línea del archivo.
- 2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
- Pulsando ? seguido de una frase busca la frase hacia ATRÃS.
+ 2. Escribiendo / seguido de una frase busca la frase hacia ADELANTE.
+ Escribiendo ? seguido de una frase busca la frase hacia ATRÃS.
Después de una búsqueda pulse n para encontrar la aparición
siguiente en la misma dirección o N para buscar en dirección opuesta.
3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza
la pareja correspondiente.
- 4. Para cambiar viejo en el primer nuevo en una línea pulse :s/viejo/nuevo
- Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g
- Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g
- Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g
- Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
+ 4. Para cambiar viejo en el primer nuevo en una línea escriba :s/viejo/nuevo
+ Para cambiar todos los viejo por nuevo en una línea escriba :s/viejo/nuevo/g
+ Para cambiar frases entre dos números de líneas escriba :#,#s/viejo/nuevo/g
+ Para cambiar viejo por nuevo en todo el fichero escriba :%s/viejo/nuevo/g
+ Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -631,7 +634,7 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
3. Como ejemplo escriba ls después del ! y luego pulse <INTRO>. Esto
le mostrará una lista de su directorio, igual que si estuviera en el
- símbolo del sistema. Si ls no funciona utilice !:dir .
+ símbolo del sistema. Si ls no funciona utilice :!dir .
NOTA: De esta manera es posible ejecutar cualquier comando externo,
también incluyendo argumentos.
@@ -680,7 +683,7 @@ NOTA: Si saliera de Vim y volviera a entrar de nuevo con vim TEST , el
:'<,'>
4. Pulse w TEST , donde TEST es un nombre de archivo que aún no existe.
- Verifique que :'<,'>w TEST antes de pulsar <INTRO>.
+ Verifique que ve :'<,'>w TEST antes de pulsar <INTRO>.
5. Vim escribirá las líneas seleccionadas en el archivo TEST. Utilice
:!dir o :!ls para verlo. ¡No lo elimine todavía! Lo utilizaremos
@@ -759,7 +762,7 @@ NOTA: También puede leer la salida de un comando externo. Por ejemplo,
---> Después de pulsar o el cursor se sitúa en la línea abierta en modo Insertar.
4. Para abrir una línea por ENCIMA del cursor, simplemente pulse una O
- mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente.
+ mayúscula, en lugar de una o minúscula. Pruebe esto en la línea siguiente.
---> Abra una línea sobre esta pulsando O cuando el cursor está en esta línea.
@@ -893,7 +896,7 @@ NOTA: Si quiere ignorar las mayúsculas y minúsculas, solo para un comando
'hls' 'hlsearch' resalta todas las coincidencias de la frases
Puedes utilizar tanto los nombre largos o cortos de las opciones.
- 7. Añade "no" para inhabilitar una opción: :set noic
+ 7. Añada "no" para inhabilitar una opción: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lección 7: OBTENER AYUDA