forked from aniani/vim
Update runtime files.
This commit is contained in:
@@ -98,7 +98,7 @@ Instead of using script language support in Vim:
|
|||||||
tool and implements the Vim side of the interface. Also, it can be used when
|
tool and implements the Vim side of the interface. Also, it can be used when
|
||||||
an external tool is undesired.
|
an external tool is undesired.
|
||||||
|
|
||||||
All together this creates a clear situation: Vim with the +eval feature
|
Altogether this creates a clear situation: Vim with the +eval feature
|
||||||
will be sufficient for most plugins, while some plugins require
|
will be sufficient for most plugins, while some plugins require
|
||||||
installing a tool that can be written in any language. No confusion
|
installing a tool that can be written in any language. No confusion
|
||||||
about having Vim but the plugin not working because some specific
|
about having Vim but the plugin not working because some specific
|
||||||
|
@@ -185,7 +185,7 @@ func! Test_check_colors()
|
|||||||
|
|
||||||
" 9) Normal should be defined first, not use reverse, fg or bg
|
" 9) Normal should be defined first, not use reverse, fg or bg
|
||||||
call cursor(1,1)
|
call cursor(1,1)
|
||||||
let pat = 'hi\%[light] \+\%(link\|clear\)\@!\w\+\>'
|
let pat = 'hi\%[ghlight] \+\%(link\|clear\)\@!\w\+\>'
|
||||||
call search(pat, 'cW') " Look for the first hi def, skipping `hi link` and `hi clear`
|
call search(pat, 'cW') " Look for the first hi def, skipping `hi link` and `hi clear`
|
||||||
if getline('.') !~# '\m\<Normal\>'
|
if getline('.') !~# '\m\<Normal\>'
|
||||||
let err['highlight']['Normal'] = 'Should be defined first'
|
let err['highlight']['Normal'] = 'Should be defined first'
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Compiler: Checkstyle
|
" Compiler: Checkstyle
|
||||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Change: 2013 Jun 26
|
" Last Change: 2020 Aug 2
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
@@ -12,8 +12,18 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
|||||||
command -nargs=* CompilerSet setlocal <args>
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
" sample error: WebTable.java:282: '+=' is not preceeded with whitespace.
|
" CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain\ -c\ /sun_checks.xml
|
||||||
" WebTable.java:201:1: '{' should be on the previous line.
|
" CompilerSet makeprg=java\ -jar\ checkstyle-X.XX-all.jar\ -f\ plain\ -c\ /sun_checks.xml
|
||||||
CompilerSet errorformat=%f:%l:%v:\ %m,%f:%l:\ %m,%-G%.%#
|
|
||||||
|
CompilerSet makeprg=checkstyle\ -f\ plain
|
||||||
|
CompilerSet errorformat=[%tRROR]\ %f:%l:%v:\ %m,
|
||||||
|
\[%tARN]\ %f:%l:%v:\ %m,
|
||||||
|
\[%tRROR]\ %f:%l:\ %m,
|
||||||
|
\[%tARN]\ %f:%l:\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
34
runtime/compiler/gawk.vim
Normal file
34
runtime/compiler/gawk.vim
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: GNU Awk
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2020 Feb 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "gawk"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
CompilerSet makeprg=gawk
|
||||||
|
CompilerSet errorformat=%Z%.awk:\ %f:%l:\ %p^\ %m,
|
||||||
|
\%Eg%\\=awk:\ %f:%l:\ fatal:\ %m,
|
||||||
|
\%Egawk:\ %f:%l:\ error:\ %m,
|
||||||
|
\%Wgawk:\ %f:%l:\ warning:\ %m,
|
||||||
|
\%Egawk:\ %f:%l:\ %.%#,
|
||||||
|
\gawk:\ %f:%l:\ %tatal:\ %m,
|
||||||
|
\gawk:\ %f:%l:\ %trror:\ %m,
|
||||||
|
\gawk:\ %f:%l:\ %tarning:\ %m,
|
||||||
|
\gawk:\ %tatal:\ %m,
|
||||||
|
\gawk:\ %trror:\ %m,
|
||||||
|
\gawk:\ %tarning:\ %m,
|
||||||
|
\%+C%.%#,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
25
runtime/compiler/gjs.vim
Normal file
25
runtime/compiler/gjs.vim
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: GJS (Gnome JavaScript Bindings)
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2019 Jul 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "gjs"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
CompilerSet makeprg=gjs
|
||||||
|
CompilerSet errorformat=%.%#JS\ %tRROR:\ %m\ @\ %f:%c,
|
||||||
|
\%E%.%#JS\ ERROR:\ %m,
|
||||||
|
\%Z@%f:%l:%c,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
30
runtime/compiler/jest.vim
Normal file
30
runtime/compiler/jest.vim
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: Jest
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2018 May 15
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "jest"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ jest\ --no-colors
|
||||||
|
|
||||||
|
CompilerSet makeprg=jest\ --no-colors
|
||||||
|
CompilerSet errorformat=%E\ \ ●\ %m,
|
||||||
|
\%Z\ %\\{4}%.%#Error:\ %f:\ %m\ (%l:%c):%\\=,
|
||||||
|
\%Z\ %\\{6}at\ %\\S%#\ (%f:%l:%c),
|
||||||
|
\%+C\ %\\{4}%\\w%.%#,
|
||||||
|
\%+C\ %\\{4}%[-+]%.%#,
|
||||||
|
\%-C%.%#,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
24
runtime/compiler/jjs.vim
Normal file
24
runtime/compiler/jjs.vim
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: Nashorn Shell
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2018 Jan 9
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "jjs"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
CompilerSet makeprg=jjs
|
||||||
|
CompilerSet errorformat=%f:%l:%c\ %m,
|
||||||
|
\%f:%l\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
25
runtime/compiler/jshint.vim
Normal file
25
runtime/compiler/jshint.vim
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: JSHint
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2019 Jul 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "jshint"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ jshint\ --verbose
|
||||||
|
|
||||||
|
CompilerSet makeprg=jshint\ --verbose
|
||||||
|
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m\ (%t%n),
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
25
runtime/compiler/jsonlint.vim
Normal file
25
runtime/compiler/jsonlint.vim
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: JSON Lint
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2019 Jul 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "jsonlint"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ jsonlint\ --compact\ --quiet
|
||||||
|
|
||||||
|
CompilerSet makeprg=jsonlint\ --compact\ --quiet
|
||||||
|
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ found:\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
23
runtime/compiler/rubocop.vim
Normal file
23
runtime/compiler/rubocop.vim
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: RuboCop
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2019 Jul 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "rubocop"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
CompilerSet makeprg=rubocop\ --format\ emacs
|
||||||
|
CompilerSet errorformat=%f:%l:%c:\ %t:\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
26
runtime/compiler/stylelint.vim
Normal file
26
runtime/compiler/stylelint.vim
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: Stylelint
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2020 Jun 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "stylelint"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ stylelint\ --formatter\ compact
|
||||||
|
|
||||||
|
CompilerSet makeprg=stylelint\ --formatter\ compact
|
||||||
|
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,
|
||||||
|
\%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
29
runtime/compiler/ts-node.vim
Normal file
29
runtime/compiler/ts-node.vim
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: TypeScript Runner
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2020 Feb 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "node"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ ts-node
|
||||||
|
|
||||||
|
CompilerSet makeprg=ts-node
|
||||||
|
CompilerSet errorformat=%f\ %#(%l\\,%c):\ %trror\ TS%n:\ %m,
|
||||||
|
\%E%f:%l,
|
||||||
|
\%+Z%\\w%\\+Error:\ %.%#,
|
||||||
|
\%C%p^%\\+,
|
||||||
|
\%C%.%#,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
26
runtime/compiler/tsc.vim
Normal file
26
runtime/compiler/tsc.vim
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: TypeScript Compiler
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2020 Feb 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "tsc"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ tsc
|
||||||
|
|
||||||
|
CompilerSet makeprg=tsc
|
||||||
|
CompilerSet errorformat=%f\ %#(%l\\,%c):\ %trror\ TS%n:\ %m,
|
||||||
|
\%trror\ TS%n:\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
28
runtime/compiler/typedoc.vim
Normal file
28
runtime/compiler/typedoc.vim
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: TypeDoc
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2020 Feb 10
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "typedoc"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" CompilerSet makeprg=npx\ typedoc
|
||||||
|
|
||||||
|
CompilerSet makeprg=typedoc
|
||||||
|
CompilerSet errorformat=%EError:\ %f(%l),
|
||||||
|
\%WWarning:\ %f(%l),
|
||||||
|
\%+IDocumentation\ generated\ at\ %f,
|
||||||
|
\%Z\ %m,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
@@ -1,4 +1,4 @@
|
|||||||
*cmdline.txt* For Vim version 8.2. Last change: 2020 Jul 26
|
*cmdline.txt* For Vim version 8.2. Last change: 2020 Aug 09
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -1130,7 +1130,8 @@ CTRL-C Continue in Command-line mode. The command-line under the
|
|||||||
in Normal mode. There is no redraw, thus the window will
|
in Normal mode. There is no redraw, thus the window will
|
||||||
remain visible.
|
remain visible.
|
||||||
:quit Discard the command line and go back to Normal mode.
|
:quit Discard the command line and go back to Normal mode.
|
||||||
":close", ":exit", ":xit" and CTRL-\ CTRL-N also work.
|
":close", CTRL-W c, ":exit", ":xit" and CTRL-\ CTRL-N also
|
||||||
|
work.
|
||||||
:qall Quit Vim, unless there are changes in some buffer.
|
:qall Quit Vim, unless there are changes in some buffer.
|
||||||
:qall! Quit Vim, discarding changes to any buffer.
|
:qall! Quit Vim, discarding changes to any buffer.
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 8.2. Last change: 2020 Aug 07
|
*eval.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
@@ -163,8 +163,8 @@ file. It will be overwritten when installing a new version of Vim.
|
|||||||
|
|
||||||
A. If you want to overrule all default file type checks.
|
A. If you want to overrule all default file type checks.
|
||||||
This works by writing one file for each filetype. The disadvantage is that
|
This works by writing one file for each filetype. The disadvantage is that
|
||||||
means there can be many files. The advantage is that you can simply drop
|
there can be many files. The advantage is that you can simply drop this
|
||||||
this file in the right directory to make it work.
|
file in the right directory to make it work.
|
||||||
*ftdetect*
|
*ftdetect*
|
||||||
1. Create your user runtime directory. You would normally use the first
|
1. Create your user runtime directory. You would normally use the first
|
||||||
item of the 'runtimepath' option. Then create the directory "ftdetect"
|
item of the 'runtimepath' option. Then create the directory "ftdetect"
|
||||||
|
@@ -1096,8 +1096,9 @@ That's all. XLFDs are not used. For Chinese this is reported to work well: >
|
|||||||
|
|
||||||
For Mac OSX you can use something like this: >
|
For Mac OSX you can use something like this: >
|
||||||
:set guifont=Monaco:h10
|
:set guifont=Monaco:h10
|
||||||
Also see 'macatsui', it can help fix display problems.
|
|
||||||
*E236*
|
Mono-spaced fonts *E236*
|
||||||
|
|
||||||
Note that the fonts must be mono-spaced (all characters have the same width).
|
Note that the fonts must be mono-spaced (all characters have the same width).
|
||||||
An exception is GTK: all fonts are accepted, but mono-spaced fonts look best.
|
An exception is GTK: all fonts are accepted, but mono-spaced fonts look best.
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*options.txt* For Vim version 8.2. Last change: 2020 Aug 07
|
*options.txt* For Vim version 8.2. Last change: 2020 Aug 13
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -727,8 +727,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
'antialias' 'anti' boolean (default: off)
|
'antialias' 'anti' boolean (default: off)
|
||||||
global
|
global
|
||||||
{only available when compiled with GUI enabled
|
{only available when compiled with GUI enabled
|
||||||
on Mac OS X}
|
on macOS}
|
||||||
This option only has an effect in the GUI version of Vim on Mac OS X
|
This option only has an effect in the GUI version of Vim on macOS
|
||||||
v10.2 or later. When on, Vim will use smooth ("antialiased") fonts,
|
v10.2 or later. When on, Vim will use smooth ("antialiased") fonts,
|
||||||
which can be easier to read at certain sizes on certain displays.
|
which can be easier to read at certain sizes on certain displays.
|
||||||
Setting this option can sometimes cause problems if 'guifont' is set
|
Setting this option can sometimes cause problems if 'guifont' is set
|
||||||
@@ -4546,7 +4546,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
set and to the Vim default value when 'compatible' is reset.
|
set and to the Vim default value when 'compatible' is reset.
|
||||||
|
|
||||||
*'isprint'* *'isp'*
|
*'isprint'* *'isp'*
|
||||||
'isprint' 'isp' string (default for Win32 and Macintosh:
|
'isprint' 'isp' string (default for Win32 and macOS:
|
||||||
"@,~-255"; otherwise: "@,161-255")
|
"@,~-255"; otherwise: "@,161-255")
|
||||||
global
|
global
|
||||||
The characters given by this option are displayed directly on the
|
The characters given by this option are displayed directly on the
|
||||||
@@ -4923,18 +4923,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
*'macatsui'* *'nomacatsui'*
|
*'macatsui'* *'nomacatsui'*
|
||||||
'macatsui' boolean (default on)
|
'macatsui' boolean (default on)
|
||||||
global
|
global
|
||||||
{only available in Mac GUI version}
|
{not supported}
|
||||||
This is a workaround for when drawing doesn't work properly. When set
|
No longer supported, as the Mac OS X GUI code was removed.
|
||||||
and compiled with multi-byte support ATSUI text drawing is used. When
|
|
||||||
not set ATSUI text drawing is not used. Switch this option off when
|
|
||||||
you experience drawing problems. In a future version the problems may
|
|
||||||
be solved and this option becomes obsolete. Therefore use this method
|
|
||||||
to unset it: >
|
|
||||||
if exists('&macatsui')
|
|
||||||
set nomacatsui
|
|
||||||
endif
|
|
||||||
< Another option to check if you have drawing problems is
|
|
||||||
'termencoding'.
|
|
||||||
|
|
||||||
*'magic'* *'nomagic'*
|
*'magic'* *'nomagic'*
|
||||||
'magic' boolean (default on)
|
'magic' boolean (default on)
|
||||||
@@ -6240,7 +6230,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
$VIMRUNTIME,
|
$VIMRUNTIME,
|
||||||
$VIM/vimfiles/after,
|
$VIM/vimfiles/after,
|
||||||
$HOME/vimfiles/after"
|
$HOME/vimfiles/after"
|
||||||
Macintosh: "$VIM:vimfiles,
|
macOS: "$VIM:vimfiles,
|
||||||
$VIMRUNTIME,
|
$VIMRUNTIME,
|
||||||
$VIM:vimfiles:after"
|
$VIM:vimfiles:after"
|
||||||
Haiku: "$BE_USER_SETTINGS/vim,
|
Haiku: "$BE_USER_SETTINGS/vim,
|
||||||
@@ -7744,14 +7734,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
For further details see |arabic.txt|.
|
For further details see |arabic.txt|.
|
||||||
|
|
||||||
*'termencoding'* *'tenc'*
|
*'termencoding'* *'tenc'*
|
||||||
'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8"; with
|
'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8")
|
||||||
Macintosh GUI: "macroman")
|
|
||||||
global
|
global
|
||||||
Encoding used for the terminal. This specifies what character
|
Encoding used for the terminal. This specifies what character
|
||||||
encoding the keyboard produces and the display will understand. For
|
encoding the keyboard produces and the display will understand. For
|
||||||
the GUI it only applies to the keyboard ('encoding' is used for the
|
the GUI it only applies to the keyboard ('encoding' is used for the
|
||||||
display). Except for the Mac when 'macatsui' is off, then
|
display).
|
||||||
'termencoding' should be "macroman".
|
|
||||||
*E617* *E950*
|
*E617* *E950*
|
||||||
Note: This does not apply to the GTK+ GUI. After the GUI has been
|
Note: This does not apply to the GTK+ GUI. After the GUI has been
|
||||||
successfully initialized, 'termencoding' is forcibly set to "utf-8".
|
successfully initialized, 'termencoding' is forcibly set to "utf-8".
|
||||||
@@ -8397,7 +8385,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
'viewdir' 'vdir' string (default for Amiga and Win32:
|
'viewdir' 'vdir' string (default for Amiga and Win32:
|
||||||
"$VIM/vimfiles/view",
|
"$VIM/vimfiles/view",
|
||||||
for Unix: "~/.vim/view",
|
for Unix: "~/.vim/view",
|
||||||
for Macintosh: "$VIM:vimfiles:view"
|
for macOS: "$VIM:vimfiles:view"
|
||||||
for VMS: "sys$login:vimfiles/view")
|
for VMS: "sys$login:vimfiles/view")
|
||||||
global
|
global
|
||||||
{not available when compiled without the |+mksession|
|
{not available when compiled without the |+mksession|
|
||||||
|
@@ -1705,7 +1705,7 @@ special problem here is that it doesn't print information on leaving the
|
|||||||
directory and that it doesn't print the absolute path.
|
directory and that it doesn't print the absolute path.
|
||||||
|
|
||||||
To solve the problem with relative paths and missing "leave directory"
|
To solve the problem with relative paths and missing "leave directory"
|
||||||
messages Vim uses following algorithm:
|
messages Vim uses the following algorithm:
|
||||||
|
|
||||||
1) Check if the given directory is a subdirectory of the current directory.
|
1) Check if the given directory is a subdirectory of the current directory.
|
||||||
If this is true, store it as the current directory.
|
If this is true, store it as the current directory.
|
||||||
@@ -1938,7 +1938,7 @@ list window is:
|
|||||||
The values displayed in each line correspond to the "bufnr", "lnum", "col" and
|
The values displayed in each line correspond to the "bufnr", "lnum", "col" and
|
||||||
"text" fields returned by the |getqflist()| function.
|
"text" fields returned by the |getqflist()| function.
|
||||||
|
|
||||||
For some quickfix/location lists, the displayed text need to be customized.
|
For some quickfix/location lists, the displayed text needs to be customized.
|
||||||
For example, if only the filename is present for a quickfix entry, then the
|
For example, if only the filename is present for a quickfix entry, then the
|
||||||
two "|" field separator characters after the filename are not needed. Another
|
two "|" field separator characters after the filename are not needed. Another
|
||||||
use case is to customize the path displayed for a filename. By default, the
|
use case is to customize the path displayed for a filename. By default, the
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*recover.txt* For Vim version 8.2. Last change: 2020 May 09
|
*recover.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -64,8 +64,8 @@ Disadvantages:
|
|||||||
directories (although Vim tries to avoid that by comparing the path name).
|
directories (although Vim tries to avoid that by comparing the path name).
|
||||||
This will result in bogus ATTENTION warning messages.
|
This will result in bogus ATTENTION warning messages.
|
||||||
- When you use your home directory, and somebody else tries to edit the same
|
- When you use your home directory, and somebody else tries to edit the same
|
||||||
file, he will not see your swap file and will not get the ATTENTION warning
|
file, that user will not see your swap file and will not get the ATTENTION
|
||||||
message.
|
warning message.
|
||||||
On the Amiga you can also use a recoverable ram disk, but there is no 100%
|
On the Amiga you can also use a recoverable ram disk, but there is no 100%
|
||||||
guarantee that this works. Putting swap files in a normal ram disk (like RAM:
|
guarantee that this works. Putting swap files in a normal ram disk (like RAM:
|
||||||
on the Amiga) or in a place that is cleared when rebooting (like /tmp on Unix)
|
on the Amiga) or in a place that is cleared when rebooting (like /tmp on Unix)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*repeat.txt* For Vim version 8.2. Last change: 2020 May 14
|
*repeat.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -643,7 +643,7 @@ This assumes you write one or more plugins that you distribute as a package.
|
|||||||
|
|
||||||
If you have two unrelated plugins you would use two packages, so that Vim
|
If you have two unrelated plugins you would use two packages, so that Vim
|
||||||
users can choose what they include or not. Or you can decide to use one
|
users can choose what they include or not. Or you can decide to use one
|
||||||
package with optional plugins, and tell the user to add the ones he wants with
|
package with optional plugins, and tell the user to add the preferred ones with
|
||||||
`:packadd`.
|
`:packadd`.
|
||||||
|
|
||||||
Decide how you want to distribute the package. You can create an archive or
|
Decide how you want to distribute the package. You can create an archive or
|
||||||
@@ -679,7 +679,7 @@ You could add this packadd command in one of your plugins, to be executed when
|
|||||||
the optional plugin is needed.
|
the optional plugin is needed.
|
||||||
|
|
||||||
Run the `:helptags` command to generate the doc/tags file. Including this
|
Run the `:helptags` command to generate the doc/tags file. Including this
|
||||||
generated file in the package means that the user can drop the package in his
|
generated file in the package means that the user can drop the package in the
|
||||||
pack directory and the help command works right away. Don't forget to re-run
|
pack directory and the help command works right away. Don't forget to re-run
|
||||||
the command after changing the plugin help: >
|
the command after changing the plugin help: >
|
||||||
:helptags path/start/foobar/doc
|
:helptags path/start/foobar/doc
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*spell.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
*spell.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -1445,7 +1445,7 @@ are spelling mistakes this may not be quite right.
|
|||||||
Common words can be specified with the COMMON item. This will give better
|
Common words can be specified with the COMMON item. This will give better
|
||||||
suggestions when editing a short file. Example:
|
suggestions when editing a short file. Example:
|
||||||
|
|
||||||
COMMON the of to and a in is it you that he was for on are ~
|
COMMON the of to and a in is it you that he she was for on are ~
|
||||||
|
|
||||||
The words must be separated by white space, up to 25 per line.
|
The words must be separated by white space, up to 25 per line.
|
||||||
When multiple regions are specified in a ":mkspell" command the common words
|
When multiple regions are specified in a ":mkspell" command the common words
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*tabpage.txt* For Vim version 8.2. Last change: 2020 Feb 06
|
*tabpage.txt* For Vim version 8.2. Last change: 2020 Aug 10
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
@@ -3497,6 +3497,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
|||||||
<C-ScrollWheelLeft> scroll.txt /*<C-ScrollWheelLeft>*
|
<C-ScrollWheelLeft> scroll.txt /*<C-ScrollWheelLeft>*
|
||||||
<C-ScrollWheelRight> scroll.txt /*<C-ScrollWheelRight>*
|
<C-ScrollWheelRight> scroll.txt /*<C-ScrollWheelRight>*
|
||||||
<C-ScrollWheelUp> scroll.txt /*<C-ScrollWheelUp>*
|
<C-ScrollWheelUp> scroll.txt /*<C-ScrollWheelUp>*
|
||||||
|
<C-Tab> tabpage.txt /*<C-Tab>*
|
||||||
<CR> motion.txt /*<CR>*
|
<CR> motion.txt /*<CR>*
|
||||||
<CSI> intro.txt /*<CSI>*
|
<CSI> intro.txt /*<CSI>*
|
||||||
<Char-> map.txt /*<Char->*
|
<Char-> map.txt /*<Char->*
|
||||||
@@ -3816,6 +3817,7 @@ CTRL-W_bar windows.txt /*CTRL-W_bar*
|
|||||||
CTRL-W_c windows.txt /*CTRL-W_c*
|
CTRL-W_c windows.txt /*CTRL-W_c*
|
||||||
CTRL-W_d tagsrch.txt /*CTRL-W_d*
|
CTRL-W_d tagsrch.txt /*CTRL-W_d*
|
||||||
CTRL-W_f windows.txt /*CTRL-W_f*
|
CTRL-W_f windows.txt /*CTRL-W_f*
|
||||||
|
CTRL-W_g<Tab> tabpage.txt /*CTRL-W_g<Tab>*
|
||||||
CTRL-W_gF windows.txt /*CTRL-W_gF*
|
CTRL-W_gF windows.txt /*CTRL-W_gF*
|
||||||
CTRL-W_gT windows.txt /*CTRL-W_gT*
|
CTRL-W_gT windows.txt /*CTRL-W_gT*
|
||||||
CTRL-W_g] windows.txt /*CTRL-W_g]*
|
CTRL-W_g] windows.txt /*CTRL-W_g]*
|
||||||
@@ -6863,6 +6865,7 @@ g<End> motion.txt /*g<End>*
|
|||||||
g<Home> motion.txt /*g<Home>*
|
g<Home> motion.txt /*g<Home>*
|
||||||
g<LeftMouse> tagsrch.txt /*g<LeftMouse>*
|
g<LeftMouse> tagsrch.txt /*g<LeftMouse>*
|
||||||
g<RightMouse> tagsrch.txt /*g<RightMouse>*
|
g<RightMouse> tagsrch.txt /*g<RightMouse>*
|
||||||
|
g<Tab> tabpage.txt /*g<Tab>*
|
||||||
g<Up> motion.txt /*g<Up>*
|
g<Up> motion.txt /*g<Up>*
|
||||||
g? change.txt /*g?*
|
g? change.txt /*g?*
|
||||||
g?? change.txt /*g??*
|
g?? change.txt /*g??*
|
||||||
@@ -8300,6 +8303,7 @@ pascal.vim syntax.txt /*pascal.vim*
|
|||||||
patches-8 version8.txt /*patches-8*
|
patches-8 version8.txt /*patches-8*
|
||||||
patches-8.1 version8.txt /*patches-8.1*
|
patches-8.1 version8.txt /*patches-8.1*
|
||||||
patches-8.2 version8.txt /*patches-8.2*
|
patches-8.2 version8.txt /*patches-8.2*
|
||||||
|
patches-after-8.2 version8.txt /*patches-after-8.2*
|
||||||
pathshorten() eval.txt /*pathshorten()*
|
pathshorten() eval.txt /*pathshorten()*
|
||||||
pattern pattern.txt /*pattern*
|
pattern pattern.txt /*pattern*
|
||||||
pattern-atoms pattern.txt /*pattern-atoms*
|
pattern-atoms pattern.txt /*pattern-atoms*
|
||||||
@@ -9638,6 +9642,7 @@ tutor usr_01.txt /*tutor*
|
|||||||
twice if_cscop.txt /*twice*
|
twice if_cscop.txt /*twice*
|
||||||
two-engines pattern.txt /*two-engines*
|
two-engines pattern.txt /*two-engines*
|
||||||
type() eval.txt /*type()*
|
type() eval.txt /*type()*
|
||||||
|
type-casting vim9.txt /*type-casting*
|
||||||
type-inference vim9.txt /*type-inference*
|
type-inference vim9.txt /*type-inference*
|
||||||
type-mistakes tips.txt /*type-mistakes*
|
type-mistakes tips.txt /*type-mistakes*
|
||||||
typecorr-settings usr_41.txt /*typecorr-settings*
|
typecorr-settings usr_41.txt /*typecorr-settings*
|
||||||
@@ -9934,6 +9939,7 @@ valgrind debug.txt /*valgrind*
|
|||||||
values() eval.txt /*values()*
|
values() eval.txt /*values()*
|
||||||
var-functions usr_41.txt /*var-functions*
|
var-functions usr_41.txt /*var-functions*
|
||||||
variable-scope eval.txt /*variable-scope*
|
variable-scope eval.txt /*variable-scope*
|
||||||
|
variable-types vim9.txt /*variable-types*
|
||||||
variables eval.txt /*variables*
|
variables eval.txt /*variables*
|
||||||
various various.txt /*various*
|
various various.txt /*various*
|
||||||
various-cmds various.txt /*various-cmds*
|
various-cmds various.txt /*various-cmds*
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*todo.txt* For Vim version 8.2. Last change: 2020 Aug 05
|
*todo.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -38,16 +38,21 @@ browser use: https://github.com/vim/vim/issues/1234
|
|||||||
*known-bugs*
|
*known-bugs*
|
||||||
-------------------- Known bugs and current work -----------------------
|
-------------------- Known bugs and current work -----------------------
|
||||||
|
|
||||||
|
What is the way to get the character under the cursor? With or without
|
||||||
|
composing characters. getline(".") and then use col(".") somehow?
|
||||||
|
Add charidx() perhaps?
|
||||||
|
|
||||||
Making everything work:
|
Making everything work:
|
||||||
- Check that when sourcing a Vim9 script, only the global items can be used.
|
- Slice of list: [1, 2, 3][1:2].
|
||||||
- Make string indexes character indexes instead of byte indexes. (#6574)
|
- Slice of string: "abc"[1:2]. (#6709)
|
||||||
explain how to use byte index when needed. Use blob?
|
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
|
||||||
- :put with a "=" register argument doesn't work, need to find the expression
|
- :put with a "=" register argument doesn't work, need to find the expression
|
||||||
and compile it. (#6397)
|
and compile it. (#6397)
|
||||||
- At the script level, keep script variables local to the block they are
|
- At the script level, keep script variables local to the block they are
|
||||||
declared in? Need to remember what variables were declared and delete them
|
declared in? Need to remember what variables were declared and delete them
|
||||||
when leaving the block.
|
when leaving the block.
|
||||||
- Implement { } block at the script level.
|
- Implement { } block at the script level.
|
||||||
|
- In autocmd: use legacy syntax, not whatever the current script uses?
|
||||||
- need to check type when a declaration specifies a type: #6507
|
- need to check type when a declaration specifies a type: #6507
|
||||||
let nr: number = 'asdf'
|
let nr: number = 'asdf'
|
||||||
- Make sure that in vim9script a function call without namespace only finds
|
- Make sure that in vim9script a function call without namespace only finds
|
||||||
@@ -55,9 +60,13 @@ Making everything work:
|
|||||||
- Make map() give an error if the resulting type is wrong.
|
- Make map() give an error if the resulting type is wrong.
|
||||||
Add mapnew() to create a new List/Dict for the result, which can have a
|
Add mapnew() to create a new List/Dict for the result, which can have a
|
||||||
different value type.
|
different value type.
|
||||||
|
- When defining an :autocmd or :command, how to specify using Vim9 syntax?
|
||||||
|
- always do this when defined in a Vim9 script
|
||||||
|
- add some command modifier.
|
||||||
|
- For an :autocmd and :command argument, if a following line starts with "|"
|
||||||
|
append it. It's like line continuation. (#6702)
|
||||||
- Implement "export {one, two three}".
|
- Implement "export {one, two three}".
|
||||||
- ISN_CHECKTYPE could use check_argtype()
|
- ISN_CHECKTYPE could use check_argtype()
|
||||||
- Slice of list: [1, 2, 3][1:2].
|
|
||||||
- give error for variable name:
|
- give error for variable name:
|
||||||
let p = function('NoSuchFunc')
|
let p = function('NoSuchFunc')
|
||||||
- Give runtime error if function argument is wrong.
|
- Give runtime error if function argument is wrong.
|
||||||
@@ -79,6 +88,7 @@ Making everything work:
|
|||||||
ret[i] = string(i)
|
ret[i] = string(i)
|
||||||
- Appending to dict item doesn't work:
|
- Appending to dict item doesn't work:
|
||||||
let d[i] ..= value
|
let d[i] ..= value
|
||||||
|
- Using ".." at script level doesn't convert arguments to a string.
|
||||||
- Compile replacement of :s command: s/pat/\=expr/
|
- Compile replacement of :s command: s/pat/\=expr/
|
||||||
- Compile redir to local variable: var_redir_start().
|
- Compile redir to local variable: var_redir_start().
|
||||||
- Compile builtin functions that access local variables:
|
- Compile builtin functions that access local variables:
|
||||||
@@ -103,8 +113,6 @@ Making everything work:
|
|||||||
New syntax and functionality:
|
New syntax and functionality:
|
||||||
Improve error checking:
|
Improve error checking:
|
||||||
- "echo Func()" is an error if Func() does not return anything.
|
- "echo Func()" is an error if Func() does not return anything.
|
||||||
Test:
|
|
||||||
- Using a Vim9 autoload script (functions must be global).
|
|
||||||
Also:
|
Also:
|
||||||
- For range: make table of first ASCII character with flag to quickly check if
|
- For range: make table of first ASCII character with flag to quickly check if
|
||||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||||
@@ -117,8 +125,6 @@ Also:
|
|||||||
- Test each level of expressions properly, with type checking
|
- Test each level of expressions properly, with type checking
|
||||||
- Test try/catch and throw better, also nested.
|
- Test try/catch and throw better, also nested.
|
||||||
Test return inside try/finally jumps to finally and then returns.
|
Test return inside try/finally jumps to finally and then returns.
|
||||||
- call autoload function.
|
|
||||||
- Implement more expressions, e.g. [a:b]
|
|
||||||
- can use func as reference:
|
- can use func as reference:
|
||||||
def SomeFunc() ...
|
def SomeFunc() ...
|
||||||
map(list, SomeFunc)
|
map(list, SomeFunc)
|
||||||
@@ -155,6 +161,8 @@ Popup windows:
|
|||||||
positioned? PopupNew? Could be used to set some options or move it out of
|
positioned? PopupNew? Could be used to set some options or move it out of
|
||||||
the way. (#5737)
|
the way. (#5737)
|
||||||
However, it may also cause trouble, changing the popup of another plugin.
|
However, it may also cause trouble, changing the popup of another plugin.
|
||||||
|
- Width is not computed correctly when minwidth and maxwidth are &columns
|
||||||
|
and padding and a scrollbar are used. (#6676)
|
||||||
- Add a way to use popup_menu() synchronously: instead of invoking the
|
- Add a way to use popup_menu() synchronously: instead of invoking the
|
||||||
callback, return the choice. (Ben Jackson, #6534)
|
callback, return the choice. (Ben Jackson, #6534)
|
||||||
- Use popup (or popup menu) for command line completion
|
- Use popup (or popup menu) for command line completion
|
||||||
@@ -402,6 +410,9 @@ remains equal? Then %argdel to clean it up. Do try this with 'hidden' set.
|
|||||||
Also #4994: window-local options not always restored, related to using :badd.
|
Also #4994: window-local options not always restored, related to using :badd.
|
||||||
Also #5326: netrw buffers are not restored.
|
Also #5326: netrw buffers are not restored.
|
||||||
|
|
||||||
|
Alternate file is not set in the session file. Use setwintabvar("@#") ?
|
||||||
|
(#6714)
|
||||||
|
|
||||||
When 'backupdir' has a path ending in double slash (meaning: use full path of
|
When 'backupdir' has a path ending in double slash (meaning: use full path of
|
||||||
the file) combined with 'patchmode' the file name is wrong. (#5791)
|
the file) combined with 'patchmode' the file name is wrong. (#5791)
|
||||||
|
|
||||||
@@ -2863,9 +2874,6 @@ Jun 18)
|
|||||||
|
|
||||||
If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.
|
If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.
|
||||||
|
|
||||||
Feature request: Command to go to previous tab, like what CTRL-W p does for
|
|
||||||
windows. (Adam George)
|
|
||||||
|
|
||||||
In debug mode, using CTRL-R = to evaluate a function causes stepping through
|
In debug mode, using CTRL-R = to evaluate a function causes stepping through
|
||||||
the function. (Hari Krishna Dara, 2006 Jun 28)
|
the function. (Hari Krishna Dara, 2006 Jun 28)
|
||||||
|
|
||||||
@@ -3841,7 +3849,7 @@ Macintosh:
|
|||||||
two lines at a time. "k" doesn't do this. (Cory T. Echols)
|
two lines at a time. "k" doesn't do this. (Cory T. Echols)
|
||||||
8 When write_viminfo() is used while there are many orphaned viminfo
|
8 When write_viminfo() is used while there are many orphaned viminfo
|
||||||
tempfiles writing the viminfo file fails. Give a clear error message so
|
tempfiles writing the viminfo file fails. Give a clear error message so
|
||||||
that the user knows he has to delete the files.
|
that the user knows the files have to be deleted.
|
||||||
|
|
||||||
|
|
||||||
I can't reproduce these (if you can, let me know how!):
|
I can't reproduce these (if you can, let me know how!):
|
||||||
@@ -4012,7 +4020,7 @@ Help:
|
|||||||
- Support a way to view (and edit) .info files.
|
- Support a way to view (and edit) .info files.
|
||||||
- Implement a "sticky" help window, some help text lines that are always
|
- Implement a "sticky" help window, some help text lines that are always
|
||||||
displayed in a window with fixed height. (Guckes) Use "~/.vimhelp" file,
|
displayed in a window with fixed height. (Guckes) Use "~/.vimhelp" file,
|
||||||
user can edit it to insert his favorite commands, new account can contain a
|
user can edit it to insert favorite commands, new account can contain a
|
||||||
default contents.
|
default contents.
|
||||||
- Make 'winminheight' a local option, so that the user can set a minimal
|
- Make 'winminheight' a local option, so that the user can set a minimal
|
||||||
height for the help window (and other windows).
|
height for the help window (and other windows).
|
||||||
@@ -5779,7 +5787,7 @@ Modelines:
|
|||||||
.cpp files.
|
.cpp files.
|
||||||
- Support the "abbreviate" command in modelines (Kearns). Careful for
|
- Support the "abbreviate" command in modelines (Kearns). Careful for
|
||||||
characters after <Esc>, that is a security leak.
|
characters after <Esc>, that is a security leak.
|
||||||
- Add option setting to ask user if he wants to have the modelines executed
|
- Add an option setting to ask the user if the modelines are to be executed
|
||||||
or not. Same for .exrc in local dir.
|
or not. Same for .exrc in local dir.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*usr_41.txt* For Vim version 8.2. Last change: 2020 Jun 13
|
*usr_41.txt* For Vim version 8.2. Last change: 2020 Aug 13
|
||||||
|
|
||||||
VIM USER MANUAL - by Bram Moolenaar
|
VIM USER MANUAL - by Bram Moolenaar
|
||||||
|
|
||||||
@@ -2044,9 +2044,9 @@ for this mapping, but the user might already use it for something else. To
|
|||||||
allow the user to define which keys a mapping in a plugin uses, the <Leader>
|
allow the user to define which keys a mapping in a plugin uses, the <Leader>
|
||||||
item can be used: >
|
item can be used: >
|
||||||
|
|
||||||
22 map <unique> <Leader>a <Plug>TypecorrAdd
|
22 map <unique> <Leader>a <Plug>TypecorrAdd;
|
||||||
|
|
||||||
The "<Plug>TypecorrAdd" thing will do the work, more about that further on.
|
The "<Plug>TypecorrAdd;" thing will do the work, more about that further on.
|
||||||
|
|
||||||
The user can set the "mapleader" variable to the key sequence that he wants
|
The user can set the "mapleader" variable to the key sequence that he wants
|
||||||
this mapping to start with. Thus if the user has done: >
|
this mapping to start with. Thus if the user has done: >
|
||||||
@@ -2062,15 +2062,15 @@ already happened to exist. |:map-<unique>|
|
|||||||
But what if the user wants to define his own key sequence? We can allow that
|
But what if the user wants to define his own key sequence? We can allow that
|
||||||
with this mechanism: >
|
with this mechanism: >
|
||||||
|
|
||||||
21 if !hasmapto('<Plug>TypecorrAdd')
|
21 if !hasmapto('<Plug>TypecorrAdd;')
|
||||||
22 map <unique> <Leader>a <Plug>TypecorrAdd
|
22 map <unique> <Leader>a <Plug>TypecorrAdd;
|
||||||
23 endif
|
23 endif
|
||||||
|
|
||||||
This checks if a mapping to "<Plug>TypecorrAdd" already exists, and only
|
This checks if a mapping to "<Plug>TypecorrAdd/" already exists, and only
|
||||||
defines the mapping from "<Leader>a" if it doesn't. The user then has a
|
defines the mapping from "<Leader>a" if it doesn't. The user then has a
|
||||||
chance of putting this in his vimrc file: >
|
chance of putting this in his vimrc file: >
|
||||||
|
|
||||||
map ,c <Plug>TypecorrAdd
|
map ,c <Plug>TypecorrAdd;
|
||||||
|
|
||||||
Then the mapped key sequence will be ",c" instead of "_a" or "\a".
|
Then the mapped key sequence will be ",c" instead of "_a" or "\a".
|
||||||
|
|
||||||
@@ -2100,15 +2100,15 @@ function (without the "s:"), which is again another function.
|
|||||||
<SID> can be used with mappings. It generates a script ID, which identifies
|
<SID> can be used with mappings. It generates a script ID, which identifies
|
||||||
the current script. In our typing correction plugin we use it like this: >
|
the current script. In our typing correction plugin we use it like this: >
|
||||||
|
|
||||||
24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add
|
24 noremap <unique> <script> <Plug>TypecorrAdd; <SID>Add
|
||||||
..
|
..
|
||||||
28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR>
|
28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR>
|
||||||
|
|
||||||
Thus when a user types "\a", this sequence is invoked: >
|
Thus when a user types "\a", this sequence is invoked: >
|
||||||
|
|
||||||
\a -> <Plug>TypecorrAdd -> <SID>Add -> :call <SID>Add()
|
\a -> <Plug>TypecorrAdd; -> <SID>Add -> :call <SID>Add()
|
||||||
|
|
||||||
If another script was also map <SID>Add, it would get another script ID and
|
If another script also maps <SID>Add, it will get another script ID and
|
||||||
thus define another mapping.
|
thus define another mapping.
|
||||||
|
|
||||||
Note that instead of s:Add() we use <SID>Add() here. That is because the
|
Note that instead of s:Add() we use <SID>Add() here. That is because the
|
||||||
@@ -2149,9 +2149,9 @@ difference between using <SID> and <Plug>:
|
|||||||
To make it very unlikely that other plugins use the same sequence of
|
To make it very unlikely that other plugins use the same sequence of
|
||||||
characters, use this structure: <Plug> scriptname mapname
|
characters, use this structure: <Plug> scriptname mapname
|
||||||
In our example the scriptname is "Typecorr" and the mapname is "Add".
|
In our example the scriptname is "Typecorr" and the mapname is "Add".
|
||||||
This results in "<Plug>TypecorrAdd". Only the first character of
|
We add a semicolon as the terminator. This results in
|
||||||
scriptname and mapname is uppercase, so that we can see where mapname
|
"<Plug>TypecorrAdd;". Only the first character of scriptname and
|
||||||
starts.
|
mapname is uppercase, so that we can see where mapname starts.
|
||||||
|
|
||||||
<SID> is the script ID, a unique identifier for a script.
|
<SID> is the script ID, a unique identifier for a script.
|
||||||
Internally Vim translates <SID> to "<SNR>123_", where "123" can be any
|
Internally Vim translates <SID> to "<SNR>123_", where "123" can be any
|
||||||
@@ -2226,10 +2226,10 @@ Here is the resulting complete example: >
|
|||||||
18 \ synchronization
|
18 \ synchronization
|
||||||
19 let s:count = 4
|
19 let s:count = 4
|
||||||
20
|
20
|
||||||
21 if !hasmapto('<Plug>TypecorrAdd')
|
21 if !hasmapto('<Plug>TypecorrAdd;')
|
||||||
22 map <unique> <Leader>a <Plug>TypecorrAdd
|
22 map <unique> <Leader>a <Plug>TypecorrAdd;
|
||||||
23 endif
|
23 endif
|
||||||
24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add
|
24 noremap <unique> <script> <Plug>TypecorrAdd; <SID>Add
|
||||||
25
|
25
|
||||||
26 noremenu <script> Plugin.Add\ Correction <SID>Add
|
26 noremenu <script> Plugin.Add\ Correction <SID>Add
|
||||||
27
|
27
|
||||||
@@ -2279,7 +2279,7 @@ Here is a simple example for a plugin help file, called "typecorr.txt": >
|
|||||||
6 There are currently only a few corrections. Add your own if you like.
|
6 There are currently only a few corrections. Add your own if you like.
|
||||||
7
|
7
|
||||||
8 Mappings:
|
8 Mappings:
|
||||||
9 <Leader>a or <Plug>TypecorrAdd
|
9 <Leader>a or <Plug>TypecorrAdd;
|
||||||
10 Add a correction for the word under the cursor.
|
10 Add a correction for the word under the cursor.
|
||||||
11
|
11
|
||||||
12 Commands:
|
12 Commands:
|
||||||
@@ -2417,13 +2417,13 @@ To make sure mappings will only work in the current buffer use the >
|
|||||||
command. This needs to be combined with the two-step mapping explained above.
|
command. This needs to be combined with the two-step mapping explained above.
|
||||||
An example of how to define functionality in a filetype plugin: >
|
An example of how to define functionality in a filetype plugin: >
|
||||||
|
|
||||||
if !hasmapto('<Plug>JavaImport')
|
if !hasmapto('<Plug>JavaImport;')
|
||||||
map <buffer> <unique> <LocalLeader>i <Plug>JavaImport
|
map <buffer> <unique> <LocalLeader>i <Plug>JavaImport;
|
||||||
endif
|
endif
|
||||||
noremap <buffer> <unique> <Plug>JavaImport oimport ""<Left><Esc>
|
noremap <buffer> <unique> <Plug>JavaImport; oimport ""<Left><Esc>
|
||||||
|
|
||||||
|hasmapto()| is used to check if the user has already defined a map to
|
|hasmapto()| is used to check if the user has already defined a map to
|
||||||
<Plug>JavaImport. If not, then the filetype plugin defines the default
|
<Plug>JavaImport;. If not, then the filetype plugin defines the default
|
||||||
mapping. This starts with |<LocalLeader>|, which allows the user to select
|
mapping. This starts with |<LocalLeader>|, which allows the user to select
|
||||||
the key(s) he wants filetype plugin mappings to start with. The default is a
|
the key(s) he wants filetype plugin mappings to start with. The default is a
|
||||||
backslash.
|
backslash.
|
||||||
@@ -2440,12 +2440,12 @@ plugin for the mail filetype: >
|
|||||||
" Add mappings, unless the user didn't want this.
|
" Add mappings, unless the user didn't want this.
|
||||||
if !exists("no_plugin_maps") && !exists("no_mail_maps")
|
if !exists("no_plugin_maps") && !exists("no_mail_maps")
|
||||||
" Quote text by inserting "> "
|
" Quote text by inserting "> "
|
||||||
if !hasmapto('<Plug>MailQuote')
|
if !hasmapto('<Plug>MailQuote;')
|
||||||
vmap <buffer> <LocalLeader>q <Plug>MailQuote
|
vmap <buffer> <LocalLeader>q <Plug>MailQuote;
|
||||||
nmap <buffer> <LocalLeader>q <Plug>MailQuote
|
nmap <buffer> <LocalLeader>q <Plug>MailQuote;
|
||||||
endif
|
endif
|
||||||
vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>
|
vnoremap <buffer> <Plug>MailQuote; :s/^/> /<CR>
|
||||||
nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>
|
nnoremap <buffer> <Plug>MailQuote; :.,$s/^/> /<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Two global variables are used:
|
Two global variables are used:
|
||||||
|
@@ -449,7 +449,7 @@ The help window is opened at the top, like ":topleft" was used, if the current
|
|||||||
window is fewer than 80 characters wide.
|
window is fewer than 80 characters wide.
|
||||||
|
|
||||||
A few options can be used to set the preferences for vertically split windows.
|
A few options can be used to set the preferences for vertically split windows.
|
||||||
They work similar to their existing horizontal equivalents:
|
They work similarly to their existing horizontal equivalents:
|
||||||
horizontal vertical ~
|
horizontal vertical ~
|
||||||
'splitbelow' 'splitright'
|
'splitbelow' 'splitright'
|
||||||
'winheight' 'winwidth'
|
'winheight' 'winwidth'
|
||||||
@@ -2690,9 +2690,9 @@ Multi-byte:
|
|||||||
wrong error number. (Muraoka Taro)
|
wrong error number. (Muraoka Taro)
|
||||||
- Using Alt-x in the GUI while 'encoding' was set to "utf-8" didn't produce
|
- Using Alt-x in the GUI while 'encoding' was set to "utf-8" didn't produce
|
||||||
the right character.
|
the right character.
|
||||||
- When using Visual block selection and only the left halve of a double-wide
|
- When using Visual block selection and only the left half of a double-wide
|
||||||
character is selected, the highlighting continued to the end of the line.
|
character is selected, the highlighting continued to the end of the line.
|
||||||
- Visual-block delete didn't work properly when deleting the right halve of a
|
- Visual-block delete didn't work properly when deleting the right half of a
|
||||||
double-wide character.
|
double-wide character.
|
||||||
- Overstrike mode for the cmdline replaced only the first byte of a multibyte
|
- Overstrike mode for the cmdline replaced only the first byte of a multibyte
|
||||||
character.
|
character.
|
||||||
@@ -2795,7 +2795,7 @@ GTK: Crash when 'shell' doesn't exist and doing":!ls". Use _exit() instead of
|
|||||||
exit() when the child couldn't execute the shell.
|
exit() when the child couldn't execute the shell.
|
||||||
|
|
||||||
Multi-byte:
|
Multi-byte:
|
||||||
- GUI with double-byte encoding: a mouse click in left halve of double-wide
|
- GUI with double-byte encoding: a mouse click in left half of double-wide
|
||||||
character put the cursor in previous char.
|
character put the cursor in previous char.
|
||||||
- Using double-byte encoding and 'selection' is "exclusive": "vey" and "^Vey"
|
- Using double-byte encoding and 'selection' is "exclusive": "vey" and "^Vey"
|
||||||
included the character after the word.
|
included the character after the word.
|
||||||
@@ -3165,7 +3165,7 @@ the terminal it was started in.
|
|||||||
When using ESC in Insert mode, an autoindent that wraps to the next line
|
When using ESC in Insert mode, an autoindent that wraps to the next line
|
||||||
caused the cursor to move to the end of the line temporarily. When the
|
caused the cursor to move to the end of the line temporarily. When the
|
||||||
character before the cursor was a double-wide multi-byte character the cursor
|
character before the cursor was a double-wide multi-byte character the cursor
|
||||||
would be on the right halve, which causes problems with some terminals.
|
would be on the right half, which causes problems with some terminals.
|
||||||
|
|
||||||
Didn't handle multi-byte characters correctly when expanding a file name.
|
Didn't handle multi-byte characters correctly when expanding a file name.
|
||||||
(Yasuhiro Matsumoto)
|
(Yasuhiro Matsumoto)
|
||||||
@@ -4356,7 +4356,7 @@ Files: src/normal.c
|
|||||||
|
|
||||||
Patch 6.0.104
|
Patch 6.0.104
|
||||||
Problem: Multi-byte: When '$' is in 'cpoptions', typing a double-wide
|
Problem: Multi-byte: When '$' is in 'cpoptions', typing a double-wide
|
||||||
character that overwrites the left halve of an old double-wide
|
character that overwrites the left half of an old double-wide
|
||||||
character causes a redraw problem and the cursor stops blinking.
|
character causes a redraw problem and the cursor stops blinking.
|
||||||
Solution: Clear the right half of the old character. (Yasuhiro Matsumoto)
|
Solution: Clear the right half of the old character. (Yasuhiro Matsumoto)
|
||||||
Files: src/edit.c, src/screen.c
|
Files: src/edit.c, src/screen.c
|
||||||
@@ -5894,7 +5894,7 @@ Files: src/move.c
|
|||||||
|
|
||||||
Patch 6.1b.023
|
Patch 6.1b.023
|
||||||
Problem: On MS-Windows system() may cause checking timestamps, because Vim
|
Problem: On MS-Windows system() may cause checking timestamps, because Vim
|
||||||
loses and gains input focus, while this doesn't happen on Unix.
|
looses and gains input focus, while this doesn't happen on Unix.
|
||||||
Solution: Don't check timestamps while system() is busy.
|
Solution: Don't check timestamps while system() is busy.
|
||||||
Files: src/ex_cmds2.c, src/fileio.c, src/globals.h, src/misc1.c
|
Files: src/ex_cmds2.c, src/fileio.c, src/globals.h, src/misc1.c
|
||||||
|
|
||||||
@@ -7069,7 +7069,7 @@ Solution: Don't free the item on the stack. Use NULL instead of "none" for
|
|||||||
Files: src/gui_x11.c
|
Files: src/gui_x11.c
|
||||||
|
|
||||||
Patch 6.1.096
|
Patch 6.1.096
|
||||||
Problem: When erasing the right halve of a double-byte character, it may
|
Problem: When erasing the right half of a double-byte character, it may
|
||||||
cause further characters to be erased. (Yasuhiro Matsumoto)
|
cause further characters to be erased. (Yasuhiro Matsumoto)
|
||||||
Solution: Make sure only one character is erased.
|
Solution: Make sure only one character is erased.
|
||||||
Files: src/screen.c
|
Files: src/screen.c
|
||||||
@@ -8982,7 +8982,7 @@ Files: src/buffer.c
|
|||||||
|
|
||||||
Patch 6.1.386
|
Patch 6.1.386
|
||||||
Problem: Get duplicate tags when running ":helptags".
|
Problem: Get duplicate tags when running ":helptags".
|
||||||
Solution: Do the other halve of moving a section to another help file.
|
Solution: Do the other half of moving a section to another help file.
|
||||||
Files: runtime/tagsrch.txt
|
Files: runtime/tagsrch.txt
|
||||||
|
|
||||||
Patch 6.1.387 (depends on 6.1.373)
|
Patch 6.1.387 (depends on 6.1.373)
|
||||||
|
@@ -2762,7 +2762,7 @@ number following the file name.
|
|||||||
Added 'guitabtooltip'. Implemented for Win32 (Yegappan Lakshmanan).
|
Added 'guitabtooltip'. Implemented for Win32 (Yegappan Lakshmanan).
|
||||||
|
|
||||||
Added "throw" to 'debug' option: throw an exception for error messages even
|
Added "throw" to 'debug' option: throw an exception for error messages even
|
||||||
whey they would otherwise be ignored.
|
when they would otherwise be ignored.
|
||||||
|
|
||||||
When 'keymap' is set and a line contains an invalid entry could get a "No
|
When 'keymap' is set and a line contains an invalid entry could get a "No
|
||||||
mapping found" warning instead of a proper error message.
|
mapping found" warning instead of a proper error message.
|
||||||
@@ -3859,7 +3859,7 @@ Solution: Set ins_need_undo after using 'formatexpr'.
|
|||||||
Files: src/edit.c
|
Files: src/edit.c
|
||||||
|
|
||||||
Patch 7.0.127
|
Patch 7.0.127
|
||||||
Problem: Crash when swap files has invalid timestamp.
|
Problem: Crash when swap file has invalid timestamp.
|
||||||
Solution: Check return value of ctime() for being NULL.
|
Solution: Check return value of ctime() for being NULL.
|
||||||
Files: src/memline.c
|
Files: src/memline.c
|
||||||
|
|
||||||
@@ -6757,9 +6757,9 @@ Solution: Use separate buffer for posix path. (Ben Schmidt)
|
|||||||
Files: src/os_unix.c
|
Files: src/os_unix.c
|
||||||
|
|
||||||
Patch 7.1.329
|
Patch 7.1.329
|
||||||
Problem: When the popup menu is removed a column of cells, the right halve
|
Problem: When the popup menu is removed a column of cells, the right half
|
||||||
of double-wide characters, may not be redrawn.
|
of double-wide characters, may not be redrawn.
|
||||||
Solution: Check if the right halve of a character needs to be redrawn.
|
Solution: Check if the right half of a character needs to be redrawn.
|
||||||
(Yukihiro Nakadaira)
|
(Yukihiro Nakadaira)
|
||||||
Files: src/screen.c
|
Files: src/screen.c
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Aug 01
|
*vim9.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -70,10 +70,10 @@ comments start with #. >
|
|||||||
let count = 0 # number of occurrences
|
let count = 0 # number of occurrences
|
||||||
|
|
||||||
The reason is that a double quote can also be the start of a string. In many
|
The reason is that a double quote can also be the start of a string. In many
|
||||||
places, especially halfway an expression with a line break, it's hard to tell
|
places, especially halfway through an expression with a line break, it's hard
|
||||||
what the meaning is, since both a string and a comment can be followed by
|
to tell what the meaning is, since both a string and a comment can be followed
|
||||||
arbitrary text. To avoid confusion only # comments are recognized. This is
|
by arbitrary text. To avoid confusion only # comments are recognized. This
|
||||||
the same as in shell scripts and Python programs.
|
is the same as in shell scripts and Python programs.
|
||||||
|
|
||||||
In Vi # is a command to list text with numbers. In Vim9 script you can use
|
In Vi # is a command to list text with numbers. In Vim9 script you can use
|
||||||
`:number` for that. >
|
`:number` for that. >
|
||||||
@@ -104,11 +104,11 @@ The argument types and return type need to be specified. The "any" type can
|
|||||||
be used, type checking will then be done at runtime, like with legacy
|
be used, type checking will then be done at runtime, like with legacy
|
||||||
functions.
|
functions.
|
||||||
|
|
||||||
Arguments are accessed by name, without "a:". There is no "a:" dictionary or
|
Arguments are accessed by name, without "a:", just like any other language.
|
||||||
"a:000" list. Just like any other language.
|
There is no "a:" dictionary or "a:000" list.
|
||||||
|
|
||||||
Variable arguments are defined as the last argument, with a name and have a
|
Variable arguments are defined as the last argument, with a name and have a
|
||||||
list type, similar to Typescript. For example, a list of numbers: >
|
list type, similar to TypeScript. For example, a list of numbers: >
|
||||||
def MyFunc(...itemlist: list<number>)
|
def MyFunc(...itemlist: list<number>)
|
||||||
for item in itemlist
|
for item in itemlist
|
||||||
...
|
...
|
||||||
@@ -142,7 +142,7 @@ The result is that functions and variables without a namespace can usually be
|
|||||||
found in the script, either defined there or imported. Global functions and
|
found in the script, either defined there or imported. Global functions and
|
||||||
variables could be defined anywhere (good luck finding out where!).
|
variables could be defined anywhere (good luck finding out where!).
|
||||||
|
|
||||||
Global functions can be still be defined and deleted at nearly any time. In
|
Global functions can still be defined and deleted at nearly any time. In
|
||||||
Vim9 script script-local functions are defined once when the script is sourced
|
Vim9 script script-local functions are defined once when the script is sourced
|
||||||
and cannot be deleted or replaced.
|
and cannot be deleted or replaced.
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ identifier or can't be an Ex command. Examples: >
|
|||||||
'foobar'->Process()
|
'foobar'->Process()
|
||||||
('foobar')->Process()
|
('foobar')->Process()
|
||||||
|
|
||||||
In rare case there is ambiguity between a function name and an Ex command,
|
In the rare case there is ambiguity between a function name and an Ex command,
|
||||||
prepend ":" to make clear you want to use the Ex command. For example, there
|
prepend ":" to make clear you want to use the Ex command. For example, there
|
||||||
is both the `:substitute` command and the `substitute()` function. When the
|
is both the `:substitute` command and the `substitute()` function. When the
|
||||||
line starts with `substitute(` this will use the function. Prepend a colon to
|
line starts with `substitute(` this will use the function. Prepend a colon to
|
||||||
@@ -240,8 +240,8 @@ use the command instead: >
|
|||||||
:substitute(pattern (replacement (
|
:substitute(pattern (replacement (
|
||||||
|
|
||||||
Note that while variables need to be defined before they can be used,
|
Note that while variables need to be defined before they can be used,
|
||||||
functions can be called before being defined. This is required to be able
|
functions can be called before being defined. This is required to allow
|
||||||
have cyclic dependencies between functions. It is slightly less efficient,
|
for cyclic dependencies between functions. It is slightly less efficient,
|
||||||
since the function has to be looked up by name. And a typo in the function
|
since the function has to be looked up by name. And a typo in the function
|
||||||
name will only be found when the function is called.
|
name will only be found when the function is called.
|
||||||
|
|
||||||
@@ -394,7 +394,7 @@ White space is not allowed:
|
|||||||
|
|
||||||
Conditions and expressions ~
|
Conditions and expressions ~
|
||||||
|
|
||||||
Conditions and expression are mostly working like they do in JavaScript. A
|
Conditions and expressions are mostly working like they do in JavaScript. A
|
||||||
difference is made where JavaScript does not work like most people expect.
|
difference is made where JavaScript does not work like most people expect.
|
||||||
Specifically, an empty list is falsey.
|
Specifically, an empty list is falsey.
|
||||||
|
|
||||||
@@ -429,13 +429,19 @@ The boolean operators "||" and "&&" do not change the value: >
|
|||||||
When using `..` for string concatenation arguments of simple types are always
|
When using `..` for string concatenation arguments of simple types are always
|
||||||
converted to string. >
|
converted to string. >
|
||||||
'hello ' .. 123 == 'hello 123'
|
'hello ' .. 123 == 'hello 123'
|
||||||
'hello ' .. v:true == 'hello true'
|
'hello ' .. v:true == 'hello v:true'
|
||||||
|
|
||||||
Simple types are string, float, special and bool. For other types |string()|
|
Simple types are string, float, special and bool. For other types |string()|
|
||||||
can be used.
|
can be used.
|
||||||
|
|
||||||
In Vim9 script one can use "true" for v:true and "false" for v:false.
|
In Vim9 script one can use "true" for v:true and "false" for v:false.
|
||||||
|
|
||||||
|
Indexing a string with [idx] or [idx, idx] uses character indexes instead of
|
||||||
|
byte indexes. Example: >
|
||||||
|
echo 'bár'[1]
|
||||||
|
In legacy script this results in the character 0xc3 (an illegal byte), in Vim9
|
||||||
|
script this results in the string 'á'.
|
||||||
|
|
||||||
|
|
||||||
What to watch out for ~
|
What to watch out for ~
|
||||||
*vim9-gotchas*
|
*vim9-gotchas*
|
||||||
@@ -494,7 +500,7 @@ For a workaround, split it in two functions: >
|
|||||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||||
|
|
||||||
*:def*
|
*:def*
|
||||||
:def[!] {name}([arguments])[: {return-type}
|
:def[!] {name}([arguments])[: {return-type}]
|
||||||
Define a new function by the name {name}. The body of
|
Define a new function by the name {name}. The body of
|
||||||
the function follows in the next lines, until the
|
the function follows in the next lines, until the
|
||||||
matching `:enddef`.
|
matching `:enddef`.
|
||||||
@@ -789,7 +795,7 @@ actually needed. A recommended mechanism:
|
|||||||
|
|
||||||
< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
|
< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
|
||||||
|
|
||||||
2. In the autocommand script do the actual work. You can import items from
|
2. In the autoload script do the actual work. You can import items from
|
||||||
other files to split up functionality in appropriate pieces. >
|
other files to split up functionality in appropriate pieces. >
|
||||||
vim9script
|
vim9script
|
||||||
import FilterFunc from "../import/someother.vim"
|
import FilterFunc from "../import/someother.vim"
|
||||||
@@ -824,7 +830,7 @@ namespace will be used for the imported item, even when "s:" is not specified.
|
|||||||
|
|
||||||
The :def command ~
|
The :def command ~
|
||||||
|
|
||||||
Plugin writers have asked for a much faster Vim script. Investigation have
|
Plugin writers have asked for a much faster Vim script. Investigations have
|
||||||
shown that keeping the existing semantics of function calls make this close to
|
shown that keeping the existing semantics of function calls make this close to
|
||||||
impossible, because of the overhead involved with calling a function, setting
|
impossible, because of the overhead involved with calling a function, setting
|
||||||
up the local function scope and executing lines. There are many details that
|
up the local function scope and executing lines. There are many details that
|
||||||
@@ -854,7 +860,7 @@ an "add number" instruction can be used, which is faster. The error can be
|
|||||||
given at compile time, no error handling is needed at runtime.
|
given at compile time, no error handling is needed at runtime.
|
||||||
|
|
||||||
The syntax for types is similar to Java, since it is easy to understand and
|
The syntax for types is similar to Java, since it is easy to understand and
|
||||||
widely used. The type names are what was used in Vim before, with some
|
widely used. The type names are what were used in Vim before, with some
|
||||||
additions such as "void" and "bool".
|
additions such as "void" and "bool".
|
||||||
|
|
||||||
|
|
||||||
@@ -905,7 +911,7 @@ are doing. Some details are unexpected and can be fixed. For example how the
|
|||||||
...
|
...
|
||||||
return result || 0 " returns 1
|
return result || 0 " returns 1
|
||||||
|
|
||||||
Vim9 script works like JavaScript/Typescript, keep the value: >
|
Vim9 script works like JavaScript/TypeScript, keep the value: >
|
||||||
let result = 44
|
let result = 44
|
||||||
...
|
...
|
||||||
return result || 0 " returns 44
|
return result || 0 " returns 44
|
||||||
@@ -922,7 +928,7 @@ A problem of legacy Vim script is that by default all functions and variables
|
|||||||
are global. It is possible to make them script-local, but then they are not
|
are global. It is possible to make them script-local, but then they are not
|
||||||
available in other scripts.
|
available in other scripts.
|
||||||
|
|
||||||
In Vim9 script a mechanism very similar to the Javascript import and export
|
In Vim9 script a mechanism very similar to the JavaScript import and export
|
||||||
mechanism is supported. It is a variant to the existing `:source` command
|
mechanism is supported. It is a variant to the existing `:source` command
|
||||||
that works like one would expect:
|
that works like one would expect:
|
||||||
- Instead of making everything global by default, everything is script-local,
|
- Instead of making everything global by default, everything is script-local,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*windows.txt* For Vim version 8.2. Last change: 2020 May 10
|
*windows.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -1112,7 +1112,9 @@ list of buffers. |unlisted-buffer|
|
|||||||
<
|
<
|
||||||
*:bad* *:badd*
|
*:bad* *:badd*
|
||||||
:bad[d] [+lnum] {fname}
|
:bad[d] [+lnum] {fname}
|
||||||
Add file name {fname} to the buffer list, without loading it.
|
Add file name {fname} to the buffer list, without loading it,
|
||||||
|
if it wasn't listed yet. If the buffer was previously
|
||||||
|
deleted, not wiped, it will be made listed again.
|
||||||
If "lnum" is specified, the cursor will be positioned at that
|
If "lnum" is specified, the cursor will be positioned at that
|
||||||
line when the buffer is first entered. Note that other
|
line when the buffer is first entered. Note that other
|
||||||
commands after the + will be ignored.
|
commands after the + will be ignored.
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
" Language: cobol
|
" Language: cobol
|
||||||
" Maintainer: Ankit Jain <ajatkj@yahoo.co.in>
|
" Maintainer: Ankit Jain <ajatkj@yahoo.co.in>
|
||||||
" (formerly Tim Pope <vimNOSPAM@tpope.info>)
|
" (formerly Tim Pope <vimNOSPAM@tpope.info>)
|
||||||
" Last Update: By Ankit Jain (changed maintainer) on 22.03.2019
|
" Last Update: By Ankit Jain (add gtk support) on 15.08.2020
|
||||||
|
|
||||||
" Insert mode mappings: <C-T> <C-D> <Tab>
|
" Insert mode mappings: <C-T> <C-D> <Tab>
|
||||||
" Normal mode mappings: < > << >> [[ ]] [] ][
|
" Normal mode mappings: < > << >> [[ ]] [] ][
|
||||||
@@ -37,7 +37,8 @@ if exists("loaded_matchit")
|
|||||||
\ '-\@<!\<\%(delete\|rewrite\|start\|write\|read\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>:\<end-\%(delete\|rewrite\|start\|write\|read\)\>' .s:ordot
|
\ '-\@<!\<\%(delete\|rewrite\|start\|write\|read\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>:\<end-\%(delete\|rewrite\|start\|write\|read\)\>' .s:ordot
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has("gui_win32") && !exists("b:browsefilter")
|
" add gtk support
|
||||||
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n".
|
let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n".
|
||||||
\ "All Files (*.*)\t*.*\n"
|
\ "All Files (*.*)\t*.*\n"
|
||||||
endif
|
endif
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: CSS
|
" Language: CSS
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Latest Revision: 2008-07-09
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
|
" Latest Revision: 2008-07-09
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
|
39
runtime/ftplugin/typescript.vim
Normal file
39
runtime/ftplugin/typescript.vim
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: TypeScript
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2019 Aug 30
|
||||||
|
|
||||||
|
if exists("b:did_ftplugin")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
" Set 'formatoptions' to break comment lines but not other lines,
|
||||||
|
" and insert the comment leader when hitting <CR> or using "o".
|
||||||
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
|
|
||||||
|
" Set 'comments' to format dashed lists in comments.
|
||||||
|
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||||
|
|
||||||
|
setlocal commentstring=//%s
|
||||||
|
|
||||||
|
setlocal suffixesadd+=.ts,.d.ts,.tsx,.js,.jsx,.cjs,.mjs
|
||||||
|
|
||||||
|
" Change the :browse e filter to primarily show TypeScript-related files.
|
||||||
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
|
let b:browsefilter="TypeScript Files (*.ts)\t*.ts\n" .
|
||||||
|
\ "TypeScript Declaration Files (*.d.ts)\t*.d.ts\n" .
|
||||||
|
\ "TSX Files (*.tsx)\t*.tsx\n" .
|
||||||
|
\ "JavaScript Files (*.js)\t*.js\n" .
|
||||||
|
\ "JavaScript Modules (*.es, *.cjs, *.mjs)\t*.es;*.cjs;*.mjs\n" .
|
||||||
|
\ "JSON Files (*.json)\t*.json\n" .
|
||||||
|
\ "All Files (*.*)\t*.*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:undo_ftplugin = "setl fo< com< cms< sua< | unlet! b:browsefilter"
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
33
runtime/ftplugin/typescriptreact.vim
Normal file
33
runtime/ftplugin/typescriptreact.vim
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: TypeScript React
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2020 Aug 09
|
||||||
|
|
||||||
|
let s:match_words = ""
|
||||||
|
let s:undo_ftplugin = ""
|
||||||
|
|
||||||
|
runtime! ftplugin/typescript.vim
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
if exists("b:match_words")
|
||||||
|
let s:match_words = b:match_words
|
||||||
|
endif
|
||||||
|
if exists("b:undo_ftplugin")
|
||||||
|
let s:undo_ftplugin = b:undo_ftplugin
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Matchit configuration
|
||||||
|
if exists("loaded_matchit")
|
||||||
|
let b:match_ignorecase = 0
|
||||||
|
let b:match_words = s:match_words .
|
||||||
|
\ '<:>,' .
|
||||||
|
\ '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,' .
|
||||||
|
\ '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>'
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase | " . s:undo_ftplugin
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
@@ -1,7 +1,7 @@
|
|||||||
" Vim filetype plugin
|
" Vim filetype plugin
|
||||||
" Language: Vim
|
" Language: Vim
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2020 Jul 26
|
" Last Change: 2020 Aug 14
|
||||||
|
|
||||||
" Only do this when not done yet for this buffer
|
" Only do this when not done yet for this buffer
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
@@ -49,7 +49,8 @@ setlocal isk+=#
|
|||||||
setlocal keywordprg=:help
|
setlocal keywordprg=:help
|
||||||
|
|
||||||
" Set 'comments' to format dashed lists in comments
|
" Set 'comments' to format dashed lists in comments
|
||||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",:#
|
" Avoid that #{} starts a comment.
|
||||||
|
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:#
|
||||||
|
|
||||||
" Format comments to be up to 78 characters long
|
" Format comments to be up to 78 characters long
|
||||||
if &tw == 0
|
if &tw == 0
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types in scripts
|
" Vim support file to detect file types in scripts
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last change: 2020 Jun 07
|
" Last change: 2020 Aug 15
|
||||||
|
|
||||||
" This file is called by an autocommand for every file that has just been
|
" This file is called by an autocommand for every file that has just been
|
||||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||||
@@ -150,7 +150,7 @@ if s:line1 =~# "^#!"
|
|||||||
elseif s:name =~# 'ocaml'
|
elseif s:name =~# 'ocaml'
|
||||||
set ft=ocaml
|
set ft=ocaml
|
||||||
|
|
||||||
" Awk scripts
|
" Awk scripts; also finds "gawk"
|
||||||
elseif s:name =~# 'awk\>'
|
elseif s:name =~# 'awk\>'
|
||||||
set ft=awk
|
set ft=awk
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C
|
" Language: C
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2019 Nov 29
|
" Last Change: 2020 Aug 11
|
||||||
|
|
||||||
" Quit when a (custom) syntax file was already loaded
|
" Quit when a (custom) syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -272,7 +272,8 @@ if exists("c_gnu")
|
|||||||
syn keyword cType __label__ __complex__ __volatile__
|
syn keyword cType __label__ __complex__ __volatile__
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syn keyword cStructure struct union enum typedef
|
syn keyword cTypedef typedef
|
||||||
|
syn keyword cStructure struct union enum
|
||||||
syn keyword cStorageClass static register auto volatile extern const
|
syn keyword cStorageClass static register auto volatile extern const
|
||||||
if exists("c_gnu")
|
if exists("c_gnu")
|
||||||
syn keyword cStorageClass inline __attribute__
|
syn keyword cStorageClass inline __attribute__
|
||||||
@@ -311,8 +312,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
|||||||
if exists("c_gnu")
|
if exists("c_gnu")
|
||||||
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__
|
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__
|
||||||
endif
|
endif
|
||||||
syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__
|
syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ __STDC_VERSION__ __STDC_HOSTED__
|
||||||
syn keyword cConstant __STDC_VERSION__
|
|
||||||
syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX
|
syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX
|
||||||
syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
|
syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
|
||||||
syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN
|
syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN
|
||||||
@@ -475,6 +475,7 @@ hi def link cSpecialError cError
|
|||||||
hi def link cCurlyError cError
|
hi def link cCurlyError cError
|
||||||
hi def link cOperator Operator
|
hi def link cOperator Operator
|
||||||
hi def link cStructure Structure
|
hi def link cStructure Structure
|
||||||
|
hi def link cTypedef Structure
|
||||||
hi def link cStorageClass StorageClass
|
hi def link cStorageClass StorageClass
|
||||||
hi def link cInclude Include
|
hi def link cInclude Include
|
||||||
hi def link cPreProc PreProc
|
hi def link cPreProc PreProc
|
||||||
|
Reference in New Issue
Block a user