mirror of
https://github.com/vim/vim
synced 2025-07-31 10:51:52 +00:00
Compare commits
260 Commits
Author | SHA1 | Date | |
---|---|---|---|
232f4612e2 | |||
5e1f22ff61 | |||
c56936e2ba | |||
f883508e36 | |||
ea696852e7 | |||
8cebd43e97 | |||
59d8e56e04 | |||
cbcd9cbd77 | |||
46f479c756 | |||
faebda8cc1 | |||
927495b1fe | |||
32e5ec0b01 | |||
85d9b03f84 | |||
22286895fc | |||
0fd797eacd | |||
3132cddd20 | |||
00806bceb6 | |||
b885b435d1 | |||
fabc3ca896 | |||
b4d16cb11d | |||
66669fc664 | |||
f65b35b446 | |||
631e8f9345 | |||
c7f7f6db3e | |||
64ffa9b5fb | |||
9c13f76275 | |||
348be7ed07 | |||
4778b4d0e1 | |||
c136a3528b | |||
35efa22ff2 | |||
0d90e728fe | |||
6fd3a4ba23 | |||
36113e46b4 | |||
dbfa795d8b | |||
399db046ed | |||
97a19005e1 | |||
3b6d57f2ce | |||
a46765a797 | |||
645cd3eb1f | |||
388908352f | |||
578f4cc7d0 | |||
e88c8e802c | |||
55e29611d2 | |||
963734e316 | |||
fbcbffe1ad | |||
749bc9521d | |||
0289065e41 | |||
cd030c4b60 | |||
d66960bf57 | |||
b2620202c7 | |||
6d967125ad | |||
086fc9a585 | |||
4f6b6ed208 | |||
185577e47e | |||
dcdd42a8cc | |||
cf4d454df0 | |||
28ee892ac4 | |||
3e2534ed1a | |||
159563b439 | |||
171fb923b8 | |||
6cf7e3b026 | |||
b4bcea474d | |||
70cf45810c | |||
68a48ee55e | |||
977fd0b327 | |||
caf73dcfad | |||
cb80aa2d53 | |||
8133cc6bf4 | |||
c8970b9464 | |||
f9d51354de | |||
a360dbe3b6 | |||
4882d98339 | |||
89b693e562 | |||
37e4e03c67 | |||
e974fa7b2b | |||
4ff2f2fb6b | |||
02194d2bd5 | |||
67def64a4e | |||
e100440158 | |||
5661ed6c83 | |||
e1be11864d | |||
210681c509 | |||
f4c6e1e75c | |||
8ded5b647a | |||
9c24cd11e2 | |||
683581eb49 | |||
081db1a66d | |||
b07a39de48 | |||
e6e70a10f1 | |||
15ab48f088 | |||
371806e164 | |||
2733779a1a | |||
a1224cb706 | |||
4ce5fe4c87 | |||
c58f5456e5 | |||
692d1a51e7 | |||
af7a9066a9 | |||
ca17453e73 | |||
8a99e66b4f | |||
b8f519e538 | |||
94738d8fab | |||
3da855c8e2 | |||
b53e13a91a | |||
20d89e0ac6 | |||
e9f9f16387 | |||
c95940c06a | |||
39ca4127a0 | |||
955347cc7e | |||
9a13e185e5 | |||
80b0e5ea11 | |||
66fa5fd54f | |||
1dcae59957 | |||
334a8b4bde | |||
e3c65ce4e5 | |||
2ea79ad835 | |||
a2c026d0fd | |||
335e671322 | |||
352134bbfb | |||
403dc31f5a | |||
218450ad5e | |||
9668cc57a1 | |||
e13bdec6b9 | |||
1e021e63c5 | |||
7a66a17190 | |||
ffdf8adfa8 | |||
27491cd3ef | |||
a604ccc959 | |||
ed234f24f3 | |||
74f8eece5e | |||
209f0208f7 | |||
fbbcd00367 | |||
8d739de43b | |||
3d30af8783 | |||
b9616af23f | |||
21cbe175ee | |||
2b9b17ea5d | |||
f4e8cdd3d2 | |||
fc8aa6d02d | |||
93be1644db | |||
c07b7f701f | |||
62cd26a229 | |||
6eb36ade98 | |||
efc0d94afc | |||
204ade6bcb | |||
aab9fada4a | |||
ef16c90423 | |||
4f4d51a942 | |||
c6ed254d9f | |||
bd6428b9e7 | |||
1b1e9df78b | |||
10a1a534d1 | |||
9becdf2b98 | |||
d747548c66 | |||
fcdc5d83fb | |||
28f224b2c1 | |||
f57497276b | |||
1a73923705 | |||
820d55a50b | |||
85d5e2b723 | |||
8956023920 | |||
e8211a33dc | |||
11416321ff | |||
6a61421f64 | |||
922acbda3d | |||
10c65860f8 | |||
0876c78527 | |||
9a033d7b18 | |||
d7e5e9430a | |||
4e2114e988 | |||
f12f0022e6 | |||
349f609f89 | |||
253b16a4ab | |||
80361a5f2b | |||
50c4e9e08f | |||
afe8cf6170 | |||
44aefffaad | |||
55b419b871 | |||
dda749ce85 | |||
d1ad99b654 | |||
1310660557 | |||
6abd3dc257 | |||
7b5d544269 | |||
2bb2658bef | |||
92f26c256e | |||
c8fe645c19 | |||
588d241d44 | |||
1bdae40323 | |||
794771cfd8 | |||
c1f0066b64 | |||
016faaa1b2 | |||
795aaa1e84 | |||
8a9bc95eae | |||
3f974ff45e | |||
fa79be6b10 | |||
bdf931c25b | |||
74273e6691 | |||
4537bcc889 | |||
668008be66 | |||
0022675aa3 | |||
5366e1aecf | |||
55759b5228 | |||
17bb4d4607 | |||
8ec92c9779 | |||
32fbc4f247 | |||
1b9129809d | |||
f43e7ac4ee | |||
391c362794 | |||
d569a9e746 | |||
4934ad0e44 | |||
d58a3bf7da | |||
b45cd36bd9 | |||
727345ebea | |||
7a9cbca00a | |||
9830938e77 | |||
06f9c6940a | |||
6c542f77eb | |||
d0e1b7103c | |||
ac564082f1 | |||
2914a20abc | |||
37ce6d3a6a | |||
5597ba0467 | |||
a5fe91e6dc | |||
cfcd011fcd | |||
c0e29010f6 | |||
8c7ad3631a | |||
f6a44f714a | |||
daff0fb738 | |||
bade44e5ca | |||
3697c9bbae | |||
c70bdab0b8 | |||
f3c51bbff1 | |||
8f187fc630 | |||
373863ed48 | |||
d47f50b331 | |||
30fd8204ce | |||
273af497ca | |||
7e9210ea53 | |||
6a33ef0deb | |||
58dbef330c | |||
9c4f55204f | |||
509f8031b2 | |||
10476521f5 | |||
531be47ac5 | |||
851d108313 | |||
148ce7ae62 | |||
4ee711f213 | |||
6bf1b52ba2 | |||
81ed496048 | |||
04bdd573d0 | |||
189832bf66 | |||
c53e9c57a9 | |||
99ca9c4868 | |||
4f73b8e9cc | |||
44aaf5416e | |||
971caf53b8 | |||
280227270c | |||
dbd759309b | |||
7f9c9c51a3 | |||
078269bdce | |||
10e4f12bf4 |
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@ -38,6 +38,7 @@ runtime/compiler/jest.vim @dkearns
|
||||
runtime/compiler/jjs.vim @dkearns
|
||||
runtime/compiler/jshint.vim @dkearns
|
||||
runtime/compiler/jsonlint.vim @dkearns
|
||||
runtime/compiler/lazbuild.vim @dkearns
|
||||
runtime/compiler/php.vim @dkearns
|
||||
runtime/compiler/rake.vim @tpope @dkearns
|
||||
runtime/compiler/rhino.vim @dkearns
|
||||
@ -47,6 +48,7 @@ runtime/compiler/ruby.vim @tpope @dkearns
|
||||
runtime/compiler/rubyunit.vim @dkearns
|
||||
runtime/compiler/sass.vim @tpope
|
||||
runtime/compiler/se.vim @dkearns
|
||||
runtime/compiler/shellcheck.vim @dkearns
|
||||
runtime/compiler/stylelint.vim @dkearns
|
||||
runtime/compiler/tcl.vim @dkearns
|
||||
runtime/compiler/tidy.vim @dkearns
|
||||
@ -61,6 +63,7 @@ runtime/doc/pi_netrw.txt @cecamp
|
||||
runtime/doc/pi_tar.txt @cecamp
|
||||
runtime/doc/pi_vimball.txt @cecamp
|
||||
runtime/doc/pi_zip.txt @cecamp
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
runtime/ftplugin/css.vim @dkearns
|
||||
runtime/ftplugin/cucumber.vim @tpope
|
||||
@ -105,6 +108,9 @@ runtime/plugin/tarPlugin.vim @cecamp
|
||||
runtime/plugin/vimballPlugin.vim @cecamp
|
||||
runtime/plugin/zipPlugin.vim @cecamp
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
runtime/syntax/asm.vim @dkearns
|
||||
runtime/syntax/asmh8300.vim @dkearns
|
||||
runtime/syntax/awk.vim @dkearns
|
||||
runtime/syntax/bst.vim @tpope
|
||||
runtime/syntax/csh.vim @cecamp
|
||||
runtime/syntax/cucumber.vim @tpope
|
||||
|
11
.github/workflows/ci-windows.yaml
vendored
11
.github/workflows/ci-windows.yaml
vendored
@ -3,7 +3,7 @@ name: GitHub CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
- '**'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
@ -39,6 +39,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain: [msvc, mingw]
|
||||
arch: [x64, x86]
|
||||
@ -74,8 +75,8 @@ jobs:
|
||||
git config --global core.autocrlf input
|
||||
python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
|
||||
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
|
||||
echo "::set-env name=PYTHON_DIR::$python_dir"
|
||||
echo "::set-env name=PYTHON3_DIR::$python3_dir"
|
||||
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
|
||||
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
if: matrix.toolchain == 'mingw'
|
||||
@ -212,9 +213,9 @@ jobs:
|
||||
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
|
||||
cd ..\src2\testdir
|
||||
:: Wait about 10 minutes.
|
||||
for /L %%i in (1,1,600) do (
|
||||
for /L %%i in (1,1,60) do (
|
||||
if exist done.txt goto exitloop
|
||||
ping -n 2 localhost > nul
|
||||
timeout 10
|
||||
)
|
||||
set timeout=1
|
||||
:exitloop
|
||||
|
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 18 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['cpp', 'python']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
1
Filelist
1
Filelist
@ -10,6 +10,7 @@ SRC_ALL = \
|
||||
.travis.yml \
|
||||
.cirrus.yml \
|
||||
.github/workflows/ci-windows.yaml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/CODEOWNERS \
|
||||
appveyor.yml \
|
||||
ci/appveyor.bat \
|
||||
|
@ -80,7 +80,7 @@ e.g. each stack item is a typeval_T. And one of the instructions is
|
||||
"execute Ex command", for commands that are not compiled.
|
||||
|
||||
|
||||
## 2. PHASING OUT INTERFACES
|
||||
## 2. DEPRIORITIZE INTERFACES
|
||||
|
||||
Attempts have been made to implement functionality with built-in script
|
||||
languages such as Python, Perl, Lua, Tcl and Ruby. This never gained much
|
||||
|
@ -7,7 +7,7 @@
|
||||
# fileencoding : UTF-8
|
||||
# Author : Restorer
|
||||
|
||||
!insertmacro MUI_LANGUAGE "Русский"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
|
||||
|
||||
# Overwrite the default translation.
|
||||
|
@ -1,7 +1,8 @@
|
||||
"python3complete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Maintainer: <vacancy>
|
||||
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009 (small fix 2015 Sep 14 from Debian)
|
||||
" Last Updated: 2020 Oct 9
|
||||
"
|
||||
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
|
||||
"
|
||||
@ -83,7 +84,7 @@ function! python3complete#Complete(findstart, base)
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
execute "py3 vimpy3complete('" . cword . "', '" . a:base . "')"
|
||||
execute "py3 vimpy3complete('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
|
||||
return g:python3complete_completions
|
||||
endif
|
||||
endfunction
|
||||
|
@ -1,7 +1,8 @@
|
||||
"pythoncomplete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Maintainer: <vacancy>
|
||||
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009
|
||||
" Last Updated: 2020 Oct 9
|
||||
"
|
||||
" Changes
|
||||
" TODO:
|
||||
@ -81,7 +82,7 @@ function! pythoncomplete#Complete(findstart, base)
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
execute "python vimcomplete('" . cword . "', '" . a:base . "')"
|
||||
execute "python vimcomplete('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
|
||||
return g:pythoncomplete_completions
|
||||
endif
|
||||
endfunction
|
||||
|
@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jan 07, 2020
|
||||
" Version: 30
|
||||
" Version: 31
|
||||
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
|
||||
@ -20,7 +20,7 @@
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v30"
|
||||
let g:loaded_zip= "v31"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of zip needs vim 7.2 or later"
|
||||
@ -65,7 +65,7 @@ endif
|
||||
" zip#Browse: {{{2
|
||||
fun! zip#Browse(zipfile)
|
||||
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
|
||||
" sanity check: ensure that the zipfile has "PK" as its first two letters
|
||||
" sanity check: insure that the zipfile has "PK" as its first two letters
|
||||
" (zipped files have a leading PK as a "magic cookie")
|
||||
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
|
||||
exe "noswapfile noautocmd noswapfile e ".fnameescape(a:zipfile)
|
||||
|
@ -67,7 +67,7 @@ You can use ":highlight" to find out the current colors. Exception: the
|
||||
ctermfg and ctermbg values are numbers, which are only valid for the current
|
||||
terminal. Use the color names instead. See ":help cterm-colors".
|
||||
|
||||
The default color settings can be found in the source file src/syntax.c.
|
||||
The default color settings can be found in the source file src/highlight.c.
|
||||
Search for "highlight_init".
|
||||
|
||||
If you think you have a color scheme that is good enough to be used by others,
|
||||
|
25
runtime/compiler/shellcheck.vim
Normal file
25
runtime/compiler/shellcheck.vim
Normal file
@ -0,0 +1,25 @@
|
||||
" Vim compiler file
|
||||
" Compiler: ShellCheck
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "shellcheck"
|
||||
|
||||
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=shellcheck\ -f\ gcc
|
||||
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m\ [SC%n],
|
||||
\%f:%l:%c:\ %tarning:\ %m\ [SC%n],
|
||||
\%f:%l:%c:\ %tote:\ %m\ [SC%n],
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
@ -1,7 +1,7 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2019 Oct 27
|
||||
" Last change: 2020 Sep 30
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
" Except when Vim is run with "-u NONE" or "-C".
|
||||
@ -85,17 +85,6 @@ if has('mouse')
|
||||
endif
|
||||
endif
|
||||
|
||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||
" GUI (which always has colors).
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
" Revert with ":syntax off".
|
||||
syntax on
|
||||
|
||||
" I like highlighting strings inside C comments.
|
||||
" Revert with ":unlet c_comment_strings".
|
||||
let c_comment_strings=1
|
||||
endif
|
||||
|
||||
" Only do this part when Vim was compiled with the +eval feature.
|
||||
if 1
|
||||
|
||||
@ -124,6 +113,17 @@ if 1
|
||||
|
||||
endif
|
||||
|
||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||
" GUI (which always has colors).
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
" Revert with ":syntax off".
|
||||
syntax on
|
||||
|
||||
" I like highlighting strings inside C comments.
|
||||
" Revert with ":unlet c_comment_strings".
|
||||
let c_comment_strings=1
|
||||
endif
|
||||
|
||||
" Convenient command to see the difference between the current buffer and the
|
||||
" file it was loaded from, thus the changes you made.
|
||||
" Only define it when not defined already.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Aug 02
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Oct 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -278,7 +278,7 @@ Name triggered by ~
|
||||
|BufWinLeave| before a buffer is removed from a window
|
||||
|
||||
|BufUnload| before unloading a buffer
|
||||
|BufHidden| just after a buffer has become hidden
|
||||
|BufHidden| just before a buffer becomes hidden
|
||||
|BufNew| just after creating a new buffer
|
||||
|
||||
|SwapExists| detected an existing swap file
|
||||
@ -631,7 +631,7 @@ CompleteDone After Insert mode completion is done. Either
|
||||
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
specified with 'updatetime'. Not re-triggered
|
||||
specified with 'updatetime'. Not triggered
|
||||
until the user has pressed a key (i.e. doesn't
|
||||
fire every 'updatetime' ms if you leave Vim to
|
||||
make some coffee. :) See |CursorHold-example|
|
||||
@ -881,9 +881,14 @@ InsertEnter Just before starting Insert mode. Also for
|
||||
The cursor is restored afterwards. If you do
|
||||
not want that set |v:char| to a non-empty
|
||||
string.
|
||||
*InsertLeavePre*
|
||||
InsertLeavePre Just before leaving Insert mode. Also when
|
||||
using CTRL-O |i_CTRL-O|. Be careful not to
|
||||
change mode or use `:normal`, it will likely
|
||||
cause trouble.
|
||||
*InsertLeave*
|
||||
InsertLeave When leaving Insert mode. Also when using
|
||||
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||
InsertLeave Just after leaving Insert mode. Also when
|
||||
using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||
*MenuPopup*
|
||||
MenuPopup Just before showing the popup menu (under the
|
||||
right mouse button). Useful for adjusting the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*change.txt* For Vim version 8.2. Last change: 2020 Nov 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1801,7 +1801,7 @@ Vim has a sorting function and a sorting command. The sorting function can be
|
||||
found here: |sort()|, |uniq()|.
|
||||
|
||||
*:sor* *:sort*
|
||||
:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/]
|
||||
:[range]sor[t][!] [b][f][i][l][n][o][r][u][x] [/{pattern}/]
|
||||
Sort lines in [range]. When no range is given all
|
||||
lines are sorted.
|
||||
|
||||
@ -1809,6 +1809,16 @@ found here: |sort()|, |uniq()|.
|
||||
|
||||
With [i] case is ignored.
|
||||
|
||||
With [l] sort uses the current collation locale.
|
||||
Implementation details: strcoll() is used to compare
|
||||
strings. See |:language| to check or set the collation
|
||||
locale. Example: >
|
||||
:language collate en_US.UTF-8
|
||||
:%sort l
|
||||
< |v:collate| can also used to check the current locale.
|
||||
Sorting using the locale typically ignores case.
|
||||
This does not work properly on Mac.
|
||||
|
||||
Options [n][f][x][o][b] are mutually exclusive.
|
||||
|
||||
With [n] sorting is done on the first decimal number
|
||||
@ -1875,8 +1885,7 @@ found here: |sort()|, |uniq()|.
|
||||
Note that using `:sort` with `:global` doesn't sort the matching lines, it's
|
||||
quite useless.
|
||||
|
||||
The details about sorting depend on the library function used. There is no
|
||||
guarantee that sorting obeys the current locale. You will have to try it out.
|
||||
`:sort` does not use the current locale unless the l flag is used.
|
||||
Vim does do a "stable" sort.
|
||||
|
||||
The sorting can be interrupted, but if you interrupt it too late in the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.2. Last change: 2020 Sep 03
|
||||
*channel.txt* For Vim version 8.2. Last change: 2020 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -965,6 +965,10 @@ job_status({job}) *job_status()* *E916*
|
||||
"fail", because a fork happens before the failure can be
|
||||
detected.
|
||||
|
||||
If in Vim9 script a variable is declared with type "job" but
|
||||
never assigned to, passing that variable to job_status()
|
||||
returns "fail".
|
||||
|
||||
If an exit callback was set with the "exit_cb" option and the
|
||||
job is now detected to be "dead" the callback will be invoked.
|
||||
|
||||
@ -1288,7 +1292,7 @@ prompt. >
|
||||
" Send the text to a shell with Enter appended.
|
||||
call ch_sendraw(g:shell_job, a:text .. "\n")
|
||||
endfunc
|
||||
|
||||
|
||||
" Function handling output from the shell: Added above the prompt.
|
||||
func GotOutput(channel, msg)
|
||||
call append(line("$") - 1, "- " . a:msg)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Aug 17
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Oct 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -73,10 +73,14 @@ g CTRL-G Prints the current position of the cursor in five
|
||||
ways: Column, Line, Word, Character and Byte. If the
|
||||
number of Characters and Bytes is the same then the
|
||||
Character position is omitted.
|
||||
|
||||
If there are characters in the line that take more
|
||||
than one position on the screen (<Tab> or special
|
||||
character), both the "real" column and the screen
|
||||
column are shown, separated with a dash.
|
||||
character), or characters using more than one byte per
|
||||
column (characters above 0x7F when 'encoding' is
|
||||
utf-8), both the byte column and the screen column are
|
||||
shown, separated by a dash.
|
||||
|
||||
Also see the 'ruler' option and the |wordcount()|
|
||||
function.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Sep 16
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -120,7 +120,7 @@ base, use |str2nr()|.
|
||||
|
||||
*TRUE* *FALSE* *Boolean*
|
||||
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
|
||||
You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
|
||||
You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
|
||||
When TRUE is returned from a function it is the Number one, FALSE is the
|
||||
number zero.
|
||||
|
||||
@ -133,7 +133,27 @@ non-zero number it means TRUE: >
|
||||
:" executed
|
||||
To test for a non-empty string, use empty(): >
|
||||
:if !empty("foo")
|
||||
<
|
||||
|
||||
< *falsy* *truthy*
|
||||
An expression can be used as a condition, ignoring the type and only using
|
||||
whether the value is "sort of true" or "sort of false". Falsy is:
|
||||
the number zero
|
||||
empty string, blob, list or dictionary
|
||||
Other values are truthy. Examples:
|
||||
0 falsy
|
||||
1 truthy
|
||||
-1 truthy
|
||||
0.0 falsy
|
||||
0.1 truthy
|
||||
'' falsy
|
||||
'x' truthy
|
||||
[] falsy
|
||||
[0] truthy
|
||||
{} falsy
|
||||
#{x: 1} truthy
|
||||
0z falsy
|
||||
0z00 truthy
|
||||
|
||||
*non-zero-arg*
|
||||
Function arguments often behave slightly different from |TRUE|: If the
|
||||
argument is present and it evaluates to a non-zero Number, |v:true| or a
|
||||
@ -877,10 +897,13 @@ Example: >
|
||||
All expressions within one level are parsed from left to right.
|
||||
|
||||
|
||||
expr1 *expr1* *E109*
|
||||
expr1 *expr1* *trinary* *falsy-operator* *??* *E109*
|
||||
-----
|
||||
|
||||
expr2 ? expr1 : expr1
|
||||
The trinary operator: expr2 ? expr1 : expr1
|
||||
The falsy operator: expr2 ?? expr1
|
||||
|
||||
Trinary operator ~
|
||||
|
||||
The expression before the '?' is evaluated to a number. If it evaluates to
|
||||
|TRUE|, the result is the value of the expression between the '?' and ':',
|
||||
@ -903,6 +926,23 @@ To keep this readable, using |line-continuation| is suggested: >
|
||||
You should always put a space before the ':', otherwise it can be mistaken for
|
||||
use in a variable such as "a:1".
|
||||
|
||||
Falsy operator ~
|
||||
|
||||
This is also known as the "null coalescing operator", but that's too
|
||||
complicated, thus we just call it the falsy operator.
|
||||
|
||||
The expression before the '??' is evaluated. If it evaluates to
|
||||
|truthy|, this is used as the result. Otherwise the expression after the '??'
|
||||
is evaluated and used as the result. This is most useful to have a default
|
||||
value for an expression that may result in zero or empty: >
|
||||
echo theList ?? 'list is empty'
|
||||
echo GetName() ?? 'unknown'
|
||||
|
||||
These are similar, but not equal: >
|
||||
expr2 ?? expr1
|
||||
expr2 ? expr2 : expr1
|
||||
In the second line "expr2" is evaluated twice.
|
||||
|
||||
|
||||
expr2 and expr3 *expr2* *expr3*
|
||||
---------------
|
||||
@ -2516,7 +2556,7 @@ getcmdtype() String return current command-line type
|
||||
getcmdwintype() String return current command-line window type
|
||||
getcompletion({pat}, {type} [, {filtered}])
|
||||
List list of cmdline completion matches
|
||||
getcurpos() List position of the cursor
|
||||
getcurpos([{winnr}]) List position of the cursor
|
||||
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
|
||||
getenv({name}) String return environment variable
|
||||
getfontname([{name}]) String name of font being used
|
||||
@ -2629,8 +2669,9 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]])
|
||||
rhs of mapping {name} in mode {mode}
|
||||
mapcheck({name} [, {mode} [, {abbr}]])
|
||||
String check for mappings matching {name}
|
||||
mapset({mode}, {abbr}, {dict})
|
||||
none restore mapping from |maparg()| result
|
||||
mapnew({expr1}, {expr2}) List/Dict like |map()| but creates a new List
|
||||
or Dictionary
|
||||
mapset({mode}, {abbr}, {dict}) none restore mapping from |maparg()| result
|
||||
match({expr}, {pat} [, {start} [, {count}]])
|
||||
Number position where {pat} matches in {expr}
|
||||
matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
|
||||
@ -2641,7 +2682,10 @@ matcharg({nr}) List arguments of |:match|
|
||||
matchdelete({id} [, {win}]) Number delete match identified by {id}
|
||||
matchend({expr}, {pat} [, {start} [, {count}]])
|
||||
Number position where {pat} ends in {expr}
|
||||
matchfuzzy({list}, {str}) List fuzzy match {str} in {list}
|
||||
matchfuzzy({list}, {str} [, {dict}])
|
||||
List fuzzy match {str} in {list}
|
||||
matchfuzzypos({list}, {str} [, {dict}])
|
||||
List fuzzy match {str} in {list}
|
||||
matchlist({expr}, {pat} [, {start} [, {count}]])
|
||||
List match and submatches of {pat} in {expr}
|
||||
matchstr({expr}, {pat} [, {start} [, {count}]])
|
||||
@ -2658,7 +2702,7 @@ mzeval({expr}) any evaluate |MzScheme| expression
|
||||
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
|
||||
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr}
|
||||
or({expr}, {expr}) Number bitwise OR
|
||||
pathshorten({expr}) String shorten directory names in a path
|
||||
pathshorten({expr} [, {len}]) String shorten directory names in a path
|
||||
perleval({expr}) any evaluate |Perl| expression
|
||||
popup_atcursor({what}, {options}) Number create popup window near the cursor
|
||||
popup_beval({what}, {options}) Number create popup window for 'ballooneval'
|
||||
@ -2703,7 +2747,7 @@ prop_type_change({name}, {props})
|
||||
none change an existing property type
|
||||
prop_type_delete({name} [, {props}])
|
||||
none delete a property type
|
||||
prop_type_get([{name} [, {props}]])
|
||||
prop_type_get({name} [, {props}])
|
||||
Dict get property type values
|
||||
prop_type_list([{props}]) List get list of property types
|
||||
pum_getpos() Dict position and size of pum if visible
|
||||
@ -3083,7 +3127,7 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
|
||||
error message is given. Example: >
|
||||
:let failed = appendbufline(13, 0, "# THE START")
|
||||
<
|
||||
< Can also be used as a |method| after a List, the base is
|
||||
Can also be used as a |method| after a List, the base is
|
||||
passed as the second argument: >
|
||||
mylist->appendbufline(buf, lnum)
|
||||
|
||||
@ -3460,7 +3504,7 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
|
||||
< The first and third echo result in 3 ('e' plus composing
|
||||
character is 3 bytes), the second echo results in 1 ('e' is
|
||||
one byte).
|
||||
Only works different from byteidx() when 'encoding' is set to
|
||||
Only works differently from byteidx() when 'encoding' is set to
|
||||
a Unicode encoding.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@ -3755,7 +3799,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
not need to be the first letter: >
|
||||
confirm("file has been modified", "&Save\nSave &All")
|
||||
< For the console, the first letter of each choice is used as
|
||||
the default shortcut key.
|
||||
the default shortcut key. Case is ignored.
|
||||
|
||||
The optional {default} argument is the number of the choice
|
||||
that is made if the user hits <CR>. Use 1 to make the first
|
||||
@ -4384,10 +4428,10 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
|Dictionaries|.
|
||||
|
||||
If they are |Lists|: Append {expr2} to {expr1}.
|
||||
If {expr3} is given insert the items of {expr2} before item
|
||||
{expr3} in {expr1}. When {expr3} is zero insert before the
|
||||
first item. When {expr3} is equal to len({expr1}) then
|
||||
{expr2} is appended.
|
||||
If {expr3} is given insert the items of {expr2} before the
|
||||
item with index {expr3} in {expr1}. When {expr3} is zero
|
||||
insert before the first item. When {expr3} is equal to
|
||||
len({expr1}) then {expr2} is appended.
|
||||
Examples: >
|
||||
:echo sort(extend(mylist, [7, 5]))
|
||||
:call extend(mylist, [2, 3], 1)
|
||||
@ -5258,13 +5302,20 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
GetPattern()->getcompletion('color')
|
||||
<
|
||||
*getcurpos()*
|
||||
getcurpos() Get the position of the cursor. This is like getpos('.'), but
|
||||
getcurpos([{winid}])
|
||||
Get the position of the cursor. This is like getpos('.'), but
|
||||
includes an extra "curswant" item in the list:
|
||||
[0, lnum, col, off, curswant] ~
|
||||
The "curswant" number is the preferred column when moving the
|
||||
cursor vertically. Also see |getpos()|.
|
||||
The first "bufnum" item is always zero.
|
||||
|
||||
The optional {winid} argument can specify the window. It can
|
||||
be the window number or the |window-ID|. The last known
|
||||
cursor position is returned, this may be invalid for the
|
||||
current value of the buffer if it is not the current window.
|
||||
If {winid} is invalid a list with zeroes is returned.
|
||||
|
||||
This can be used to save and restore the cursor position: >
|
||||
let save_cursor = getcurpos()
|
||||
MoveTheCursorAround
|
||||
@ -5475,8 +5526,9 @@ getloclist({nr} [, {what}]) *getloclist()*
|
||||
|location-list-file-window| for more
|
||||
details.
|
||||
|
||||
Returns an empty Dictionary if there is no location list for
|
||||
the window {nr} or the window is not present.
|
||||
Returns a Dictionary with default values if there is no location
|
||||
list for the window {nr}.
|
||||
Returns an empty Dictionary if window {nr} does not exist.
|
||||
|
||||
Examples (See also |getqflist-examples|): >
|
||||
:echo getloclist(3, {'all': 0})
|
||||
@ -6936,9 +6988,14 @@ luaeval({expr} [, {expr}]) *luaeval()*
|
||||
< {only available when compiled with the |+lua| feature}
|
||||
|
||||
map({expr1}, {expr2}) *map()*
|
||||
{expr1} must be a |List| or a |Dictionary|.
|
||||
{expr1} must be a |List|, |Blob| or |Dictionary|.
|
||||
Replace each item in {expr1} with the result of evaluating
|
||||
{expr2}. {expr2} must be a |string| or |Funcref|.
|
||||
{expr2}. For a |Blob| each byte is replaced.
|
||||
If the item type changes you may want to use |mapnew()| to
|
||||
create a new List or Dictionary. This is required when using
|
||||
Vim9 script.
|
||||
|
||||
{expr2} must be a |string| or |Funcref|.
|
||||
|
||||
If {expr2} is a |string|, inside {expr2} |v:val| has the value
|
||||
of the current item. For a |Dictionary| |v:key| has the key
|
||||
@ -6973,11 +7030,11 @@ map({expr1}, {expr2}) *map()*
|
||||
|Dictionary| to remain unmodified make a copy first: >
|
||||
:let tlist = map(copy(mylist), ' v:val . "\t"')
|
||||
|
||||
< Returns {expr1}, the |List| or |Dictionary| that was filtered.
|
||||
When an error is encountered while evaluating {expr2} no
|
||||
further items in {expr1} are processed. When {expr2} is a
|
||||
Funcref errors inside a function are ignored, unless it was
|
||||
defined with the "abort" flag.
|
||||
< Returns {expr1}, the |List|, |Blob| or |Dictionary| that was
|
||||
filtered. When an error is encountered while evaluating
|
||||
{expr2} no further items in {expr1} are processed. When
|
||||
{expr2} is a Funcref errors inside a function are ignored,
|
||||
unless it was defined with the "abort" flag.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
mylist->map(expr2)
|
||||
@ -7086,7 +7143,13 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
|
||||
GetKey()->mapcheck('n')
|
||||
|
||||
|
||||
mapset({mode}, {abbr}, {dict}) *mapset()*
|
||||
mapnew({expr1}, {expr2}) *mapnew()*
|
||||
Like |map()| but instead of replacing items in {expr1} a new
|
||||
List or Dictionary is created and returned. {expr1} remains
|
||||
unchanged.
|
||||
|
||||
|
||||
mapset({mode}, {abbr}, {dict}) *mapset()*
|
||||
Restore a mapping from a dictionary returned by |maparg()|.
|
||||
{mode} and {abbr} should be the same as for the call to
|
||||
|maparg()|. *E460*
|
||||
@ -7311,12 +7374,35 @@ matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
|
||||
GetText()->matchend('word')
|
||||
|
||||
|
||||
matchfuzzy({list}, {str}) *matchfuzzy()*
|
||||
Returns a list with all the strings in {list} that fuzzy
|
||||
match {str}. The strings in the returned list are sorted
|
||||
based on the matching score. {str} is treated as a literal
|
||||
string and regular expression matching is NOT supported.
|
||||
The maximum supported {str} length is 256.
|
||||
matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
If {list} is a list of strings, then returns a list with all
|
||||
the strings in {list} that fuzzy match {str}. The strings in
|
||||
the returned list are sorted based on the matching score.
|
||||
|
||||
The optional {dict} argument always supports the following
|
||||
items:
|
||||
matchseq When this item is present and {str} contains
|
||||
multiple words separated by white space, then
|
||||
returns only matches that contain the words in
|
||||
the given sequence.
|
||||
|
||||
If {list} is a list of dictionaries, then the optional {dict}
|
||||
argument supports the following additional items:
|
||||
key key of the item which is fuzzy matched against
|
||||
{str}. The value of this item should be a
|
||||
string.
|
||||
text_cb |Funcref| that will be called for every item
|
||||
in {list} to get the text for fuzzy matching.
|
||||
This should accept a dictionary item as the
|
||||
argument and return the text for that item to
|
||||
use for fuzzy matching.
|
||||
|
||||
{str} is treated as a literal string and regular expression
|
||||
matching is NOT supported. The maximum supported {str} length
|
||||
is 256.
|
||||
|
||||
When {str} has multiple words each separated by white space,
|
||||
then the list of strings that have all the words is returned.
|
||||
|
||||
If there are no matching strings or there is an error, then an
|
||||
empty list is returned. If length of {str} is greater than
|
||||
@ -7327,11 +7413,41 @@ matchfuzzy({list}, {str}) *matchfuzzy()*
|
||||
< results in ["clay"]. >
|
||||
:echo getbufinfo()->map({_, v -> v.name})->matchfuzzy("ndl")
|
||||
< results in a list of buffer names fuzzy matching "ndl". >
|
||||
:echo getbufinfo()->matchfuzzy("ndl", {'key' : 'name'})
|
||||
< results in a list of buffer information dicts with buffer
|
||||
names fuzzy matching "ndl". >
|
||||
:echo getbufinfo()->matchfuzzy("spl",
|
||||
\ {'text_cb' : {v -> v.name}})
|
||||
< results in a list of buffer information dicts with buffer
|
||||
names fuzzy matching "spl". >
|
||||
:echo v:oldfiles->matchfuzzy("test")
|
||||
< results in a list of file names fuzzy matching "test". >
|
||||
:let l = readfile("buffer.c")->matchfuzzy("str")
|
||||
< results in a list of lines in "buffer.c" fuzzy matching "str".
|
||||
< results in a list of lines in "buffer.c" fuzzy matching "str". >
|
||||
:echo ['one two', 'two one']->matchfuzzy('two one')
|
||||
< results in ['two one', 'one two']. >
|
||||
:echo ['one two', 'two one']->matchfuzzy('two one',
|
||||
\ {'matchseq': 1})
|
||||
< results in ['two one'].
|
||||
|
||||
matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
|
||||
Same as |matchfuzzy()|, but returns the list of matched
|
||||
strings and the list of character positions where characters
|
||||
in {str} matches.
|
||||
|
||||
If {str} matches multiple times in a string, then only the
|
||||
positions for the best match is returned.
|
||||
|
||||
If there are no matching strings or there is an error, then a
|
||||
list with two empty list items is returned.
|
||||
|
||||
Example: >
|
||||
:echo matchfuzzypos(['testing'], 'tsg')
|
||||
< results in [['testing'], [[0, 2, 6]]] >
|
||||
:echo matchfuzzypos(['clay', 'lacy'], 'la')
|
||||
< results in [['lacy', 'clay'], [[0, 1], [1, 2]]] >
|
||||
:echo [{'text': 'hello', 'id' : 10}]->matchfuzzypos('ll', {'key' : 'text'})
|
||||
< results in [{'id': 10, 'text': 'hello'}] [[2, 3]]
|
||||
|
||||
matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
|
||||
Same as |match()|, but return a |List|. The first item in the
|
||||
@ -7607,13 +7723,17 @@ or({expr}, {expr}) *or()*
|
||||
:let bits = bits->or(0x80)
|
||||
|
||||
|
||||
pathshorten({expr}) *pathshorten()*
|
||||
pathshorten({expr} [, {len}]) *pathshorten()*
|
||||
Shorten directory names in the path {expr} and return the
|
||||
result. The tail, the file name, is kept as-is. The other
|
||||
components in the path are reduced to single letters. Leading
|
||||
'~' and '.' characters are kept. Example: >
|
||||
components in the path are reduced to {len} letters in length.
|
||||
If {len} is omitted or smaller than 1 then 1 is used (single
|
||||
letters). Leading '~' and '.' characters are kept. Examples: >
|
||||
:echo pathshorten('~/.vim/autoload/myfile.vim')
|
||||
< ~/.v/a/myfile.vim ~
|
||||
>
|
||||
:echo pathshorten('~/.vim/autoload/myfile.vim', 2)
|
||||
< ~/.vi/au/myfile.vim ~
|
||||
It doesn't matter if the path exists or not.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@ -7864,8 +7984,8 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
|
||||
|
||||
prompt_getprompt({buf}) *prompt_getprompt()*
|
||||
Returns the effective prompt text for buffer {buf}. {buf} can
|
||||
be a buffer name or number. |prompt-buffer|.
|
||||
Returns the effective prompt text for buffer {buf}. {buf} can
|
||||
be a buffer name or number. See |prompt-buffer|.
|
||||
|
||||
If the buffer doesn't exist or isn't a prompt buffer, an empty
|
||||
string is returned.
|
||||
@ -8211,15 +8331,18 @@ reg_recording() *reg_recording()*
|
||||
Returns an empty string when not recording. See |q|.
|
||||
|
||||
reltime([{start} [, {end}]]) *reltime()*
|
||||
Return an item that represents a time value. The format of
|
||||
the item depends on the system. It can be passed to
|
||||
|reltimestr()| to convert it to a string or |reltimefloat()|
|
||||
to convert to a Float.
|
||||
Without an argument it returns the current time.
|
||||
Return an item that represents a time value. The item is a
|
||||
list with items that depend on the system. In Vim 9 script
|
||||
list<any> can be used.
|
||||
The item can be passed to |reltimestr()| to convert it to a
|
||||
string or |reltimefloat()| to convert to a Float.
|
||||
|
||||
Without an argument reltime() returns the current time.
|
||||
With one argument is returns the time passed since the time
|
||||
specified in the argument.
|
||||
With two arguments it returns the time passed between {start}
|
||||
and {end}.
|
||||
|
||||
The {start} and {end} arguments must be values returned by
|
||||
reltime().
|
||||
|
||||
@ -9592,8 +9715,25 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
When {func} is given and it is '1' or 'i' then case is
|
||||
ignored.
|
||||
|
||||
When {func} is given and it is 'l' then the current collation
|
||||
locale is used for ordering. Implementation details: strcoll()
|
||||
is used to compare strings. See |:language| check or set the
|
||||
collation locale. |v:collate| can also be used to check the
|
||||
current locale. Sorting using the locale typically ignores
|
||||
case. Example: >
|
||||
" ö is sorted similarly to o with English locale.
|
||||
:language collate en_US.UTF8
|
||||
:echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
|
||||
< ['n', 'o', 'O', 'ö', 'p', 'z'] ~
|
||||
>
|
||||
" ö is sorted after z with Swedish locale.
|
||||
:language collate sv_SE.UTF8
|
||||
:echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
|
||||
< ['n', 'o', 'O', 'p', 'z', 'ö'] ~
|
||||
This does not work properly on Mac.
|
||||
|
||||
When {func} is given and it is 'n' then all items will be
|
||||
sorted numerical (Implementation detail: This uses the
|
||||
sorted numerical (Implementation detail: this uses the
|
||||
strtod() function to parse numbers, Strings, Lists, Dicts and
|
||||
Funcrefs will be considered as being 0).
|
||||
|
||||
@ -10295,7 +10435,9 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
"bg" background color (as with "fg")
|
||||
"font" font name (only available in the GUI)
|
||||
|highlight-font|
|
||||
"sp" special color (as with "fg") |highlight-guisp|
|
||||
"sp" special color for the GUI (as with "fg")
|
||||
|highlight-guisp|
|
||||
"ul" underline color for cterm: number as a string
|
||||
"fg#" like "fg", but for the GUI and the GUI is
|
||||
running the name in "#RRGGBB" form
|
||||
"bg#" like "fg#" for "bg"
|
||||
@ -10599,8 +10741,8 @@ terminalprops() *terminalprops()*
|
||||
detected from the response to |t_RV| request. See
|
||||
|v:termresponse| for the response itself. If |v:termresponse|
|
||||
is empty most values here will be 'u' for unknown.
|
||||
cursor_style wether sending |t_RS| works **
|
||||
cursor_blink_mode wether sending |t_RC| works **
|
||||
cursor_style whether sending |t_RS| works **
|
||||
cursor_blink_mode whether sending |t_RC| works **
|
||||
underline_rgb whether |t_8u| works **
|
||||
mouse mouse type supported
|
||||
|
||||
@ -11256,7 +11398,8 @@ winsaveview() Returns a |Dictionary| that contains information to restore
|
||||
curswant column for vertical movement
|
||||
topline first line in the window
|
||||
topfill filler lines, only in diff mode
|
||||
leftcol first column displayed
|
||||
leftcol first column displayed; only used when
|
||||
'wrap' is off
|
||||
skipcol columns skipped
|
||||
Note that no option values are saved.
|
||||
|
||||
@ -11475,7 +11618,7 @@ menu Compiled with support for |:menu|.
|
||||
mksession Compiled with support for |:mksession|.
|
||||
modify_fname Compiled with file name modifiers. |filename-modifiers|
|
||||
(always true)
|
||||
mouse Compiled with support mouse.
|
||||
mouse Compiled with support for mouse.
|
||||
mouse_dec Compiled with support for Dec terminal mouse.
|
||||
mouse_gpm Compiled with support for gpm (Linux console mouse)
|
||||
mouse_gpm_enabled GPM mouse is working
|
||||
@ -12030,8 +12173,9 @@ be used to pass settings to the autoload script before it's loaded: >
|
||||
|
||||
Note that when you make a mistake and call a function that is supposed to be
|
||||
defined in an autoload script, but the script doesn't actually define the
|
||||
function, the script will be sourced every time you try to call the function.
|
||||
And you will get an error message every time.
|
||||
function, you will get an error message for the missing function. If you fix
|
||||
the autoload script it won't be automatically loaded again. Either restart
|
||||
Vim or manually source the script.
|
||||
|
||||
Also note that if you have two script files, and one calls a function in the
|
||||
other and vice versa, before the used function is defined, it won't work.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2019 Jul 16
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -397,6 +397,13 @@ ways to change this:
|
||||
3. Docs for the default filetype plugins. *ftplugin-docs*
|
||||
|
||||
|
||||
AWK *ft-awk-plugin*
|
||||
|
||||
Support for features specific to GNU Awk, like @include, can be enabled by
|
||||
setting: >
|
||||
let g:awk_is_gawk = 1
|
||||
|
||||
|
||||
CHANGELOG *ft-changelog-plugin*
|
||||
|
||||
Allows for easy entrance of Changelog entries in Changelog files. There are
|
||||
|
@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.2. Last change: 2020 Mar 16
|
||||
*gui.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -547,15 +547,6 @@ floating menus that do not appear on the main menu bar.
|
||||
5.2 Creating New Menus *creating-menus*
|
||||
|
||||
*:me* *:menu* *:noreme* *:noremenu*
|
||||
*:am* *:amenu* *:an* *:anoremenu*
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu*
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu*
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu*
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
|
||||
*:tlm* *:tlmenu* *:tln* *:tlnoremenu*
|
||||
*E330* *E327* *E331* *E336* *E333*
|
||||
*E328* *E329* *E337* *E792*
|
||||
To create a new menu item, use the ":menu" commands. They are mostly like
|
||||
@ -596,6 +587,7 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
|
||||
this menu can be used. The second part is shown as "Open :e". The ":e"
|
||||
is right aligned, and the "O" is underlined, to indicate it is the shortcut.
|
||||
|
||||
*:am* *:amenu* *:an* *:anoremenu*
|
||||
The ":amenu" command can be used to define menu entries for all modes at once,
|
||||
except for Terminal mode. To make the command work correctly, a character is
|
||||
automatically inserted for some modes:
|
||||
@ -634,6 +626,30 @@ included they make the <> form and raw key codes not being recognized).
|
||||
Note that <Esc> in Cmdline mode executes the command, like in a mapping. This
|
||||
is Vi compatible. Use CTRL-C to quit Cmdline mode.
|
||||
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu* *:nunme* *:nunmenu*
|
||||
Menu commands starting with "n" work in Normal mode. |mapmode-n|
|
||||
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu* *:ounme* *:ounmenu*
|
||||
Menu commands starting with "o" work in Operator-pending mode. |mapmode-o|
|
||||
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu* *:vunme* *:vunmenu*
|
||||
Menu commands starting with "v" work in Visual mode. |mapmode-v|
|
||||
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu* *:xunme* *:xunmenu*
|
||||
Menu commands starting with "x" work in Visual and Select mode. |mapmode-x|
|
||||
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu* *:sunme* *:sunmenu*
|
||||
Menu commands starting with "s" work in Select mode. |mapmode-s|
|
||||
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu* *:iunme* *:iunmenu*
|
||||
Menu commands starting with "i" work in Insert mode. |mapmode-i|
|
||||
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu* *:cunme* *:cunmenu*
|
||||
Menu commands starting with "c" work in Cmdline mode. |mapmode-c|
|
||||
|
||||
*:tlm* *:tlmenu* *:tln* *:tlnoremenu* *:tlu* *:tlunmenu*
|
||||
Menu commands starting with "tl" work in Terminal mode. |mapmode-t|
|
||||
|
||||
*:menu-<silent>* *:menu-silent*
|
||||
To define a menu which will not be echoed on the command line, add
|
||||
"<silent>" as the first argument. Example: >
|
||||
@ -897,14 +913,6 @@ using the last visual selection.
|
||||
|
||||
*:unme* *:unmenu*
|
||||
*:aun* *:aunmenu*
|
||||
*:nunme* *:nunmenu*
|
||||
*:ounme* *:ounmenu*
|
||||
*:vunme* *:vunmenu*
|
||||
*:xunme* *:xunmenu*
|
||||
*:sunme* *:sunmenu*
|
||||
*:iunme* *:iunmenu*
|
||||
*:cunme* *:cunmenu*
|
||||
*:tlu* *:tlunmenu*
|
||||
To delete a menu item or a whole submenu, use the unmenu commands, which are
|
||||
analogous to the unmap commands. Eg: >
|
||||
:unmenu! Edit.Paste
|
||||
|
@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*if_mzsch.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@ -43,7 +43,7 @@ To speed up the process, you might also want to use --disable-gracket and
|
||||
{script}
|
||||
{endmarker}
|
||||
Execute inlined MzScheme script {script}.
|
||||
Note: This command doesn't work if the MzScheme
|
||||
Note: This command doesn't work when the MzScheme
|
||||
feature wasn't compiled in. To avoid errors, see
|
||||
|script-here|.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 May 31
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 Oct 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -784,10 +784,10 @@ tag char note action in Normal mode ~
|
||||
lines down
|
||||
|gk| gk 1 like "k", but when 'wrap' on go N screen
|
||||
lines up
|
||||
|gn| gn 1,2 find the next match with the last used
|
||||
search pattern and Visually select it
|
||||
|gm| gm 1 go to character at middle of the screenline
|
||||
|gM| gM 1 go to character at middle of the text line
|
||||
|gn| gn 1,2 find the next match with the last used
|
||||
search pattern and Visually select it
|
||||
|go| go 1 cursor to byte N in the buffer
|
||||
|gp| ["x]gp 2 put the text [from register x] after the
|
||||
cursor N times, leave the cursor after it
|
||||
@ -1317,6 +1317,7 @@ tag command action ~
|
||||
|:filetype| :filet[ype] switch file type detection on/off
|
||||
|:filter| :filt[er] filter output of following command
|
||||
|:find| :fin[d] find file in 'path' and edit it
|
||||
|:final| :final declare an immutable variable in Vim9
|
||||
|:finally| :fina[lly] part of a :try command
|
||||
|:finish| :fini[sh] quit sourcing a Vim script
|
||||
|:first| :fir[st] go to the first file in the argument list
|
||||
@ -1691,6 +1692,7 @@ tag command action ~
|
||||
|:unsilent| :uns[ilent] run a command not silently
|
||||
|:update| :up[date] write buffer if modified
|
||||
|:vglobal| :v[global] execute commands for not matching lines
|
||||
|:var| :var variable declaration in Vim9
|
||||
|:version| :ve[rsion] print version number and other info
|
||||
|:verbose| :verb[ose] execute command with 'verbose' set
|
||||
|:vertical| :vert[ical] make following command split vertically
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Sep 19
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Oct 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -312,6 +312,7 @@ If you enter a value of 10, it will end up in the file as a 0. The 10 is a
|
||||
the buffer to a file, the <NL> character is translated into <Nul>. The <NL>
|
||||
character is written at the end of each line. Thus if you want to insert a
|
||||
<NL> character in a file you will have to make a line break.
|
||||
Also see 'fileformat'.
|
||||
|
||||
*i_CTRL-X* *insert_expand*
|
||||
CTRL-X enters a sub-mode where several commands can be used. Most of these
|
||||
|
@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Sep 09
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Oct 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -252,6 +252,17 @@ For abbreviations |v:char| is set to the character that was typed to trigger
|
||||
the abbreviation. You can use this to decide how to expand the {lhs}. You
|
||||
should not either insert or change the v:char.
|
||||
|
||||
In case you want the mapping to not do anything, you can have the expression
|
||||
evaluate to an empty string. If something changed that requires Vim to
|
||||
go through the main loop (e.g. to update the display), return "\<Ignore>".
|
||||
This is similar to "nothing" but makes Vim return from the loop that waits for
|
||||
input. Example: >
|
||||
func s:OpenPopup()
|
||||
call popup_create(... arguments ...)
|
||||
return "\<Ignore>"
|
||||
endfunc
|
||||
nnoremap <expr> <F3> <Sid>OpenPopup()
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
For this reason the following is blocked:
|
||||
@ -839,8 +850,15 @@ execute a shell command, e.g.: `!ls` Or put the lines in your |vimrc|.
|
||||
|
||||
When modifyOtherKeys is enabled you can map <C-[> and <C-S-{>: >
|
||||
imap <C-[> [[[
|
||||
imap <C-S-{> {{{
|
||||
Without modifyOtherKeys <C-[> and <C-S-{> are indistinguishable from Esc.
|
||||
imap <C-{> {{{
|
||||
Without modifyOtherKeys <C-[> and <C-{> are indistinguishable from Esc.
|
||||
Note that <C-{> is used and not <C-S-[> or <C-S-{>. This works on most
|
||||
keyboards. Similarly, <C-}> is used instead of <C-S-]> or <C-S-}> and
|
||||
<C-|> instead of <C-S-\> or <C-S-|>. Note that '|' has a special meaning in a
|
||||
mapping, see |map-bar|.
|
||||
|
||||
WARNING: if you map <C-[> you may very well break any key codes that start
|
||||
with Esc. Make sure it comes AFTER other mappings.
|
||||
|
||||
A known side effect is that in Insert mode the raw escape sequence is inserted
|
||||
after the CTRL-V key. This can be used to check whether modifyOtherKeys is
|
||||
|
@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.2. Last change: 2020 Aug 24
|
||||
*motion.txt* For Vim version 8.2. Last change: 2020 Oct 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -190,11 +190,14 @@ l or *l*
|
||||
|
||||
*^*
|
||||
^ To the first non-blank character of the line.
|
||||
|exclusive| motion.
|
||||
|exclusive| motion. Any count is ignored.
|
||||
|
||||
*$* *<End>* *<kEnd>*
|
||||
$ or <End> To the end of the line. When a count is given also go
|
||||
[count - 1] lines downward. |inclusive| motion.
|
||||
[count - 1] lines downward, or as far is possible.
|
||||
|inclusive| motion. If a count of 2 of larger is
|
||||
given and the cursor is on the last line, that is an
|
||||
error an the cursor doesn't move.
|
||||
In Visual mode the cursor goes to just after the last
|
||||
character in the line.
|
||||
When 'virtualedit' is active, "$" may move the cursor
|
||||
|
@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*netbeans.txt* For Vim version 8.2. Last change: 2020 Nov 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@ -562,9 +562,10 @@ setModtime time
|
||||
saved directly by the Vim Controller.
|
||||
New in version 2.3.
|
||||
|
||||
setReadOnly
|
||||
Set a file as readonly
|
||||
Implemented in version 2.3.
|
||||
setReadOnly readonly
|
||||
When the boolean argument "readonly" is "T" for True, mark the
|
||||
buffer as readonly, when it is "F" for False, mark it as not
|
||||
readonly. Implemented in version 2.3.
|
||||
|
||||
setStyle Not implemented.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Sep 15
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Oct 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2554,7 +2554,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"x" delete each combining character on its own. When it is off (the
|
||||
default) the character along with its combining characters are
|
||||
deleted.
|
||||
Note: When 'delcombine' is set "xx" may work different from "2x"!
|
||||
Note: When 'delcombine' is set "xx" may work differently from "2x"!
|
||||
|
||||
This is useful for Arabic, Hebrew and many other languages where one
|
||||
may have combining characters overtop of base characters, and want
|
||||
@ -4682,7 +4682,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
characters. Example: "abc;ABC"
|
||||
Example: "aA,fgh;FGH,cCdDeE"
|
||||
Special characters need to be preceded with a backslash. These are
|
||||
";", ',' and backslash itself.
|
||||
";", ',', '"', '|' and backslash itself.
|
||||
|
||||
This will allow you to activate vim actions without having to switch
|
||||
back and forth between the languages. Your language characters will
|
||||
@ -7225,7 +7225,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
normal text. Each status line item is of the form:
|
||||
%-0{minwid}.{maxwid}{item}
|
||||
All fields except the {item} are optional. A single percent sign can
|
||||
be given as "%%". Up to 80 items can be specified. *E541*
|
||||
be given as "%%".
|
||||
|
||||
When the option starts with "%!" then it is used as an expression,
|
||||
evaluated and the result is used as the option value. Example: >
|
||||
|
@ -154,4 +154,4 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:noet:ft=help:fdm=marker
|
||||
vim:tw=78:ts=8:ft=help:noet:norl:fdm=marker
|
||||
|
@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Sep 08
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -314,6 +314,7 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()*
|
||||
<Space> <Enter> accept current selection
|
||||
x Esc CTRL-C cancel the menu
|
||||
Other keys are ignored.
|
||||
Always returns |v:true|.
|
||||
|
||||
A match is set on that line to highlight it, see
|
||||
|popup_menu()|.
|
||||
@ -711,7 +712,7 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
By default a double line is used all around when
|
||||
'encoding' is "utf-8" and 'ambiwidth' is "single",
|
||||
otherwise ASCII characters are used.
|
||||
scrollbar non-zero: show a scrollbar when the text doesn't fit.
|
||||
scrollbar 1 or true: show a scrollbar when the text doesn't fit.
|
||||
zero: do not show a scrollbar. Default is non-zero.
|
||||
Also see |popup-scrollbar|.
|
||||
scrollbarhighlight Highlight group name for the scrollbar. The
|
||||
@ -910,6 +911,11 @@ A mouse click arrives as <LeftMouse>. The coordinates can be obtained with
|
||||
Vim provides standard filters |popup_filter_menu()| and
|
||||
|popup_filter_yesno()|.
|
||||
|
||||
Keys coming from a `:normal` command do not pass through the filter. This can
|
||||
be used to move the cursor in a popup where the "cursorline" option is set: >
|
||||
call win_execute(winid, 'normal! 10Gzz')
|
||||
Keys coming from `feedkeys()` are passed through the filter.
|
||||
|
||||
Note that "x" is the normal way to close a popup. You may want to use Esc,
|
||||
but since many keys start with an Esc character, there may be a delay before
|
||||
Vim recognizes the Esc key. If you do use Esc, it is recommended to set the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2020 Oct 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -271,6 +271,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
directories are added to 'runtimepath'. This is
|
||||
useful in your .vimrc. The plugins will then be
|
||||
loaded during initialization, see |load-plugins|.
|
||||
Note that for ftdetect scripts to be loaded
|
||||
you will need to write `filetype plugin indent on`
|
||||
AFTER all `packadd!` commands.
|
||||
|
||||
Also see |pack-add|.
|
||||
{only available when compiled with |+eval|}
|
||||
|
@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 8.2. Last change: 2020 Aug 31
|
||||
*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@ -81,6 +81,10 @@ on the same line, the attributes of the sign with the highest priority is used
|
||||
independently of the sign group. The default priority for a sign is 10. The
|
||||
priority is assigned at the time of placing a sign.
|
||||
|
||||
When two signs with the same priority are present, and one has an icon or text
|
||||
in the signcolumn while the other has line highlighting, then both are
|
||||
displayed.
|
||||
|
||||
When the line on which the sign is placed is deleted, the sign is moved to the
|
||||
next line (or the last line of the buffer, if there is no next line). When
|
||||
the delete is undone the sign does not move back.
|
||||
@ -458,11 +462,11 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
|
||||
entries
|
||||
|
||||
The dictionary for each sign contains the following entries:
|
||||
group sign group. Set to '' for the global group.
|
||||
id identifier of the sign
|
||||
lnum line number where the sign is placed
|
||||
name name of the defined sign
|
||||
priority sign priority
|
||||
group sign group. Set to '' for the global group.
|
||||
id identifier of the sign
|
||||
lnum line number where the sign is placed
|
||||
name name of the defined sign
|
||||
priority sign priority
|
||||
|
||||
The returned signs in a buffer are ordered by their line
|
||||
number and priority.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Feb 04
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Sep 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -513,6 +513,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
'nocompatible': use Vim defaults
|
||||
- no |gvimrc| script is loaded
|
||||
- no viminfo file is read or written
|
||||
Note that a following "-u" argument overrules the effect of
|
||||
"-u DEFAULTS".
|
||||
|
||||
*-x*
|
||||
-x Use encryption to read/write files. Will prompt for a key,
|
||||
|
@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 8.2. Last change: 2020 Aug 10
|
||||
*tabpage.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -195,8 +195,8 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
|
||||
:+2tabnext " go to the two next tab page
|
||||
:1tabnext " go to the first tab page
|
||||
:$tabnext " go to the last tab page
|
||||
:tabnext # " go to the last accessed tab page
|
||||
:tabnext $ " as above
|
||||
:tabnext # " go to the last accessed tab page
|
||||
:tabnext - " go to the previous tab page
|
||||
:tabnext -1 " as above
|
||||
:tabnext + " go to the next tab page
|
||||
@ -225,7 +225,7 @@ gT Go to the previous tab page. Wraps around from the first one
|
||||
*:tabl* *:tablast*
|
||||
:tabl[ast] Go to the last tab page.
|
||||
|
||||
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
|
||||
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
|
||||
g<Tab> Go to the last accessed tab page.
|
||||
|
||||
Other commands:
|
||||
@ -259,7 +259,7 @@ REORDERING TAB PAGES:
|
||||
:tabmove " move the tab page to the last
|
||||
:$tabmove " as above
|
||||
:tabmove $ " as above
|
||||
:tabmove # " move the tab page after the last accessed
|
||||
:tabmove # " move the tab page after the last accessed
|
||||
" tab page
|
||||
|
||||
:tabm[ove] +[N]
|
||||
|
@ -2447,6 +2447,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:filter various.txt /*:filter*
|
||||
:fin editing.txt /*:fin*
|
||||
:fina eval.txt /*:fina*
|
||||
:final vim9.txt /*:final*
|
||||
:finally eval.txt /*:finally*
|
||||
:find editing.txt /*:find*
|
||||
:fini repeat.txt /*:fini*
|
||||
@ -3371,6 +3372,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:up editing.txt /*:up*
|
||||
:update editing.txt /*:update*
|
||||
:v repeat.txt /*:v*
|
||||
:var vim9.txt /*:var*
|
||||
:ve various.txt /*:ve*
|
||||
:ver various.txt /*:ver*
|
||||
:verb various.txt /*:verb*
|
||||
@ -3689,6 +3691,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
>where repeat.txt /*>where*
|
||||
? pattern.txt /*?*
|
||||
?<CR> pattern.txt /*?<CR>*
|
||||
?? eval.txt /*??*
|
||||
@ repeat.txt /*@*
|
||||
@/ change.txt /*@\/*
|
||||
@: repeat.txt /*@:*
|
||||
@ -4375,7 +4378,6 @@ E538 options.txt /*E538*
|
||||
E539 options.txt /*E539*
|
||||
E54 pattern.txt /*E54*
|
||||
E540 options.txt /*E540*
|
||||
E541 options.txt /*E541*
|
||||
E542 options.txt /*E542*
|
||||
E543 options.txt /*E543*
|
||||
E544 options.txt /*E544*
|
||||
@ -4929,6 +4931,7 @@ InsertChange autocmd.txt /*InsertChange*
|
||||
InsertCharPre autocmd.txt /*InsertCharPre*
|
||||
InsertEnter autocmd.txt /*InsertEnter*
|
||||
InsertLeave autocmd.txt /*InsertLeave*
|
||||
InsertLeavePre autocmd.txt /*InsertLeavePre*
|
||||
Integer eval.txt /*Integer*
|
||||
J change.txt /*J*
|
||||
Japanese mbyte.txt /*Japanese*
|
||||
@ -6328,6 +6331,8 @@ extensions-improvements todo.txt /*extensions-improvements*
|
||||
f motion.txt /*f*
|
||||
false vim9.txt /*false*
|
||||
false-variable eval.txt /*false-variable*
|
||||
falsy eval.txt /*falsy*
|
||||
falsy-operator eval.txt /*falsy-operator*
|
||||
faq intro.txt /*faq*
|
||||
farsi farsi.txt /*farsi*
|
||||
farsi.txt farsi.txt /*farsi.txt*
|
||||
@ -6461,6 +6466,7 @@ ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax*
|
||||
ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax*
|
||||
ft-aspperl-syntax syntax.txt /*ft-aspperl-syntax*
|
||||
ft-aspvbs-syntax syntax.txt /*ft-aspvbs-syntax*
|
||||
ft-awk-plugin filetype.txt /*ft-awk-plugin*
|
||||
ft-bash-syntax syntax.txt /*ft-bash-syntax*
|
||||
ft-basic-syntax syntax.txt /*ft-basic-syntax*
|
||||
ft-c-omni insert.txt /*ft-c-omni*
|
||||
@ -7756,6 +7762,7 @@ matcharg() eval.txt /*matcharg()*
|
||||
matchdelete() eval.txt /*matchdelete()*
|
||||
matchend() eval.txt /*matchend()*
|
||||
matchfuzzy() eval.txt /*matchfuzzy()*
|
||||
matchfuzzypos() eval.txt /*matchfuzzypos()*
|
||||
matchit-install usr_05.txt /*matchit-install*
|
||||
matchlist() eval.txt /*matchlist()*
|
||||
matchparen pi_paren.txt /*matchparen*
|
||||
@ -9649,10 +9656,12 @@ tooltips gui.txt /*tooltips*
|
||||
toupper() eval.txt /*toupper()*
|
||||
tr() eval.txt /*tr()*
|
||||
trim() eval.txt /*trim()*
|
||||
trinary eval.txt /*trinary*
|
||||
trojan-horse starting.txt /*trojan-horse*
|
||||
true vim9.txt /*true*
|
||||
true-variable eval.txt /*true-variable*
|
||||
trunc() eval.txt /*trunc()*
|
||||
truthy eval.txt /*truthy*
|
||||
try-conditionals eval.txt /*try-conditionals*
|
||||
try-echoerr eval.txt /*try-echoerr*
|
||||
try-finally eval.txt /*try-finally*
|
||||
@ -10040,6 +10049,7 @@ vim9-declaration vim9.txt /*vim9-declaration*
|
||||
vim9-declarations usr_46.txt /*vim9-declarations*
|
||||
vim9-differences vim9.txt /*vim9-differences*
|
||||
vim9-export vim9.txt /*vim9-export*
|
||||
vim9-final vim9.txt /*vim9-final*
|
||||
vim9-gotchas vim9.txt /*vim9-gotchas*
|
||||
vim9-import vim9.txt /*vim9-import*
|
||||
vim9-rationale vim9.txt /*vim9-rationale*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Mar 05
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -101,7 +101,7 @@ Manipulating text property types:
|
||||
prop_type_add({name}, {props}) define a new property type
|
||||
prop_type_change({name}, {props}) change an existing property type
|
||||
prop_type_delete({name} [, {props}]) delete a property type
|
||||
prop_type_get([{name} [, {props}]]) get property type values
|
||||
prop_type_get({name} [, {props}]) get property type values
|
||||
prop_type_list([{props}]) get list of property types
|
||||
|
||||
|
||||
@ -291,7 +291,7 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
|
||||
Can also be used as a |method|: >
|
||||
GetPropName()->prop_type_delete()
|
||||
|
||||
prop_type_get([{name} [, {props}]]) *prop_type_get()*
|
||||
prop_type_get({name} [, {props}]) *prop_type_get()*
|
||||
Returns the properties of property type {name}. This is a
|
||||
dictionary with the same fields as was given to
|
||||
prop_type_add().
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Sep 19
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -38,51 +38,32 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Why does Test_invalid_sid() not work in the GUI?
|
||||
test_vim9_func fails: type from default value not used.
|
||||
|
||||
Add matchfuzzy() and matchfuzzypos() Yegappan, #6947
|
||||
should be ready now
|
||||
Without extra sleeps netbeans test has valgrind errors.
|
||||
PR #7248 from Yegappan - test doesn't fail without code changes
|
||||
|
||||
Making everything work:
|
||||
- Fix memory leak in test_vim9_func (through compile_nested_function and
|
||||
get_lambda_tv())
|
||||
- Fix memory leaks in test_vim9_script
|
||||
- At the Vim9 script level, keep script variables local to the block they are
|
||||
declared in, like in Javascript (using :let).
|
||||
-> Need to remember what variables were declared and delete them when
|
||||
leaving the block.
|
||||
-> if a function is defined it may need to keep the block-locals
|
||||
Then Implement { } block at the script level.
|
||||
- Recognize call to assert_fails() and execute it in the function context?
|
||||
Won't work if the command itself fails, not an expression failure:
|
||||
assert_fails("unknown", "E99:")
|
||||
Use try/catch is complicated:
|
||||
let did_catch = false
|
||||
try
|
||||
unknown
|
||||
catch
|
||||
assert_caught('E99:')
|
||||
did_catch = true
|
||||
endtry
|
||||
assert_true('did_catch')
|
||||
Add a new command,
|
||||
assertfail
|
||||
unknown
|
||||
endassertfail E99:.*unknown
|
||||
- Closure argument call should not always set varargs, like any function call?
|
||||
- Invoke user command in a :def function
|
||||
- Make map() give an error if the resulting type is wrong.
|
||||
Add mapnew() or mapcopy() to create a new List/Dict for the result, which
|
||||
can have a different value type.
|
||||
- Error message for "'yes && 0" is "using String as a Number", should be "using
|
||||
String as a Bool".
|
||||
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
|
||||
- In autocmd: use legacy syntax, not whatever the current script uses?
|
||||
- need to check type when a declaration specifies a type: #6507
|
||||
let nr: number = 'asdf'
|
||||
- Check many more builtin function arguments at compile time.
|
||||
- Make sure that in vim9script a function call without namespace only finds
|
||||
the script-local function, not a global one.
|
||||
- Make sure that where a callback is expected a function can be used (without
|
||||
quotes). E.g. sort() and map(). Also at the script level.
|
||||
- assignment to more complex lval: list[1][2][3] = 8
|
||||
Also "list[0] += value". test in Test_assign_dict_unknown_type().
|
||||
- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
|
||||
Add command to parse range at runtime?
|
||||
- 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
|
||||
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.
|
||||
@ -92,9 +73,10 @@ Making everything work:
|
||||
- ISN_CHECKTYPE could use check_argtype()
|
||||
- give error for variable name:
|
||||
let p = function('NoSuchFunc')
|
||||
- Give runtime error if function argument is wrong.
|
||||
def Increment(nr: number)
|
||||
range(3)->Increment()
|
||||
- If a :def function is called with a function reference, compile it to get
|
||||
the function type.
|
||||
def Filter(x: string, Cond: func(string): bool)
|
||||
Filter(x, { v -> v =~ '^b' })
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
@ -122,16 +104,18 @@ Making everything work:
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
has('asdf'), len('string')
|
||||
- Implement "as Name" in "import Item as Name from ..."
|
||||
- Implement using imported items at script level from "import * as X" in
|
||||
eval_variable(). Should pass the ".xxx" that follows and return that.
|
||||
- Disallow unlet for local/script/imported vars
|
||||
- Make "++nr" work.
|
||||
- Make closures work:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- nested closure only uses one context, not all (#7150)
|
||||
- expandcmd() with `=expr` in filename uses legacy expression.
|
||||
- eval_expr() in ex_cexpr()
|
||||
- eval_expr() call in dbg_parsearg() and debuggy_find()
|
||||
- has() is compiled as a constant, but some checks are dynamic.
|
||||
Check for dynamic values, such as "gui_running".
|
||||
- Implement command modifiers, such as "silent". (#6530)
|
||||
New syntax and functionality:
|
||||
Improve error checking:
|
||||
- "echo Func()" is an error if Func() does not return anything.
|
||||
@ -174,6 +158,11 @@ Further improvements:
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
|
||||
Popup windows:
|
||||
- Add a flag to make a popup window focusable?
|
||||
CTRL-W P cycle over any preview window or focusable popup, end up back in
|
||||
current window.
|
||||
? - switch between current window and all popup windows
|
||||
Esc in popup window goes back to previous current window
|
||||
- Cursor not updated before a redraw, making it jump. (#5943)
|
||||
- Add a termcap entry for changing the cursor when it goes under the popup and
|
||||
back. like t_SI and t_EI (t_SU and t_EU, where "U" means under?)
|
||||
@ -282,18 +271,33 @@ Terminal emulator window:
|
||||
|
||||
Error numbers available: E653
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally written by Felipe Morales.
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
Patch to use collation based sorting. (Christian Brabandt, #6229)
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
|
||||
Patch for blockwise paste reporting changes: #6660.
|
||||
|
||||
Missing filetype test for bashrc, PKGBUILD, etc.
|
||||
|
||||
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
|
||||
changes.
|
||||
|
||||
Add an option to start_timer() to return from the input loop with K_IGNORE.
|
||||
This is useful e.g. when a popup was created that disables mappings, we need
|
||||
to return from vgetc() to make this happen. #7011
|
||||
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
Scroll doesn't work correctly, why?
|
||||
|
||||
Expanding <mods> should put the tab number from cmdmod.tab before "tab".
|
||||
Any way to convert "$" back by using a special value? (#6901)
|
||||
|
||||
@ -322,15 +326,16 @@ autocommands for the buffer lifecycle:
|
||||
BufIsRenamed (after buffer ID gets another name)
|
||||
The buffer list and windows are locked, no changes possible
|
||||
|
||||
Make it possible to map (console and GUI): #6457
|
||||
<C-[> 0x27 or is this <Esc> ?
|
||||
<C-\> 0x28
|
||||
<C-]> 0x29
|
||||
<C-^> 0x30
|
||||
<C-_> 0x31
|
||||
Matchparen doesn't remove highlight after undo. (#7054)
|
||||
Is OK when syntax HL is active.
|
||||
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
Currently Del can be used to delete the last character of a typed count.
|
||||
Can it also be used to delete an incomplete Normal mode command? (#7096)
|
||||
After an operator: should work. After "a" or "i" for text objects: should
|
||||
work.
|
||||
|
||||
Using "au!" after "filetype on" is a bit slow. Can the matching of
|
||||
autocommands be made faster? (#7056)
|
||||
|
||||
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
|
||||
replace this:
|
||||
@ -341,6 +346,8 @@ Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
|
||||
let res = GetLeftFunc() <=> GetRightFunc() ?< lower ?= equal ?> upper
|
||||
Patch to make :q work with local arglist. (Christian Brabandt, #6286)
|
||||
|
||||
Why does Test_invalid_sid() not work in the GUI?
|
||||
|
||||
Lua: updating wrong buffer when using newly created, unloaded buffer.
|
||||
(#6539)
|
||||
|
||||
@ -432,7 +439,6 @@ Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
|
||||
May 20)
|
||||
Also put :argadd commands at the start for all buffers, so that their order
|
||||
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 #5326: netrw buffers are not restored.
|
||||
|
||||
Alternate file is not set in the session file. Use setwintabvar("@#") ?
|
||||
@ -525,6 +531,7 @@ Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
Display messed up with matchparen, wrapping and scrolling. (#5638)
|
||||
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
|
||||
|
||||
When getting a focus event halfway a mapping this aborts the mapping. E.g.
|
||||
when "qq" is mapped and after the first "q" the mouse is moved outside of the
|
||||
@ -571,10 +578,6 @@ Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
|
||||
|
||||
":2resize +10" uses size of the current window, adds 10 and applies it to
|
||||
window 2. User expects 10 to be added to size of window 2. (Daniel Steinberg,
|
||||
#5443)
|
||||
|
||||
Would be nice to set tab-local values for 'diffexpr' and 'diffopt'. Use
|
||||
t:diffexpr_option t:diffopt_option? (#4782)
|
||||
|
||||
@ -1250,8 +1253,6 @@ GTK: When adding a timer from 'balloonexpr' it won't fire, because
|
||||
g_main_context_iteration() doesn't return. Need to trigger an event when the
|
||||
timer expires.
|
||||
|
||||
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
|
||||
|
||||
Rule to use "^" for statusline does not work if a space is defined with
|
||||
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
|
||||
|
||||
@ -1484,8 +1485,6 @@ Have a way to get the call stack, in a function and from an exception.
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
|
||||
|
||||
Patch to improve map documentation. Issue #799.
|
||||
|
||||
We can use '. to go to the last change in the current buffer, but how about
|
||||
@ -1705,8 +1704,6 @@ Extended file attributes lost on write (backupcopy=no). Issue 306.
|
||||
Patch to add :lockjumps. (Carlo Baldassi, 2015 May 25)
|
||||
OK to not block marks?
|
||||
|
||||
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
When two SIGWINCH arrive very quickly, the second one may be lost.
|
||||
@ -1773,14 +1770,6 @@ arguments.
|
||||
|
||||
Problem with transparent and matchgroup. Issue #475
|
||||
|
||||
Spell files use a latin single quote. Unicode also has another single quote:
|
||||
0x2019. (Ron Aaron, 2014 Apr 4)
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be downloaded.
|
||||
|
||||
Spell checking: Add a feature to only consider two spaces after a dot to start
|
||||
a new sentence. Don't give the capitalization error when there is one space.
|
||||
|
||||
Idea: For a window in the middle (has window above and below it), use
|
||||
right-mouse-drag on the status line to move a window up/down without changing
|
||||
its height? It's like dragging the status bar above it at the same time.
|
||||
@ -2455,9 +2444,6 @@ Don't load macmap.vim on startup, turn it into a plugin. (Ron Aaron,
|
||||
|
||||
Add "no_hlsearch" to winsaveview().
|
||||
|
||||
Cursorline highlighting combines with Search ('hlsearch') but not with
|
||||
SpellBad. (Jim Karsten, 2009 Mar 18)
|
||||
|
||||
When 'foldmethod' is "indent", adding an empty line below a fold and then
|
||||
indented text, creates a new fold instead of joining it with the previous one.
|
||||
(Evan Laforge, 2009 Oct 17)
|
||||
@ -2964,12 +2950,6 @@ the Visual area. Can this be fixed? (James Vega, 2006 Sept 15)
|
||||
|
||||
GUI: When combining fg en bg make sure they are not equal.
|
||||
|
||||
Spell checking: Add a way to specify punctuation characters. Add the
|
||||
superscript numbers by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079.
|
||||
|
||||
Spell checking in popup menu: If the only problem is the case of the first
|
||||
character, don't offer "ignore" and "add to word list".
|
||||
|
||||
Use different pt_br dictionary for spell checking. (Jackson A. Aquino, 2006
|
||||
Jun 5)
|
||||
|
||||
@ -2983,10 +2963,6 @@ Jul 22)
|
||||
|
||||
There should be something about spell checking in the user manual.
|
||||
|
||||
Spell menu: When using the Popup menu to select a replacement word,
|
||||
":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use "z="
|
||||
somehow? Or use a new function.
|
||||
|
||||
Mac: Using gvim: netrw window disappears. (Nick Lo, 2006 Jun 21)
|
||||
|
||||
Add an option to specify the character to use when a double-width character is
|
||||
@ -3270,6 +3246,29 @@ Better 'rightleft' or BIDI support:
|
||||
- Minimal Vi with bidi support: https://github.com/aligrudi/neatvi
|
||||
By Ali Gholami Rudi, also worked on arabic.c
|
||||
|
||||
|
||||
Spell checking:
|
||||
- When 'cursorline' is set and the first word should have SpellCap
|
||||
highlighting, redrawing the line removes it when moving the cursor away
|
||||
from the line. (#7085) Would need to inspect the end of the previous line
|
||||
and update "capcol_lnum" and "cap_col".
|
||||
- Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
- Spell files use a latin single quote. Unicode also has another single
|
||||
quote: 0x2019. (Ron Aaron, 2014 Apr 4)
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be
|
||||
downloaded.
|
||||
- Add a feature to only consider two spaces after a dot to start a new
|
||||
sentence. Don't give the capitalization error when there is one space.
|
||||
- Add a way to specify punctuation characters. Add the superscript numbers
|
||||
by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079.
|
||||
- In popup menu: If the only problem is the case of the first character,
|
||||
don't offer "ignore" and "add to word list".
|
||||
- Spell menu: When using the Popup menu to select a replacement word,
|
||||
":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use
|
||||
"z=" somehow? Or use a new function.
|
||||
|
||||
|
||||
Quickfix/Location List:
|
||||
- Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
|
||||
#2999)
|
||||
@ -3838,10 +3837,6 @@ Macintosh:
|
||||
on the status line (caused by 'winheight'). Select window on button up,
|
||||
instead of on button down.
|
||||
8 Dragging the status line doesn't scroll but redraw.
|
||||
9 Evaluating 'statusline' in build_stl_str_hl() does not properly check for
|
||||
reaching the end of the available buffer.
|
||||
Patch to dynamically allocate the buffer for % items. (Eric Arnold, 2006
|
||||
May 14)
|
||||
8 When performing incremental search, should abort searching as soon as a
|
||||
character is typed.
|
||||
8 When the value of $MAKE contains a path, configure can't handle this.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*undo.txt* For Vim version 8.2. Last change: 2020 Oct 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -392,7 +392,7 @@ back the text of three deletes ago with '"3P'.
|
||||
*redo-register*
|
||||
If you want to get back more than one part of deleted text, you can use a
|
||||
special feature of the repeat command ".". It will increase the number of the
|
||||
register used. So if you first do ""1P", the following "." will result in a
|
||||
register used. So if you first do '"1P', the following "." will result in a
|
||||
'"2P'. Repeating this will result in all numbered registers being inserted.
|
||||
|
||||
Example: If you deleted text with 'dd....' it can be restored with
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_11.txt* For Vim version 8.2. Last change: 2020 Jul 08
|
||||
*usr_11.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -294,7 +294,7 @@ If you really don't want to see this message, you can add the 'A' flag to the
|
||||
'shortmess' option. But it's very unusual that you need this.
|
||||
|
||||
For remarks about encryption and the swap file, see |:recover-crypt|.
|
||||
For programatic access to the swap file, see |swapinfo()|.
|
||||
For programmatic access to the swap file, see |swapinfo()|.
|
||||
|
||||
==============================================================================
|
||||
*11.4* Further reading
|
||||
|
@ -604,6 +604,7 @@ String manipulation: *string-functions*
|
||||
match() position where a pattern matches in a string
|
||||
matchend() position where a pattern match ends in a string
|
||||
matchfuzzy() fuzzy matches a string in a list of strings
|
||||
matchfuzzypos() fuzzy matches a string in a list of strings
|
||||
matchstr() match of a pattern in a string
|
||||
matchstrpos() match and positions of a pattern in a string
|
||||
matchlist() like matchstr() and also return submatches
|
||||
@ -643,6 +644,7 @@ List manipulation: *list-functions*
|
||||
deepcopy() make a full copy of a List
|
||||
filter() remove selected items from a List
|
||||
map() change each List item
|
||||
mapnew() make a new List with changed items
|
||||
reduce() reduce a List to a value
|
||||
sort() sort a List
|
||||
reverse() reverse the order of a List
|
||||
@ -668,6 +670,7 @@ Dictionary manipulation: *dict-functions*
|
||||
extend() add entries from one Dictionary to another
|
||||
filter() remove selected entries from a Dictionary
|
||||
map() change each Dictionary entry
|
||||
mapnew() make a new Dictionary with changed items
|
||||
keys() get List of Dictionary keys
|
||||
values() get List of Dictionary values
|
||||
items() get List of Dictionary key-value pairs
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*version7.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -10260,7 +10260,7 @@ Commands:
|
||||
Brabandt)
|
||||
|
||||
Other:
|
||||
Lua interface now also uses userdata binded to Vim structures. (Taro
|
||||
Lua interface now also uses userdata bound to Vim structures. (Taro
|
||||
Muraoka, Luis Carvalho)
|
||||
|
||||
glob() and autocommand patterns used to work with the undocumented
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -47698,7 +47698,7 @@ Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
Patch 8.2.1064
|
||||
Problem: Vim9: no line break allowed before comparators.
|
||||
Solution: Check for comperator after line break.
|
||||
Solution: Check for comparator after line break.
|
||||
Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
Patch 8.2.1065
|
||||
@ -48515,7 +48515,7 @@ Solution: Recognize true and false.
|
||||
Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
Patch 8.2.1205
|
||||
Problem: Vim9: && and || work different when not compiled.
|
||||
Problem: Vim9: && and || work differently when not compiled.
|
||||
Solution: Keep the value.
|
||||
Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
|
@ -459,6 +459,9 @@ Use {name} as the server name. Used for the current Vim, unless used with a
|
||||
\-\-socketid {id}
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
|
||||
.TP
|
||||
\-\-startuptime {file}
|
||||
During startup write timing messages to the file {fname}.
|
||||
.TP
|
||||
\-\-version
|
||||
Print version information and exit.
|
||||
.SH ON-LINE HELP
|
||||
|
@ -345,6 +345,9 @@ OPTIONS
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in an‐
|
||||
other window.
|
||||
|
||||
--startuptime {file}
|
||||
During startup write timing messages to the file {fname}.
|
||||
|
||||
--version Print version information and exit.
|
||||
|
||||
ON-LINE HELP
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Sep 17
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -65,12 +65,41 @@ rewrite old scripts, they keep working as before. You may want to use a few
|
||||
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
Overview ~
|
||||
|
||||
Brief summary of the differences you will most often encounter when using Vim9
|
||||
script and `:def` functions; details are below:
|
||||
- Comments start with #, not ": >
|
||||
echo "hello" # comment
|
||||
- Using a backslash for line continuation is hardly ever needed: >
|
||||
echo "hello "
|
||||
.. yourName
|
||||
.. ", how are you?"
|
||||
- White space is required in many places.
|
||||
- Assign values without `:let`, declare variables with `:var`: >
|
||||
var count = 0
|
||||
count += 3
|
||||
- Constants can be declared with `:final` and `:const`: >
|
||||
final matches = [] # add matches
|
||||
const names = ['Betty', 'Peter'] # cannot be changed
|
||||
- `:final` cannot be used as an abbreviation of `:finally`.
|
||||
- Variables and functions are script-local by default.
|
||||
- Functions are declared with argument types and return type: >
|
||||
def CallMe(count: number, message: string): bool
|
||||
- Call functions without `:call`: >
|
||||
writefile(['done'], 'file.txt')
|
||||
- You cannot use `:xit`, `:t`, `:append`, `:change`, `:insert` or curly-braces
|
||||
names.
|
||||
- A range before a command must be prefixed with a colon: >
|
||||
:%s/this/that
|
||||
|
||||
|
||||
Comments starting with # ~
|
||||
|
||||
In legacy Vim script comments start with double quote. In Vim9 script
|
||||
comments start with #. >
|
||||
# declarations
|
||||
let count = 0 # number of occurrences
|
||||
var count = 0 # number of occurrences
|
||||
|
||||
The reason is that a double quote can also be the start of a string. In many
|
||||
places, especially halfway through an expression with a line break, it's hard
|
||||
@ -125,25 +154,30 @@ Functions and variables are script-local by default ~
|
||||
*vim9-scopes*
|
||||
When using `:function` or `:def` to specify a new function at the script level
|
||||
in a Vim9 script, the function is local to the script, as if "s:" was
|
||||
prefixed. Using the "s:" prefix is optional. To define or use a global
|
||||
function or variable the "g:" prefix should be used. For functions in an
|
||||
autoload script the "name#" prefix is sufficient. >
|
||||
prefixed. Using the "s:" prefix is optional. To define a global function or
|
||||
variable the "g:" prefix must be used. For functions in an autoload script
|
||||
the "name#" prefix is sufficient. >
|
||||
def ThisFunction() # script-local
|
||||
def s:ThisFunction() # script-local
|
||||
def g:ThatFunction() # global
|
||||
def ThatFunction() # global if no local ThatFunction()
|
||||
def scriptname#function() # autoload
|
||||
|
||||
When using `:function` or `:def` to specify a new function inside a function,
|
||||
the function is local to the function. It is not possible to define a
|
||||
script-local function inside a function. It is possible to define a global
|
||||
function, using the "g:" prefix.
|
||||
When using `:function` or `:def` to specify a nested function inside a `:def`
|
||||
function, this nested function is local to the code block it is defined in.
|
||||
In a `:def` function it is not possible to define a script-local function. It
|
||||
is possible to define a global function by using the "g:" prefix.
|
||||
|
||||
When referring to a function and no "s:" or "g:" prefix is used, Vim will
|
||||
prefer using a local function (in the function scope, script scope or
|
||||
imported) before looking for a global function.
|
||||
search for the function:
|
||||
- in the function scope, in block scopes
|
||||
- in the script scope, possibly imported
|
||||
- in the list of global functions
|
||||
However, it is recommended to always use "g:" to refer to a global function
|
||||
for clarity.
|
||||
|
||||
In all cases the function must be defined before used. That is when it is
|
||||
first called or when `:defcompile` causes the call to be compiled.
|
||||
called, when `:defcompile` causes it to be compiled, or when code that calls
|
||||
it is being compiled (to figure out the return type).
|
||||
|
||||
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
|
||||
@ -154,31 +188,32 @@ Vim9 script script-local functions are defined once when the script is sourced
|
||||
and cannot be deleted or replaced.
|
||||
|
||||
|
||||
Variable declarations with :let and :const ~
|
||||
*vim9-declaration*
|
||||
Local variables need to be declared with `:let`. Local constants need to be
|
||||
declared with `:const`. We refer to both as "variables".
|
||||
Variable declarations with :var, :final and :const ~
|
||||
*vim9-declaration* *:var*
|
||||
Local variables need to be declared with `:var`. Local constants need to be
|
||||
declared with `:final` or `:const`. We refer to both as "variables" in this
|
||||
section.
|
||||
|
||||
Variables can be local to a script, function or code block: >
|
||||
vim9script
|
||||
let script_var = 123
|
||||
var script_var = 123
|
||||
def SomeFunc()
|
||||
let func_var = script_var
|
||||
var func_var = script_var
|
||||
if cond
|
||||
let block_var = func_var
|
||||
var block_var = func_var
|
||||
...
|
||||
|
||||
The variables are only visible in the block where they are defined and nested
|
||||
blocks. Once the block ends the variable is no longer accessible: >
|
||||
if cond
|
||||
let inner = 5
|
||||
var inner = 5
|
||||
else
|
||||
let inner = 0
|
||||
var inner = 0
|
||||
endif
|
||||
echo inner # Error!
|
||||
|
||||
The declaration must be done earlier: >
|
||||
let inner: number
|
||||
var inner: number
|
||||
if cond
|
||||
inner = 5
|
||||
else
|
||||
@ -186,10 +221,10 @@ The declaration must be done earlier: >
|
||||
endif
|
||||
echo inner
|
||||
|
||||
To intentionally avoid a variable being available later, a block can be used:
|
||||
>
|
||||
To intentionally hide a variable from code that follows, a block can be
|
||||
used: >
|
||||
{
|
||||
let temp = 'temp'
|
||||
var temp = 'temp'
|
||||
...
|
||||
}
|
||||
echo temp # Error!
|
||||
@ -197,9 +232,9 @@ To intentionally avoid a variable being available later, a block can be used:
|
||||
Declaring a variable with a type but without an initializer will initialize to
|
||||
zero, false or empty.
|
||||
|
||||
An existing variable cannot be assigned to with `:let`, since that implies a
|
||||
declaration. Global, window, tab, buffer and Vim variables can only be used
|
||||
without `:let`, because they are not really declared, they can also be deleted
|
||||
In Vim9 script `:let` cannot be used. An existing variable is assigned to
|
||||
without any command. The same for global, window, tab, buffer and Vim
|
||||
variables, because they are not really declared. They can also be deleted
|
||||
with `:unlet`.
|
||||
|
||||
Variables and functions cannot shadow previously defined or imported variables
|
||||
@ -209,51 +244,50 @@ Variables may shadow Ex commands, rename the variable if needed.
|
||||
Global variables and user defined functions must be prefixed with "g:", also
|
||||
at the script level. >
|
||||
vim9script
|
||||
let script_local = 'text'
|
||||
var script_local = 'text'
|
||||
g:global = 'value'
|
||||
let Funcref = g:ThatFunction
|
||||
var Funcref = g:ThatFunction
|
||||
|
||||
Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
|
||||
Since `&opt = value` is now assigning a value to option "opt", ":&" cannot be
|
||||
used to repeat a `:substitute` command.
|
||||
*vim9-const*
|
||||
In legacy Vim script "const list = []" would make the variable "list"
|
||||
immutable and also the value. Thus you cannot add items to the list. This
|
||||
differs from what many languages do. Vim9 script does it like TypeScript: only
|
||||
"list" is immutable, the value can be changed.
|
||||
|
||||
One can use `:const!` to make both the variable and the value immutable. Use
|
||||
|
||||
Constants ~
|
||||
*vim9-const* *vim9-final*
|
||||
How constants work varies between languages. Some consider a variable that
|
||||
can't be assigned another value a constant. JavaScript is an example. Others
|
||||
also make the value immutable, thus when a constant uses a list, the list
|
||||
cannot be changed. In Vim9 we can use both.
|
||||
|
||||
`:const` is used for making both the variable and the value a constant. Use
|
||||
this for composite structures that you want to make sure will not be modified.
|
||||
Example: >
|
||||
const myList = [1, 2]
|
||||
myList = [3, 4] # Error!
|
||||
myList[0] = 9 # Error!
|
||||
muList->add(3) # Error!
|
||||
< *:final*
|
||||
`:final` is used for making only the variable a constant, the value can be
|
||||
changed. This is well known from Java. Example: >
|
||||
final myList = [1, 2]
|
||||
myList = [3, 4] # Error!
|
||||
myList[0] = 9 # OK
|
||||
muList->add(3) # OK
|
||||
|
||||
How this works: >
|
||||
vim9script
|
||||
const list = [1, 2]
|
||||
list = [3, 4] # Error!
|
||||
list[0] = 2 # OK
|
||||
|
||||
const! LIST = [1, 2]
|
||||
LIST = [3, 4] # Error!
|
||||
LIST[0] = 2 # Error!
|
||||
It is common to write constants as ALL_CAPS, but you don't have to.
|
||||
|
||||
The constant only applies to the value itself, not what it refers to. >
|
||||
cont females = ["Mary"]
|
||||
const! NAMES = [["John", "Peter"], females]
|
||||
final females = ["Mary"]
|
||||
const NAMES = [["John", "Peter"], females]
|
||||
NAMES[0] = ["Jack"] # Error!
|
||||
NAMES[0][0] = ["Jack"] # Error!
|
||||
NAMES[0][0] = "Jack" # Error!
|
||||
NAMES[1] = ["Emma"] # Error!
|
||||
Names[1][0] = "Emma" # OK, now females[0] == "Emma"
|
||||
|
||||
Rationale: TypeScript has no way to make the value immutable. One can use
|
||||
immutable types, but that quickly gets complicated for nested values. And
|
||||
with a type cast the value can be made mutable again, which means there is no
|
||||
guarantee the value won't change. Vim supports immutable values, in legacy
|
||||
script this was done with `:lockvar`. But that is an extra statement and also
|
||||
applies to nested values. Therefore the solution to use `:const!`.
|
||||
|
||||
*E1092*
|
||||
< *E1092*
|
||||
Declaring more than one variable at a time, using the unpack notation, is
|
||||
currently not supported: >
|
||||
let [v1, v2] = GetValues() # Error!
|
||||
var [v1, v2] = GetValues() # Error!
|
||||
That is because the type needs to be inferred from the list item type, which
|
||||
isn't that easy.
|
||||
|
||||
@ -296,7 +330,7 @@ A user defined function can be used as a function reference in an expression
|
||||
without `function()`. The argument types and return type will then be checked.
|
||||
The function must already have been defined. >
|
||||
|
||||
let Funcref = MyFunction
|
||||
var Funcref = MyFunction
|
||||
|
||||
When using `function()` the resulting type is "func", a function with any
|
||||
number of arguments and any return type. The function can be defined later.
|
||||
@ -307,53 +341,53 @@ Automatic line continuation ~
|
||||
In many cases it is obvious that an expression continues on the next line. In
|
||||
those cases there is no need to prefix the line with a backslash
|
||||
|line-continuation|. For example, when a list spans multiple lines: >
|
||||
let mylist = [
|
||||
var mylist = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
And when a dict spans multiple lines: >
|
||||
let mydict = #{
|
||||
var mydict = #{
|
||||
one: 1,
|
||||
two: 2,
|
||||
}
|
||||
Function call: >
|
||||
let result = Func(
|
||||
var result = Func(
|
||||
arg1,
|
||||
arg2
|
||||
)
|
||||
|
||||
For binary operators in expressions not in [], {} or () a line break is
|
||||
possible just before or after the operator. For example: >
|
||||
let text = lead
|
||||
var text = lead
|
||||
.. middle
|
||||
.. end
|
||||
let total = start +
|
||||
var total = start +
|
||||
end -
|
||||
correction
|
||||
let result = positive
|
||||
var result = positive
|
||||
? PosFunc(arg)
|
||||
: NegFunc(arg)
|
||||
|
||||
For a method call using "->" and a member using a dot, a line break is allowed
|
||||
before it: >
|
||||
let result = GetBuilder()
|
||||
var result = GetBuilder()
|
||||
->BuilderSetWidth(333)
|
||||
->BuilderSetHeight(777)
|
||||
->BuilderBuild()
|
||||
let result = MyDict
|
||||
var result = MyDict
|
||||
.member
|
||||
|
||||
< *E1050*
|
||||
To make it possible for the operator at the start of the line to be
|
||||
recognized, it is required to put a colon before a range. This will add
|
||||
"start" and print: >
|
||||
let result = start
|
||||
var result = start
|
||||
+ print
|
||||
Like this: >
|
||||
let result = start + print
|
||||
var result = start + print
|
||||
|
||||
This will assign "start" and print a line: >
|
||||
let result = start
|
||||
var result = start
|
||||
:+ print
|
||||
|
||||
It is also possible to split a function header over multiple lines, in between
|
||||
@ -411,15 +445,15 @@ The 'ignorecase' option is not used for comparators that use strings.
|
||||
White space ~
|
||||
|
||||
Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
let var=234 # Error!
|
||||
let var= 234 # Error!
|
||||
let var =234 # Error!
|
||||
var name=234 # Error!
|
||||
var name= 234 # Error!
|
||||
var name =234 # Error!
|
||||
There must be white space before and after the "=": >
|
||||
let var = 234 # OK
|
||||
var name = 234 # OK
|
||||
White space must also be put before the # that starts a comment after a
|
||||
command: >
|
||||
let var = 234# Error!
|
||||
let var = 234 # OK
|
||||
var name = 234# Error!
|
||||
var name = 234 # OK
|
||||
|
||||
White space is required around most operators.
|
||||
|
||||
@ -438,15 +472,21 @@ White space is not allowed:
|
||||
|
||||
Conditions and expressions ~
|
||||
|
||||
Conditions and expressions are mostly working like they do in JavaScript. A
|
||||
difference is made where JavaScript does not work like most people expect.
|
||||
Specifically, an empty list is falsey.
|
||||
Conditions and expressions are mostly working like they do in other languages.
|
||||
Some values are different from legacy Vim script:
|
||||
value legacy Vim script Vim9 script ~
|
||||
0 falsy falsy
|
||||
1 truthy truthy
|
||||
99 truthy Error!
|
||||
"0" falsy Error!
|
||||
"99" truthy Error!
|
||||
"text" falsy Error!
|
||||
|
||||
Any type of variable can be used as a condition, there is no error, not even
|
||||
for using a list or job. This is very much like JavaScript, but there are a
|
||||
few exceptions.
|
||||
For the "??" operator and when using "!" then there is no error, every value
|
||||
is either falsy or truthy. This is mostly like JavaScript, except that an
|
||||
empty list and dict is falsy:
|
||||
|
||||
type TRUE when ~
|
||||
type truthy when ~
|
||||
bool v:true or 1
|
||||
number non-zero
|
||||
float non-zero
|
||||
@ -461,17 +501,25 @@ few exceptions.
|
||||
class when not NULL
|
||||
object when not NULL (TODO: when isTrue() returns v:true)
|
||||
|
||||
The boolean operators "||" and "&&" do not change the value: >
|
||||
8 || 2 == 8
|
||||
0 || 2 == 2
|
||||
0 || '' == ''
|
||||
8 && 2 == 2
|
||||
0 && 2 == 0
|
||||
2 && 0 == 0
|
||||
[] && 2 == []
|
||||
The boolean operators "||" and "&&" expect the values to be boolean, zero or
|
||||
one: >
|
||||
1 || false == true
|
||||
0 || 1 == true
|
||||
0 || false == false
|
||||
1 && true == true
|
||||
0 && 1 == false
|
||||
8 || 0 Error!
|
||||
'yes' && 0 Error!
|
||||
[] || 99 Error!
|
||||
|
||||
When using `..` for string concatenation arguments of simple types are always
|
||||
converted to string. >
|
||||
When using "!" for inverting, there is no error for using any type and the
|
||||
result is a boolean. "!!" can be used to turn any value into boolean: >
|
||||
!'yes' == false
|
||||
!![] == false
|
||||
!![1, 2, 3] == true
|
||||
|
||||
When using "`.."` for string concatenation arguments of simple types are
|
||||
always converted to string: >
|
||||
'hello ' .. 123 == 'hello 123'
|
||||
'hello ' .. v:true == 'hello v:true'
|
||||
|
||||
@ -582,9 +630,10 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
It is possible to nest `:def` inside another `:def` or
|
||||
`:function` up to about 50 levels deep.
|
||||
|
||||
[!] is used as with `:function`. Note that in Vim9
|
||||
script script-local functions cannot be deleted or
|
||||
redefined later in the same script.
|
||||
[!] is used as with `:function`. Note that
|
||||
script-local functions cannot be deleted or redefined
|
||||
later in Vim9 script. They can only be removed by
|
||||
reloading the same script.
|
||||
|
||||
*:enddef*
|
||||
:enddef End of a function defined with `:def`. It should be on
|
||||
@ -612,14 +661,14 @@ Limitations ~
|
||||
|
||||
Local variables will not be visible to string evaluation. For example: >
|
||||
def EvalString(): list<string>
|
||||
let list = ['aa', 'bb', 'cc', 'dd']
|
||||
var list = ['aa', 'bb', 'cc', 'dd']
|
||||
return range(1, 2)->map('list[v:val]')
|
||||
enddef
|
||||
|
||||
The map argument is a string expression, which is evaluated without the
|
||||
function scope. Instead, use a lambda: >
|
||||
def EvalString(): list<string>
|
||||
let list = ['aa', 'bb', 'cc', 'dd']
|
||||
var list = ['aa', 'bb', 'cc', 'dd']
|
||||
return range(1, 2)->map({ _, v -> list[v] })
|
||||
enddef
|
||||
|
||||
@ -690,23 +739,23 @@ builtin types added later, similarly to user functions.
|
||||
|
||||
And classes and interfaces can be used as types: >
|
||||
:class MyClass
|
||||
:let mine: MyClass
|
||||
:var mine: MyClass
|
||||
|
||||
:interface MyInterface
|
||||
:let mine: MyInterface
|
||||
:var mine: MyInterface
|
||||
|
||||
:class MyTemplate<Targ>
|
||||
:let mine: MyTemplate<number>
|
||||
:let mine: MyTemplate<string>
|
||||
:var mine: MyTemplate<number>
|
||||
:var mine: MyTemplate<string>
|
||||
|
||||
:class MyInterface<Targ>
|
||||
:let mine: MyInterface<number>
|
||||
:let mine: MyInterface<string>
|
||||
:var mine: MyInterface<number>
|
||||
:var mine: MyInterface<string>
|
||||
{not implemented yet}
|
||||
|
||||
|
||||
Variable types and type casting *variable-types*
|
||||
|
||||
Variable types and type casting ~
|
||||
*variable-types*
|
||||
Variables declared in Vim9 script or in a `:def` function have a type, either
|
||||
specified explicitly or inferred from the initialization.
|
||||
|
||||
@ -716,10 +765,10 @@ compiled code the "any" type is assumed.
|
||||
|
||||
This can be a problem when the "any" type is undesired and the actual type is
|
||||
expected to always be the same. For example, when declaring a list: >
|
||||
let l: list<number> = [1, g:two]
|
||||
var l: list<number> = [1, g:two]
|
||||
This will give an error, because "g:two" has type "any". To avoid this, use a
|
||||
type cast: >
|
||||
let l: list<number> = [1, <number>g:two]
|
||||
var l: list<number> = [1, <number>g:two]
|
||||
< *type-casting*
|
||||
The compiled code will then check that "g:two" is a number at runtime and give
|
||||
an error if it isn't. This is called type casting.
|
||||
@ -734,12 +783,12 @@ it to a string, use the |string()| function. Or use |str2nr()| to convert a
|
||||
string to a number.
|
||||
|
||||
|
||||
Type inference *type-inference*
|
||||
|
||||
Type inference ~
|
||||
*type-inference*
|
||||
In general: Whenever the type is clear it can be omitted. For example, when
|
||||
declaring a variable and giving it a value: >
|
||||
let var = 0 # infers number type
|
||||
let var = 'hello' # infers string type
|
||||
var name = 0 # infers number type
|
||||
var name = 'hello' # infers string type
|
||||
|
||||
The type of a list and dictionary comes from the common type of the values.
|
||||
If the values all have the same type, that type is used for the list or
|
||||
@ -749,8 +798,8 @@ dictionary. If there is a mix of types, the "any" type is used. >
|
||||
[1, 'x', 3] list<any>
|
||||
|
||||
|
||||
Stricter type checking *type-checking*
|
||||
|
||||
Stricter type checking ~
|
||||
*type-checking*
|
||||
In legacy Vim script, where a number was expected, a string would be
|
||||
automatically converted to a number. This was convenient for an actual number
|
||||
such as "123", but leads to unexpected problems (but no error message) if the
|
||||
@ -766,7 +815,7 @@ an error, thus breaking backwards compatibility. For example:
|
||||
|
||||
==============================================================================
|
||||
|
||||
5. Namespace, Import and Export
|
||||
5. Namespace, Import and Export
|
||||
*vim9script* *vim9-export* *vim9-import*
|
||||
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
@ -786,7 +835,7 @@ appear as the first statement in the file. It tells Vim to interpret the
|
||||
script in its own namespace, instead of the global namespace. If a file
|
||||
starts with: >
|
||||
vim9script
|
||||
let myvar = 'yes'
|
||||
var myvar = 'yes'
|
||||
Then "myvar" will only exist in this file. While without `vim9script` it would
|
||||
be available as `g:myvar` from any other script and function.
|
||||
|
||||
@ -809,7 +858,9 @@ Export ~
|
||||
*:export* *:exp*
|
||||
Exporting an item can be written as: >
|
||||
export const EXPORTED_CONST = 1234
|
||||
export let someValue = ...
|
||||
export var someValue = ...
|
||||
export final someValue = ...
|
||||
export const someValue = ...
|
||||
export def MyFunc() ...
|
||||
export class MyClass ...
|
||||
|
||||
@ -850,7 +901,7 @@ The script name after `import` can be:
|
||||
location of the script file itself. This is useful to split up a large
|
||||
plugin into several files.
|
||||
- An absolute path, starting with "/" on Unix or "D:/" on MS-Windows. This
|
||||
will be rarely used.
|
||||
will rarely be used.
|
||||
- A path not being relative or absolute. This will be found in the
|
||||
"import" subdirectories of 'runtimepath' entries. The name will usually be
|
||||
longer and unique, to avoid loading the wrong file.
|
||||
@ -880,7 +931,7 @@ actually needed. A recommended mechanism:
|
||||
vim9script
|
||||
import FilterFunc from "../import/someother.vim"
|
||||
def searchfor#Stuff(arg: string)
|
||||
let filtered = FilterFunc(arg)
|
||||
var filtered = FilterFunc(arg)
|
||||
...
|
||||
< This goes in .../autoload/searchfor.vim. "searchfor" in the file name
|
||||
must be exactly the same as the prefix for the function name, that is how
|
||||
@ -889,7 +940,7 @@ actually needed. A recommended mechanism:
|
||||
3. Other functionality, possibly shared between plugins, contains the exported
|
||||
items and any private items. >
|
||||
vim9script
|
||||
let localVar = 'local'
|
||||
var localVar = 'local'
|
||||
export def FilterFunc(arg: string): string
|
||||
...
|
||||
< This goes in .../import/someother.vim.
|
||||
@ -909,7 +960,7 @@ namespace will be used for the imported item, even when "s:" is not specified.
|
||||
6. Future work: classes *vim9-classes*
|
||||
|
||||
Above "class" was mentioned a few times, but it has not been implemented yet.
|
||||
Most of Vim9 script can be created without this funcionality, and since
|
||||
Most of Vim9 script can be created without this functionality, and since
|
||||
implementing classes is going to be a lot of work, it is left for the future.
|
||||
For now we'll just make sure classes can be added later.
|
||||
|
||||
@ -941,7 +992,7 @@ invoke callbacks and handle timeouts and errors.
|
||||
|
||||
The :def command ~
|
||||
|
||||
Plugin writers have asked for a much faster Vim script. Investigations have
|
||||
Plugin writers have asked for much faster Vim script. Investigations have
|
||||
shown that keeping the existing semantics of function calls make this close to
|
||||
impossible, because of the overhead involved with calling a function, setting
|
||||
up the local function scope and executing lines. There are many details that
|
||||
@ -952,7 +1003,7 @@ much overhead that cannot be avoided.
|
||||
Therefore the `:def` method to define a new-style function had to be added,
|
||||
which allows for a function with different semantics. Most things still work
|
||||
as before, but some parts do not. A new way to define a function was
|
||||
considered the best way to separate the old-style code from Vim9 script code.
|
||||
considered the best way to separate the legacy style code from Vim9 style code.
|
||||
|
||||
Using "def" to define a function comes from Python. Other languages use
|
||||
"function" which clashes with legacy Vim script.
|
||||
@ -968,12 +1019,12 @@ instruction, at execution time the instruction would have to inspect the type
|
||||
of the arguments and decide what kind of addition to do. And when the
|
||||
type is dictionary throw an error. If the types are known to be numbers then
|
||||
an "add number" instruction can be used, which is faster. The error can be
|
||||
given at compile time, no error handling is needed at runtime, adding two
|
||||
numbers cannot fail.
|
||||
given at compile time, no error handling is needed at runtime, since adding
|
||||
two numbers cannot fail.
|
||||
|
||||
The syntax for types is similar to Java, since it is easy to understand and
|
||||
widely used. The type names are what were used in Vim before, with some
|
||||
additions such as "void" and "bool".
|
||||
The syntax for types, using <type> for compound types, is similar to Java. It
|
||||
is easy to understand and widely used. The type names are what were used in
|
||||
Vim before, with some additions such as "void" and "bool".
|
||||
|
||||
|
||||
Removing clutter and weirdness ~
|
||||
@ -981,10 +1032,10 @@ Removing clutter and weirdness ~
|
||||
Once decided that `:def` functions have different syntax than legacy functions,
|
||||
we are free to add improvements to make the code more familiar for users who
|
||||
know popular programming languages. In other words: remove weird things that
|
||||
only Vim uses.
|
||||
only Vim does.
|
||||
|
||||
We can also remove clutter, mainly things that were done to make Vim script
|
||||
backwards compatible with good old Vi commands.
|
||||
backwards compatible with the good old Vi commands.
|
||||
|
||||
Examples:
|
||||
- Drop `:call` for calling a function and `:eval` for manipulating data.
|
||||
@ -993,44 +1044,26 @@ Examples:
|
||||
|
||||
However, this does require that some things need to change:
|
||||
- Comments start with # instead of ", to avoid confusing them with strings.
|
||||
This is good anyway, it is known from several popular languages.
|
||||
- Ex command ranges need to be prefixed with a colon, to avoid confusion with
|
||||
expressions (single quote can be a string or a mark, "/" can be divide or a
|
||||
search command, etc.).
|
||||
|
||||
Goal is to limit the differences. A good criteria is that when the old syntax
|
||||
is used you are very likely to get an error message.
|
||||
is accidentally used you are very likely to get an error message.
|
||||
|
||||
|
||||
TypeScript syntax and semantics ~
|
||||
Syntax and semantics from popular languages ~
|
||||
|
||||
Script writers have complained that the Vim script syntax is unexpectedly
|
||||
different from what they are used to. To reduce this complaint popular
|
||||
languages are used as an example. At the same time, we do not want to abandon
|
||||
the well-known parts of legacy Vim script.
|
||||
|
||||
Since Vim already uses `:let` and `:const` and optional type checking is
|
||||
desirable, the JavaScript/TypeScript syntax fits best for variable
|
||||
declarations: >
|
||||
const greeting = 'hello' # string type is inferred
|
||||
let name: string
|
||||
...
|
||||
name = 'John'
|
||||
|
||||
Expression evaluation was already close to what JavaScript and other languages
|
||||
are doing. Some details are unexpected and can be fixed. For example how the
|
||||
|| and && operators work. Legacy Vim script: >
|
||||
let value = 44
|
||||
...
|
||||
let result = value || 0 # result == 1
|
||||
|
||||
Vim9 script works like JavaScript/TypeScript, keep the value: >
|
||||
let value = 44
|
||||
...
|
||||
let result = value || 0 # result == 44
|
||||
|
||||
Another reason why TypeScript can be used as an example for Vim9 script is the
|
||||
For many things TypeScript is followed. It's a recent language that is
|
||||
gaining popularity and has similarities with Vim script. It also has a
|
||||
mix of static typing (a variable always has a known value type) and dynamic
|
||||
typing (a variable can have different types, this hanges at runtime). Since
|
||||
typing (a variable can have different types, this changes at runtime). Since
|
||||
legacy Vim script is dynamically typed and a lot of existing functionality
|
||||
(esp. builtin functions) depends on that, while static typing allows for much
|
||||
faster execution, we need to have this mix in Vim9 script.
|
||||
@ -1054,7 +1087,7 @@ Specific items from TypeScript we avoid:
|
||||
- TypeScript can use an expression like "99 || 'yes'" in a condition, but
|
||||
cannot assign the value to a boolean. That is inconsistent and can be
|
||||
annoying. Vim recognizes an expression with && or || and allows using the
|
||||
result as a bool.
|
||||
result as a bool. TODO: to be reconsidered
|
||||
- TypeScript considers an empty string as Falsy, but an empty list or dict as
|
||||
Truthy. That is inconsistent. In Vim an empty list and dict are also
|
||||
Falsy.
|
||||
@ -1063,6 +1096,96 @@ Specific items from TypeScript we avoid:
|
||||
which is more flexible, but is only checked at runtime.
|
||||
|
||||
|
||||
Declarations ~
|
||||
|
||||
Legacy Vim script uses `:let` for every assignment, while in Vim9 declarations
|
||||
are used. That is different, thus it's good to use a different command:
|
||||
`:var`. This is used in many languages. The semantics might be slightly
|
||||
different, but it's easily recognized as a declaration.
|
||||
|
||||
Using `:const` for constants is common, but the semantics vary. Some
|
||||
languages only make the variable immutable, others also make the value
|
||||
immutable. Since "final" is well known from Java for only making the variable
|
||||
immutable we decided to use that. And then `:const` can be used for making
|
||||
both immutable. This was also used in legacy Vim script and the meaning is
|
||||
almost the same.
|
||||
|
||||
What we end up with is very similar to Dart: >
|
||||
:var name # mutable variable and value
|
||||
:final name # immutable variable, mutable value
|
||||
:const name # immutable variable and value
|
||||
|
||||
Since legacy and Vim9 script will be mixed and global variables will be
|
||||
shared, optional type checking is desirable. Also, type inference will avoid
|
||||
the need for specifying the type in many cases. The TypeScript syntax fits
|
||||
best for adding types to declarations: >
|
||||
var name: string # string type is specified
|
||||
...
|
||||
name = 'John'
|
||||
const greeting = 'hello' # string type is inferred
|
||||
|
||||
This is how we put types in a declaration: >
|
||||
var mylist: list<string>
|
||||
final mylist: list<string> = ['foo']
|
||||
def Func(arg1: number, arg2: string): bool
|
||||
|
||||
Two alternatives were considered:
|
||||
1. Put the type before the name, like Dart: >
|
||||
var list<string> mylist
|
||||
final list<string> mylist = ['foo']
|
||||
def Func(number arg1, string arg2) bool
|
||||
2. Put the type after the variable name, but do not use a colon, like Go: >
|
||||
var mylist list<string>
|
||||
final mylist list<string> = ['foo']
|
||||
def Func(arg1 number, arg2 string) bool
|
||||
|
||||
The first is more familiar for anyone used to C or Java. The second one
|
||||
doesn't really have an advantage over the first, so let's discard the second.
|
||||
|
||||
Since we use type inference the type can be left out when it can be inferred
|
||||
from the value. This means that after `var` we don't know if a type or a name
|
||||
follows. That makes parsing harder, not only for Vim but also for humans.
|
||||
Also, it will not be allowed to use a variable name that could be a type name,
|
||||
using `var string string` is too confusing.
|
||||
|
||||
The chosen syntax, using a colon to separate the name from the type, adds
|
||||
punctuation, but it actually makes it easier to recognize the parts of a
|
||||
declaration.
|
||||
|
||||
|
||||
Expressions ~
|
||||
|
||||
Expression evaluation was already close to what other languages are doing.
|
||||
Some details are unexpected and can be improved. For example a boolean
|
||||
condition would accept a string, convert it to a number and check if the
|
||||
number is non-zero. This is unexpected and often leads to mistakes, since
|
||||
text not starting with a number would be converted to zero, which is
|
||||
considered false. Thus using a string for a condition would often not give an
|
||||
error and be considered false. That is confusing.
|
||||
|
||||
In Vim9 type checking is more strict to avoid mistakes. Where a condition is
|
||||
used, e.g. with the `:if` command and the `||` operator, only boolean-like
|
||||
values are accepted:
|
||||
true: `true`, `v:true`, `1`, `0 < 9`
|
||||
false: `false`, `v:false`, `0`, `0 > 9`
|
||||
Note that the number zero is false and the number one is true. This is more
|
||||
permissive than most other languages. It was done because many builtin
|
||||
functions return these values.
|
||||
|
||||
If you have any type of value and want to use it as a boolean, use the `!!`
|
||||
operator:
|
||||
true: !`!'text'`, `!![99]`, `!!{'x': 1}`, `!!99`
|
||||
false: `!!''`, `!![]`, `!!{}`
|
||||
|
||||
From a language like JavaScript we have this handy construct: >
|
||||
GetName() || 'unknown'
|
||||
However, this conflicts with only allowing a boolean for a condition.
|
||||
Therefore the "??" operator was added: >
|
||||
GetName() ?? 'unknown'
|
||||
Here you can explicitly express your intention to use the value as-is and not
|
||||
result in a boolean. This is called the |falsy-operator|.
|
||||
|
||||
|
||||
Import and Export ~
|
||||
|
||||
A problem of legacy Vim script is that by default all functions and variables
|
||||
@ -1122,7 +1245,7 @@ only reported then. In case these errors should be found early, e.g. when
|
||||
testing, the `:defcompile` command will help out.
|
||||
|
||||
|
||||
Why not use an embeded language? ~
|
||||
Why not use an embedded language? ~
|
||||
|
||||
Vim supports interfaces to Perl, Python, Lua, Tcl and a few others. But
|
||||
these interfaces have never become widely used, for various reasons. When
|
||||
|
@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Sep 02
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Nov 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1119,6 +1119,11 @@ list of buffers. |unlisted-buffer|
|
||||
line when the buffer is first entered. Note that other
|
||||
commands after the + will be ignored.
|
||||
|
||||
*:balt*
|
||||
:balt [+lnum] {fname}
|
||||
Like `:badd` and also set the alternate file for the current
|
||||
window to {fname}.
|
||||
|
||||
:[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516*
|
||||
:bd[elete][!] [N]
|
||||
Unload buffer [N] (default: current buffer) and delete it from
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 04
|
||||
" Last Change: 2020 Oct 24
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@ -317,7 +317,7 @@ au BufNewFile,BufRead *.css setf css
|
||||
au BufNewFile,BufRead *.con setf cterm
|
||||
|
||||
" Changelog
|
||||
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch
|
||||
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog
|
||||
\ setf debchangelog
|
||||
|
||||
au BufNewFile,BufRead [cC]hange[lL]og
|
||||
@ -1162,10 +1162,10 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
|
||||
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
|
||||
|
||||
" Pascal (also *.p)
|
||||
au BufNewFile,BufRead *.pas setf pascal
|
||||
au BufNewFile,BufRead *.pas,*.pp setf pascal
|
||||
|
||||
" Delphi project file
|
||||
au BufNewFile,BufRead *.dpr setf pascal
|
||||
" Delphi or Lazarus program file
|
||||
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
||||
|
||||
" PDF
|
||||
au BufNewFile,BufRead *.pdf setf pdf
|
||||
@ -1203,7 +1203,7 @@ au BufNewFile,BufRead *.pod6 setf pod6
|
||||
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
|
||||
|
||||
" PHP config
|
||||
au BufNewFile,BufRead php.ini,php.ini-* setf dosini
|
||||
au BufNewFile,BufRead php.ini-* setf dosini
|
||||
|
||||
" Pike and Cmod
|
||||
au BufNewFile,BufRead *.pike,*.pmod setf pike
|
||||
@ -1342,13 +1342,6 @@ au BufNewFile,BufRead *.rego setf rego
|
||||
" Rexx
|
||||
au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
|
||||
|
||||
" R (Splus)
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.s,*.S setf r
|
||||
else
|
||||
au BufNewFile,BufRead *.s setf r
|
||||
endif
|
||||
|
||||
" R Help file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.rd,*.Rd setf rhelp
|
||||
@ -1513,9 +1506,10 @@ au BufNewFile,BufRead *.decl,*.dcl,*.dec
|
||||
au BufNewFile,BufRead catalog setf catalog
|
||||
|
||||
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
|
||||
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
|
||||
" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
|
||||
" bash scripts.
|
||||
" NOTE: Patterns ending in a star are further down, these have lower priority.
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
|
||||
|
||||
@ -1727,7 +1721,7 @@ au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
|
||||
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
|
||||
|
||||
" ConTeXt
|
||||
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
|
||||
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx setf context
|
||||
|
||||
" Texinfo
|
||||
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
@ -1736,7 +1730,7 @@ au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
au BufNewFile,BufRead texmf.cnf setf texmf
|
||||
|
||||
" Tidy config
|
||||
au BufNewFile,BufRead .tidyrc,tidyrc setf tidy
|
||||
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
|
||||
|
||||
" TF mud client
|
||||
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
|
||||
@ -2170,7 +2164,7 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||
|
||||
" Shell scripts ending in a star
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
" Vim filetype plugin
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2017 Feb 17
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2020 Sep 28
|
||||
|
||||
" This plugin was prepared by Mark Sikora
|
||||
" This plugin was updated as proposed by Doug Kearns
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -13,6 +15,42 @@ endif
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring<"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
setlocal define=function
|
||||
setlocal suffixesadd+=.awk
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms< def< sua<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
" TODO: set this in scripts.vim?
|
||||
if exists("g:awk_is_gawk")
|
||||
setlocal include=@include
|
||||
setlocal suffixesadd+=.gawk
|
||||
if has("unix") || has("win32unix")
|
||||
setlocal formatprg=gawk\ -f-\ -o/dev/stdout
|
||||
let b:undo_ftplugin .= " | setl fp<"
|
||||
endif
|
||||
|
||||
let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
|
||||
let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
|
||||
let path = substitute(path, ':', ',', 'g')
|
||||
|
||||
let &l:path = path
|
||||
let b:undo_ftplugin .= " | setl inc< path<"
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim ftplugin file
|
||||
" Language: Erlang
|
||||
" Author: Oscar Hellstr<EFBFBD>m <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jim<EFBFBD>nez <jimenezrick@gmail.com>
|
||||
" Author: Oscar Hellström <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
" Eduardo Lopez (http://github.com/tapichu)
|
||||
" License: Vim license
|
||||
" Version: 2012/01/25
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Author: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Copyright: Copyright (c) 2009-2013 Steven Oliver
|
||||
" License: You may redistribute this under the same terms as Vim itself
|
||||
" Last Update: 2020 Oct 10
|
||||
" --------------------------------------------------------------------------
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
@ -14,7 +15,7 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8
|
||||
setlocal softtabstop=4 shiftwidth=4
|
||||
setlocal suffixesadd=.fal,.ftd
|
||||
|
||||
" Matchit support
|
||||
|
@ -1,13 +1,13 @@
|
||||
" Vim settings file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
||||
" Version: 0.50
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v52) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-plugin from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben
|
||||
" Fritz, and David Barnett.
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
|
||||
" and Doug Kearns.
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -119,7 +119,7 @@ if !exists("b:match_words")
|
||||
endif
|
||||
|
||||
" File filters for :browse e
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Make
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Apr 02
|
||||
" Last Change: 2020 Oct 16
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -9,10 +9,10 @@ if exists("b:did_ftplugin")
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<"
|
||||
let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<"
|
||||
|
||||
" Make sure a hard tab is used, required for most make programs
|
||||
setlocal noexpandtab softtabstop=0
|
||||
setlocal noexpandtab softtabstop=0 shiftwidth=0
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: man
|
||||
" Maintainer: Jason Franklin <vim@justemail.net>
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2020 Jun 01
|
||||
" Last Change: 2020 Oct 09
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@ -76,7 +76,7 @@ catch /E145:/
|
||||
" Ignore the error in restricted mode
|
||||
endtry
|
||||
|
||||
func <SID>PreGetPage(cnt)
|
||||
func s:PreGetPage(cnt)
|
||||
if a:cnt == 0
|
||||
let old_isk = &iskeyword
|
||||
if &ft == 'man'
|
||||
@ -99,24 +99,27 @@ func <SID>PreGetPage(cnt)
|
||||
call s:GetPage('', sect, page)
|
||||
endfunc
|
||||
|
||||
func <SID>GetCmdArg(sect, page)
|
||||
if a:sect == ''
|
||||
return a:page
|
||||
func s:GetCmdArg(sect, page)
|
||||
|
||||
if empty(a:sect)
|
||||
return shellescape(a:page)
|
||||
endif
|
||||
return s:man_sect_arg.' '.a:sect.' '.a:page
|
||||
|
||||
return s:man_sect_arg . ' ' . shellescape(a:sect) . ' ' . shellescape(a:page)
|
||||
endfunc
|
||||
|
||||
func <SID>FindPage(sect, page)
|
||||
let where = system("man ".s:man_find_arg.' '.s:GetCmdArg(a:sect, a:page))
|
||||
if where !~ "^/"
|
||||
if matchstr(where, " [^ ]*$") !~ "^ /"
|
||||
return 0
|
||||
endif
|
||||
func s:FindPage(sect, page)
|
||||
let l:cmd = printf('man %s %s', s:man_find_arg, s:GetCmdArg(a:sect, a:page))
|
||||
call system(l:cmd)
|
||||
|
||||
if v:shell_error
|
||||
return 0
|
||||
endif
|
||||
|
||||
return 1
|
||||
endfunc
|
||||
|
||||
func <SID>GetPage(cmdmods, ...)
|
||||
func s:GetPage(cmdmods, ...)
|
||||
if a:0 >= 2
|
||||
let sect = a:1
|
||||
let page = a:2
|
||||
@ -226,7 +229,7 @@ func <SID>GetPage(cmdmods, ...)
|
||||
setl noma
|
||||
endfunc
|
||||
|
||||
func <SID>PopPage()
|
||||
func s:PopPage()
|
||||
if s:man_tag_depth > 0
|
||||
let s:man_tag_depth = s:man_tag_depth - 1
|
||||
exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Tom Picton <tom@tompicton.co.uk>
|
||||
" Previous Maintainer: James Sully <sullyj3@gmail.com>
|
||||
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Sun 17 Mar 2019
|
||||
" Last Change: Mon, 5 October 2020
|
||||
" https://github.com/tpict/vim-ftplugin-python
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
@ -14,6 +14,7 @@ set cpo&vim
|
||||
setlocal cinkeys-=0#
|
||||
setlocal indentkeys-=0#
|
||||
setlocal include=^\\s*\\(from\\\|import\\)
|
||||
setlocal define=^\\s*\\(def\\\|class\\)
|
||||
|
||||
" For imports with leading .., append / and replace additional .s with ../
|
||||
let b:grandparent_match = '^\(.\.\)\(\.*\)'
|
||||
@ -38,7 +39,7 @@ setlocal comments=b:#,fb:-
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
if has('python3')
|
||||
setlocal omnifunc=python3complete#Complete
|
||||
setlocal omnifunc=python3complete#Complete
|
||||
elseif has('python')
|
||||
setlocal omnifunc=pythoncomplete#Complete
|
||||
endif
|
||||
@ -115,35 +116,18 @@ endif
|
||||
|
||||
if !exists("g:python_recommended_style") || g:python_recommended_style != 0
|
||||
" As suggested by PEP8.
|
||||
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
|
||||
setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
|
||||
endif
|
||||
|
||||
" First time: try finding "pydoc".
|
||||
if !exists('g:pydoc_executable')
|
||||
if executable('pydoc')
|
||||
let g:pydoc_executable = 1
|
||||
else
|
||||
let g:pydoc_executable = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" Windows-specific pydoc setup
|
||||
if has('win32') || has('win64')
|
||||
if executable('python')
|
||||
" available as Tools\scripts\pydoc.py
|
||||
let g:pydoc_executable = 1
|
||||
else
|
||||
let g:pydoc_executable = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" If "pydoc" was found use it for keywordprg.
|
||||
if g:pydoc_executable
|
||||
if has('win32') || has('win64')
|
||||
setlocal keywordprg=python\ -m\ pydoc\
|
||||
else
|
||||
setlocal keywordprg=pydoc
|
||||
endif
|
||||
" Use pydoc for keywordprg.
|
||||
" Unix users preferentially get pydoc3, then pydoc2.
|
||||
" Windows doesn't have a standalone pydoc executable in $PATH by default, nor
|
||||
" does it have separate python2/3 executables, so Windows users just get
|
||||
" whichever version corresponds to their installed Python version.
|
||||
if executable('python3')
|
||||
setlocal keywordprg=python3\ -m\ pydoc
|
||||
elseif executable('python')
|
||||
setlocal keywordprg=python\ -m\ pydoc
|
||||
endif
|
||||
|
||||
" Script for filetype switching to undo the local stuff we may have changed
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: RPL/2
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" Last Change: 2012 Mar 07
|
||||
" Version: 0.1
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 47
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v48) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made, in chronological order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann.
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara, Philipp Edelmann, Eisuke Kawashima,
|
||||
" and Louis Cochen.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -146,7 +146,7 @@ function FortranGetIndent(lnum)
|
||||
\. 'type\|forall\|associate\|enum\|block\)\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
" Fix indent for case statement immediately after select
|
||||
if prevstat =~? '\<select\s\+\(case\|type\)\>'
|
||||
if prevstat =~? '\<select\s*\(case\|type\)\>'
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: RPL/2
|
||||
" Version: 0.2
|
||||
" Last Change: 2017 Jun 13
|
||||
" Maintainer: BERTRAND Jo<EFBFBD>l <rpl2@free.fr>
|
||||
" Maintainer: BERTRAND Joël <rpl2@free.fr>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
@ -1,5 +1,5 @@
|
||||
"Description: Indent scheme for the tilde weblanguage
|
||||
"Author: Tobias Rundstr<EFBFBD>m <tobi@tobi.nu>
|
||||
"Author: Tobias Rundström <tobi@tobi.nu>
|
||||
"URL: http://tilde.tildesoftware.net
|
||||
"Last Change: May 8 09:15:09 CEST 2002
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jul 19
|
||||
" Last Change: 2020 Sep 27
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -10,7 +10,7 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetVimIndent()
|
||||
setlocal indentkeys+==end,=},=else,=cat,=fina,=END,0\\,0=\"\\\
|
||||
setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\
|
||||
setlocal indentkeys-=0#
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
@ -93,7 +93,7 @@ function GetVimIndentIntern()
|
||||
else
|
||||
" A line starting with :au does not increment/decrement indent.
|
||||
if prev_text !~ '^\s*au\%[tocmd]'
|
||||
let i = match(prev_text, '\(^\||\)\s*\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
|
||||
@ -117,7 +117,7 @@ function GetVimIndentIntern()
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :enddef, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Mar 29
|
||||
" Last Change: 2020 Sep 28
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@ -89,6 +89,21 @@ an 9999.75 &Help.-sep2- <Nop>
|
||||
an 9999.80 &Help.&Version :version<CR>
|
||||
an 9999.90 &Help.&About :intro<CR>
|
||||
|
||||
if exists(':tlmenu')
|
||||
tlnoremenu 9999.10 &Help.&Overview<Tab><F1> <C-W>:help<CR>
|
||||
tlnoremenu 9999.20 &Help.&User\ Manual <C-W>:help usr_toc<CR>
|
||||
tlnoremenu 9999.30 &Help.&How-To\ Links <C-W>:help how-to<CR>
|
||||
tlnoremenu <silent> 9999.40 &Help.&Find\.\.\. <C-W>:call <SID>Helpfind()<CR>
|
||||
tlnoremenu 9999.45 &Help.-sep1- <Nop>
|
||||
tlnoremenu 9999.50 &Help.&Credits <C-W>:help credits<CR>
|
||||
tlnoremenu 9999.60 &Help.Co&pying <C-W>:help copying<CR>
|
||||
tlnoremenu 9999.70 &Help.&Sponsor/Register <C-W>:help sponsor<CR>
|
||||
tlnoremenu 9999.70 &Help.O&rphans <C-W>:help kcc<CR>
|
||||
tlnoremenu 9999.75 &Help.-sep2- <Nop>
|
||||
tlnoremenu 9999.80 &Help.&Version <C-W>:version<CR>
|
||||
tlnoremenu 9999.90 &Help.&About <C-W>:intro<CR>
|
||||
endif
|
||||
|
||||
fun! s:Helpfind()
|
||||
if !exists("g:menutrans_help_dialog")
|
||||
let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')"
|
||||
|
@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Sep 10
|
||||
" Last Change: 2020 Oct 27
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@ -617,7 +617,7 @@ call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setp
|
||||
call <SID>OptionG("mousem", &mousem)
|
||||
call <SID>AddOption("mousetime", gettext("maximum time in msec to recognize a double-click"))
|
||||
call append("$", " \tset mouset=" . &mouset)
|
||||
call <SID>AddOption("ttymouse", gettext("\"xterm\", \"xterm2\", \"dec\" or \"netterm\"; type of mouse"))
|
||||
call <SID>AddOption("ttymouse", gettext("\"xterm\", \"xterm2\", \"sgr\", etc.; type of mouse"))
|
||||
call <SID>OptionG("ttym", &ttym)
|
||||
if has("mouseshape")
|
||||
call <SID>AddOption("mouseshape", gettext("what the mouse pointer looks like in different modes"))
|
||||
@ -689,10 +689,6 @@ if has("gui")
|
||||
call append("$", " \tset bexpr=" . &bexpr)
|
||||
endif
|
||||
endif
|
||||
if exists("+macatsui")
|
||||
call <SID>AddOption("macatsui", gettext("use ATSUI text drawing; disable to avoid display problems"))
|
||||
call <SID>OptionG("macatsui", &macatsui)
|
||||
endif
|
||||
endif
|
||||
|
||||
if has("printer")
|
||||
@ -791,7 +787,7 @@ call <SID>BinOptionL("mod")
|
||||
call <SID>AddOption("readonly", gettext("buffer is not to be written"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("ro")
|
||||
call <SID>AddOption("modifiable", gettext("changes to the text are not possible"))
|
||||
call <SID>AddOption("modifiable", gettext("changes to the text are possible"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("ma")
|
||||
call <SID>AddOption("textwidth", gettext("line length above which to break a line"))
|
||||
@ -852,7 +848,7 @@ if has("digraphs")
|
||||
endif
|
||||
call <SID>AddOption("tildeop", gettext("the \"~\" command behaves like an operator"))
|
||||
call <SID>BinOptionG("top", &top)
|
||||
call <SID>AddOption("operatorfunc", gettext("function called for the\"g@\" operator"))
|
||||
call <SID>AddOption("operatorfunc", gettext("function called for the \"g@\" operator"))
|
||||
call <SID>OptionG("opfunc", &opfunc)
|
||||
call <SID>AddOption("showmatch", gettext("when inserting a bracket, briefly jump to its match"))
|
||||
call <SID>BinOptionG("sm", &sm)
|
||||
@ -863,7 +859,7 @@ call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("mps")
|
||||
call <SID>AddOption("joinspaces", gettext("use two spaces after '.' when joining a line"))
|
||||
call <SID>BinOptionG("js", &js)
|
||||
call <SID>AddOption("nrformats", gettext("\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for\nCTRL-A and CTRL-X commands"))
|
||||
call <SID>AddOption("nrformats", gettext("\"alpha\", \"octal\", \"hex\", \"bin\" and/or \"unsigned\"; number formats\nrecognized for CTRL-A and CTRL-X commands"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("nf")
|
||||
|
||||
@ -938,7 +934,7 @@ endif
|
||||
|
||||
if has("folding")
|
||||
call <SID>Header(gettext("folding"))
|
||||
call <SID>AddOption("foldenable", gettext("set to display all folds open"))
|
||||
call <SID>AddOption("foldenable", gettext("unset to display all folds open"))
|
||||
call append("$", "\t" .. s:local_to_window)
|
||||
call <SID>BinOptionL("fen")
|
||||
call <SID>AddOption("foldlevel", gettext("folds with a level higher than this number will be closed"))
|
||||
@ -961,7 +957,7 @@ if has("folding")
|
||||
call <SID>OptionL("fml")
|
||||
call <SID>AddOption("commentstring", gettext("template for comments; used to put the marker in"))
|
||||
call <SID>OptionL("cms")
|
||||
call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\""))
|
||||
call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\",\n\"syntax\" or \"diff\""))
|
||||
call append("$", "\t" .. s:local_to_window)
|
||||
call <SID>OptionL("fdm")
|
||||
call <SID>AddOption("foldexpr", gettext("expression used when 'foldmethod' is \"expr\""))
|
||||
@ -1069,7 +1065,7 @@ call <SID>BinOptionG("fs", &fs)
|
||||
call <SID>AddOption("shortname", gettext("use 8.3 file names"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("sn")
|
||||
call <SID>AddOption("cryptmethod", gettext("encryption method for file writing: zip or blowfish"))
|
||||
call <SID>AddOption("cryptmethod", gettext("encryption method for file writing: zip, blowfish or blowfish2"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cm")
|
||||
|
||||
@ -1093,7 +1089,7 @@ call append("$", " \tset mmt=" . &mmt)
|
||||
|
||||
|
||||
call <SID>Header(gettext("command line editing"))
|
||||
call <SID>AddOption("history", gettext("how many command lines are remembered "))
|
||||
call <SID>AddOption("history", gettext("how many command lines are remembered"))
|
||||
call append("$", " \tset hi=" . &hi)
|
||||
call <SID>AddOption("wildchar", gettext("key that triggers command-line expansion"))
|
||||
call append("$", " \tset wc=" . &wc)
|
||||
@ -1187,19 +1183,12 @@ if has("quickfix")
|
||||
endif
|
||||
|
||||
|
||||
if has("win32") || has("osfiletype")
|
||||
if has("win32")
|
||||
call <SID>Header(gettext("system specific"))
|
||||
if has("osfiletype")
|
||||
call <SID>AddOption("osfiletype", gettext("OS-specific information about the type of file"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("oft")
|
||||
endif
|
||||
if has("win32")
|
||||
call <SID>AddOption("shellslash", gettext("use forward slashes in file names; for Unix-like shells"))
|
||||
call <SID>BinOptionG("ssl", &ssl)
|
||||
call <SID>AddOption("completeslash", gettext("specifies slash/backslash used for completion"))
|
||||
call <SID>OptionG("csl", &csl)
|
||||
endif
|
||||
call <SID>AddOption("shellslash", gettext("use forward slashes in file names; for Unix-like shells"))
|
||||
call <SID>BinOptionG("ssl", &ssl)
|
||||
call <SID>AddOption("completeslash", gettext("specifies slash/backslash used for completion"))
|
||||
call <SID>OptionG("csl", &csl)
|
||||
endif
|
||||
|
||||
|
||||
@ -1236,12 +1225,6 @@ if has("rightleft")
|
||||
call <SID>AddOption("hkmapp", gettext("use phonetic Hebrew keyboard mapping"))
|
||||
call <SID>BinOptionG("hkp", &hkp)
|
||||
endif
|
||||
if has("farsi")
|
||||
call <SID>AddOption("altkeymap", gettext("use Farsi as the second language when 'revins' is set"))
|
||||
call <SID>BinOptionG("akm", &akm)
|
||||
call <SID>AddOption("fkmap", gettext("use Farsi keyboard mapping"))
|
||||
call <SID>BinOptionG("fk", &fk)
|
||||
endif
|
||||
if has("arabic")
|
||||
call <SID>AddOption("arabic", gettext("prepare for editing Arabic text"))
|
||||
call append("$", "\t" .. s:local_to_window)
|
||||
@ -1284,7 +1267,7 @@ endif
|
||||
|
||||
|
||||
call <SID>Header(gettext("multi-byte characters"))
|
||||
call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\"\n\"euc-jp\", \"big5\", etc."))
|
||||
call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\",\n\"euc-jp\", \"big5\", etc."))
|
||||
call <SID>OptionG("enc", &enc)
|
||||
call <SID>AddOption("fileencoding", gettext("character encoding for the current file"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
@ -1310,7 +1293,7 @@ call <SID>BinOptionG("emo", &emo)
|
||||
|
||||
|
||||
call <SID>Header(gettext("various"))
|
||||
call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block\", \"insert\" and/or \"all\""))
|
||||
call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block\", \"insert\", \"all\"\nand/or \"onemore\""))
|
||||
call <SID>OptionG("ve", &ve)
|
||||
call <SID>AddOption("eventignore", gettext("list of autocommand events which are to be ignored"))
|
||||
call <SID>OptionG("ei", &ei)
|
||||
@ -1350,7 +1333,7 @@ if has("quickfix")
|
||||
call <SID>AddOption("bufhidden", gettext("what happens with a buffer when it's no longer in a window"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("bh")
|
||||
call <SID>AddOption("buftype", gettext("\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer"))
|
||||
call <SID>AddOption("buftype", gettext("empty, \"nofile\", \"nowrite\", \"quickfix\", etc.: type of buffer"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("bt")
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2020 Aug 31
|
||||
" Last Change: 2020 Oct 28
|
||||
"
|
||||
" WORK IN PROGRESS - Only the basics work
|
||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||
@ -119,7 +119,11 @@ func s:StartDebug_internal(dict)
|
||||
" call ch_logfile('debuglog', 'w')
|
||||
|
||||
let s:sourcewin = win_getid(winnr())
|
||||
let s:startsigncolumn = &signcolumn
|
||||
|
||||
" Remember the old value of 'signcolumn' for each buffer that it's set in, so
|
||||
" that we can restore the value for all buffers.
|
||||
let b:save_signcolumn = &signcolumn
|
||||
let s:signcolumn_buflist = [bufnr()]
|
||||
|
||||
let s:save_columns = 0
|
||||
let s:allleft = 0
|
||||
@ -556,8 +560,20 @@ func s:EndDebugCommon()
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
endif
|
||||
|
||||
" Restore 'signcolumn' in all buffers for which it was set.
|
||||
call win_gotoid(s:sourcewin)
|
||||
let &signcolumn = s:startsigncolumn
|
||||
let was_buf = bufnr()
|
||||
for bufnr in s:signcolumn_buflist
|
||||
if bufexists(bufnr)
|
||||
exe bufnr .. "buf"
|
||||
if exists('b:save_signcolumn')
|
||||
let &signcolumn = b:save_signcolumn
|
||||
unlet b:save_signcolumn
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
exe was_buf .. "buf"
|
||||
|
||||
call s:DeleteCommands()
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
@ -938,6 +954,10 @@ func s:HandleCursor(msg)
|
||||
exe lnum
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC priority=110 file=' . fname
|
||||
if !exists('b:save_signcolumn')
|
||||
let b:save_signcolumn = &signcolumn
|
||||
call add(s:signcolumn_buflist, bufnr())
|
||||
endif
|
||||
setlocal signcolumn=yes
|
||||
endif
|
||||
elseif !s:stopped || fname != ''
|
||||
@ -1014,7 +1034,7 @@ endfunc
|
||||
|
||||
func s:PlaceSign(id, subid, entry)
|
||||
let nr = printf('%d.%d', a:id, a:subid)
|
||||
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname']
|
||||
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' priority=110 file=' . a:entry['fname']
|
||||
let a:entry['placed'] = 1
|
||||
endfunc
|
||||
|
||||
|
@ -20,14 +20,14 @@
|
||||
if &cp || exists("g:loaded_zipPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zipPlugin = "v30"
|
||||
let g:loaded_zipPlugin = "v31"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Options: {{{1
|
||||
if !exists("g:zipPlugin_ext")
|
||||
let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
|
||||
let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
" License: This file can be redistribued and/or modified under the same terms
|
||||
" as Vim itself.
|
||||
" Last Change: 2018-12-06
|
||||
" Last Change: 2020 Oct 07
|
||||
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
|
||||
" TODO: see particular FIXME's scattered through the file
|
||||
" make it really linewise?
|
||||
@ -42,6 +42,8 @@ syn keyword apacheOption user group
|
||||
syn match apacheOption "\<valid-user\>"
|
||||
syn case match
|
||||
syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained
|
||||
" Added as suggested by Mikko Koivunalho
|
||||
syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained
|
||||
syn case ignore
|
||||
syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything
|
||||
syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError
|
||||
|
@ -1,11 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: GNU Assembler
|
||||
" Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
|
||||
" Previous maintainer:
|
||||
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
|
||||
" Last Change: 2014 Feb 04
|
||||
|
||||
" Thanks to Ori Avtalion for feedback on the comment markers!
|
||||
" Language: GNU Assembler
|
||||
" Maintainer: Doug Kearns dougkearns@gmail.com
|
||||
" Previous Maintainers: Erik Wognsen <erik.wognsen@gmail.com>
|
||||
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
|
||||
" Contributors: Ori Avtalion, Lakshay Garg
|
||||
" Last Change: 2020 Oct 31
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -34,29 +33,49 @@ syn match asmType "\.space"
|
||||
syn match asmType "\.string"
|
||||
syn match asmType "\.word"
|
||||
|
||||
syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
|
||||
syn match asmIdentifier "[a-z_][a-z0-9_]*"
|
||||
syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
|
||||
|
||||
" Various #'s as defined by GAS ref manual sec 3.6.2.1
|
||||
" Technically, the first decNumber def is actually octal,
|
||||
" Technically, the first asmDecimal def is actually octal,
|
||||
" since the value of 0-7 octal is the same as 0-7 decimal,
|
||||
" I (Kevin) prefer to map it as decimal:
|
||||
syn match decNumber "0\+[1-7]\=[\t\n$,; ]"
|
||||
syn match decNumber "[1-9]\d*"
|
||||
syn match octNumber "0[0-7][0-7]\+"
|
||||
syn match hexNumber "0[xX][0-9a-fA-F]\+"
|
||||
syn match binNumber "0[bB][0-1]*"
|
||||
syn match asmDecimal "\<0\+[1-7]\=\>" display
|
||||
syn match asmDecimal "\<[1-9]\d*\>" display
|
||||
syn match asmOctal "\<0[0-7][0-7]\+\>" display
|
||||
syn match asmHexadecimal "\<0[xX][0-9a-fA-F]\+\>" display
|
||||
syn match asmBinary "\<0[bB][0-1]\+\>" display
|
||||
|
||||
syn keyword asmTodo contained TODO
|
||||
syn match asmFloat "\<\d\+\.\d*\%(e[+-]\=\d\+\)\=\>" display
|
||||
syn match asmFloat "\.\d\+\%(e[+-]\=\d\+\)\=\>" display
|
||||
syn match asmFloat "\<\d\%(e[+-]\=\d\+\)\>" display
|
||||
syn match asmFloat "[+-]\=Inf\>\|\<NaN\>" display
|
||||
|
||||
syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display
|
||||
syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d\+\%(\.\d\+\)\=\%(e[+-]\=\d\+\)\=" display
|
||||
" Avoid fighting the hexadecimal match for unicorn-like '0x' prefixed floats
|
||||
syn match asmFloat "\%(0x\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display
|
||||
|
||||
" Allow all characters to be escaped (and in strings) as these vary across
|
||||
" architectures [See sec 3.6.1.1 Strings]
|
||||
syn match asmCharacterEscape "\\." contained
|
||||
syn match asmCharacter "'\\\=." contains=asmCharacterEscape
|
||||
|
||||
syn match asmStringEscape "\\\_." contained
|
||||
syn match asmStringEscape "\\\%(\o\{3}\|00[89]\)" contained display
|
||||
syn match asmStringEscape "\\x\x\+" contained display
|
||||
|
||||
syn region asmString start="\"" end="\"" skip="\\\\\|\\\"" contains=asmStringEscape
|
||||
|
||||
syn keyword asmTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
" GAS supports one type of multi line comments:
|
||||
syn region asmComment start="/\*" end="\*/" contains=asmTodo
|
||||
syn region asmComment start="/\*" end="\*/" contains=asmTodo,@Spell
|
||||
|
||||
" GAS (undocumentedly?) supports C++ style comments. Unlike in C/C++ however,
|
||||
" a backslash ending a C++ style comment does not extend the comment to the
|
||||
" next line (hence the syntax region does not define 'skip="\\$"')
|
||||
syn region asmComment start="//" end="$" keepend contains=asmTodo
|
||||
syn region asmComment start="//" end="$" keepend contains=asmTodo,@Spell
|
||||
|
||||
" Line comment characters depend on the target architecture and command line
|
||||
" options and some comments may double as logical line number directives or
|
||||
@ -69,7 +88,7 @@ syn region asmComment start="//" end="$" keepend contains=asmTodo
|
||||
" frequently used features of the most popular architectures (and also the
|
||||
" non-GNU assembly languages that use this syntax file because their asm files
|
||||
" are also named *.asm), the following are used as line comment characters:
|
||||
syn match asmComment "[#;!|].*" contains=asmTodo
|
||||
syn match asmComment "[#;!|].*" contains=asmTodo,@Spell
|
||||
|
||||
" Side effects of this include:
|
||||
" - When `;' is used to separate statements on the same line (many targets
|
||||
@ -96,35 +115,50 @@ syn match asmMacro "\.endm"
|
||||
" with '.', including the GCC auto-generated '.L' labels.
|
||||
syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*"
|
||||
|
||||
|
||||
syn case match
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
" The default methods for highlighting. Can be overridden later
|
||||
hi def link asmSection Special
|
||||
hi def link asmLabel Label
|
||||
hi def link asmComment Comment
|
||||
hi def link asmTodo Todo
|
||||
hi def link asmSection Special
|
||||
hi def link asmLabel Label
|
||||
hi def link asmComment Comment
|
||||
hi def link asmTodo Todo
|
||||
hi def link asmDirective Statement
|
||||
|
||||
hi def link asmInclude Include
|
||||
hi def link asmCond PreCondit
|
||||
hi def link asmMacro Macro
|
||||
hi def link asmInclude Include
|
||||
hi def link asmCond PreCondit
|
||||
hi def link asmMacro Macro
|
||||
|
||||
hi def link hexNumber Number
|
||||
hi def link decNumber Number
|
||||
hi def link octNumber Number
|
||||
hi def link binNumber Number
|
||||
if exists('g:asm_legacy_syntax_groups')
|
||||
hi def link hexNumber Number
|
||||
hi def link decNumber Number
|
||||
hi def link octNumber Number
|
||||
hi def link binNumber Number
|
||||
hi def link asmHexadecimal hexNumber
|
||||
hi def link asmDecimal decNumber
|
||||
hi def link asmOctal octNumber
|
||||
hi def link asmBinary binNumber
|
||||
else
|
||||
hi def link asmHexadecimal Number
|
||||
hi def link asmDecimal Number
|
||||
hi def link asmOctal Number
|
||||
hi def link asmBinary Number
|
||||
endif
|
||||
hi def link asmFloat Float
|
||||
|
||||
hi def link asmString String
|
||||
hi def link asmStringEscape Special
|
||||
hi def link asmCharacter Character
|
||||
hi def link asmCharacterEscape Special
|
||||
|
||||
hi def link asmIdentifier Identifier
|
||||
hi def link asmType Type
|
||||
|
||||
hi def link asmType Type
|
||||
|
||||
let b:current_syntax = "asm"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet
|
||||
|
@ -1,19 +1,21 @@
|
||||
" Vim syntax file
|
||||
" Language: Hitachi H-8300h specific syntax for GNU Assembler
|
||||
" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
|
||||
" Last Change: 2002 Sep 19
|
||||
" Language: Hitachi H-8300h specific syntax for GNU Assembler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
|
||||
" Last Change: 2020 Oct 31
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/asm.vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn match asmDirective "\.h8300[h]*"
|
||||
syn match asmDirective "\.h8300[hs]n\="
|
||||
|
||||
"h8300[h] registers
|
||||
syn match asmReg "e\=r[0-7][lh]\="
|
||||
syn match asmRegister "e\=r\o[lh]\="
|
||||
|
||||
"h8300[h] opcodes - order is important!
|
||||
syn match asmOpcode "add\.[lbw]"
|
||||
@ -37,32 +39,20 @@ syn match asmOpcode "sha[lr]\.[lbw]"
|
||||
syn match asmOpcode "shl[lr]\.[lbw]"
|
||||
syn match asmOpcode "sub\.[lbw]"
|
||||
syn match asmOpcode "xor\.[lbw]"
|
||||
syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
|
||||
syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
|
||||
syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
|
||||
syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
|
||||
syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
|
||||
syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
|
||||
syn keyword asmOpcode "sub" "trapa" "xorc"
|
||||
|
||||
syn keyword asmOpcode andc band bcc bclr bcs beq bf bge bgt
|
||||
syn keyword asmOpcode bhi bhs biand bild bior bist bixor bmi
|
||||
syn keyword asmOpcode bne bnot bnp bor bpl bpt bra brn bset
|
||||
syn keyword asmOpcode bsr btst bst bt bvc bvs bxor cmp daa
|
||||
syn keyword asmOpcode das eepmov eepmovw inc jmp jsr ldc movfpe
|
||||
syn keyword asmOpcode movtpe mov nop orc rte rts sleep stc
|
||||
syn keyword asmOpcode sub trapa xorc
|
||||
|
||||
syn case match
|
||||
|
||||
|
||||
" Read the general asm syntax
|
||||
runtime! syntax/asm.vim
|
||||
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link asmOpcode Statement
|
||||
hi def link asmRegister Identifier
|
||||
|
||||
" My default-color overrides:
|
||||
"hi asmOpcode ctermfg=yellow
|
||||
"hi asmReg ctermfg=lightmagenta
|
||||
|
||||
hi def link asmOpcode Statement
|
||||
hi def link asmRegister Identifier
|
||||
|
||||
let b:current_syntax = "asmh8300"
|
||||
|
||||
" vim: ts=8
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet
|
||||
|
@ -19,7 +19,7 @@ syn match asteriskComment ";.*" contains=asteriskTodo
|
||||
syn match asteriskContext "\[.\{-}\]"
|
||||
syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority
|
||||
syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority
|
||||
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
|
||||
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|l\?e\?switch\|\(no\)\?load\)\s*=>\?"
|
||||
syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained
|
||||
syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained
|
||||
syn match asteriskApp ",\zs[a-zA-Z]\+\ze$"
|
||||
@ -39,7 +39,7 @@ syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]*(.*)}
|
||||
syn match asteriskVarLen "(\zs[[:alpha:]][[:alnum:]_]*(.\{-})\ze=" contains=asteriskVar,asteriskVarLen,asteriskExp
|
||||
syn match asteriskExp "\$\[.\{-}\]" contains=asteriskVar,asteriskVarLen,asteriskExp
|
||||
syn match asteriskCodecsPermit "^\s*\(allow\|disallow\)\s*=\s*.*$" contains=asteriskCodecs
|
||||
syn match asteriskCodecs "\(g723\|gsm\|ulaw\|alaw\|g726\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|all\s*$\)"
|
||||
syn match asteriskCodecs "\(vp9\|vp8\|h264\|h263p\|h263\|h261\|jpeg\|opus\|g722\|g723\|gsm\|ulaw\|alaw\|g719\|g726\|g726aal2\|siren7\|siren14\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|wav\|all\s*$\)"
|
||||
syn match asteriskError "^\(type\|auth\|permit\|deny\|bindaddr\|host\)\s*=.*$"
|
||||
syn match asteriskType "^\zstype=\ze\<\(peer\|user\|friend\)\>$" contains=asteriskTypeType
|
||||
syn match asteriskTypeType "\<\(peer\|user\|friend\)\>" contained
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2020 Aug 18
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2020 Aug 18
|
||||
|
||||
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
|
||||
" The AWK Programming Language, Addison-Wesley, 1988
|
||||
|
@ -4,7 +4,7 @@
|
||||
" Maintainer: Marcin Szamotulski <profunctor@pm.me>
|
||||
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
|
||||
" File Types: .cabal
|
||||
" Last Change: 15 May 2018
|
||||
" Last Change: 3 Oct 2020
|
||||
" v1.5: Incorporated changes from
|
||||
" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim
|
||||
" Use `syn keyword` instead of `syn match`.
|
||||
@ -62,11 +62,12 @@ syn keyword cabalCategory contained
|
||||
\ source-repository
|
||||
\ flag
|
||||
\ custom-setup
|
||||
\ common
|
||||
syn match cabalCategoryTitle contained /[^{]*\ze{\?/
|
||||
syn match cabalCategoryRegion
|
||||
\ contains=cabalCategory,cabalCategoryTitle
|
||||
\ nextgroup=cabalCategory skipwhite
|
||||
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\)\+\s*\%(.*$\|$\)/
|
||||
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
|
||||
syn keyword cabalTruth true false
|
||||
|
||||
" cabalStatementRegion which limits the scope of cabalStatement keywords, this
|
||||
@ -76,6 +77,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ default-language
|
||||
\ default-extensions
|
||||
\ author
|
||||
\ autogen-modules
|
||||
\ branch
|
||||
\ bug-reports
|
||||
\ build-depends
|
||||
@ -110,6 +112,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ homepage
|
||||
\ hs-source-dirs
|
||||
\ hugs-options
|
||||
\ import
|
||||
\ include-dirs
|
||||
\ includes
|
||||
\ install-includes
|
||||
|
@ -61,7 +61,7 @@ syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
|
||||
syn match cssClassNameDot contained '\.'
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-z<EFBFBD>-<2D>_@][A-Za-z<EFBFBD>-<2D>0-9_@-]*"
|
||||
syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
@ -649,5 +649,5 @@ endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
" vim: ts=8
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2020 Apr 27
|
||||
" Last Change: 2020 Oct 28
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -21,20 +21,20 @@ let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hippo', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
|
||||
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
|
||||
\
|
||||
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
||||
\ 'disco'
|
||||
\ 'disco', 'eoan'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2018 Aug 11
|
||||
" Last Change: 2020 Oct 26
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -47,22 +47,24 @@ exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs)
|
||||
|
||||
unlet s:kernels s:archs s:pairs
|
||||
|
||||
" Keep in sync with https://metadata.ftp-master.org/sections.822
|
||||
" curl -q https://metadata.ftp-master.debian.org/sections.822 2>/dev/null| grep-dctrl -n --not -FSection -sSection / -
|
||||
let s:sections = [
|
||||
\ 'admin', 'cli-mono', 'comm', 'database', 'debian-installer', 'debug'
|
||||
\, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded'
|
||||
\, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics'
|
||||
\, 'fonts', 'games', 'gnome', 'gnu-r', 'gnustep', 'golang', 'graphics'
|
||||
\, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection'
|
||||
\, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
|
||||
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net'
|
||||
\, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python'
|
||||
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex'
|
||||
\, 'java', 'javascript', 'kde', 'kernel', 'libdevel', 'libs', 'lisp'
|
||||
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net', 'news'
|
||||
\, 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python', 'raku'
|
||||
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'tasks', 'tex', 'text'
|
||||
\, 'utils', 'vcs', 'video', 'web', 'x11', 'xfce', 'zope'
|
||||
\ ]
|
||||
|
||||
syn keyword debcontrolMultiArch contained no foreign allowed same
|
||||
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
|
||||
syn keyword debcontrolPriority contained extra important optional required standard
|
||||
exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\%('.join(s:sections, '\|').'\)"'
|
||||
exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\<\%('.join(s:sections, '\|').'\)\>"'
|
||||
syn keyword debcontrolPackageType contained udeb deb
|
||||
syn match debcontrolVariable contained "\${.\{-}}"
|
||||
syn keyword debcontrolDmUpload contained yes
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2020 Apr 27
|
||||
" Last Change: 2020 Oct 26
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -23,20 +23,20 @@ let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hippo', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
|
||||
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
|
||||
\
|
||||
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
||||
\ 'disco'
|
||||
\ 'disco', 'eoan'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: ELF
|
||||
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: Son 22 Jun 2003 20:43:14 CEST
|
||||
" Filenames: *.ab,*.am
|
||||
" URL: http://www.cvjb.de/comp/vim/elf.vim
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: FORTH
|
||||
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
|
||||
" Previous Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: 2018-03-29
|
||||
" Filenames: *.fs,*.ft
|
||||
" URL: https://github.com/jkotlinski/forth.vim
|
||||
|
@ -1,18 +1,17 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 102
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v103) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
" Version 0.1 for Fortran 95 was created (April 2000) by Ajit Thakkar from the
|
||||
" Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
|
||||
" Version 0.1 for Fortran 95 was created in April 2000 by Ajit Thakkar from an
|
||||
" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
||||
" Walter Dieudonn<EFBFBD>, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judica<EFBFBD>l Grasset, and Takuma Yoshida
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida,
|
||||
" Eisuke Kawashima, and André Chalella.`
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -102,6 +101,8 @@ syn match fortranUnitHeader "\<end\>"
|
||||
syn match fortranType "\<character\>"
|
||||
syn match fortranType "\<complex\>"
|
||||
syn match fortranType "\<integer\>"
|
||||
syn match fortranType "\<real\>"
|
||||
syn match fortranType "\<logical\>"
|
||||
syn keyword fortranType intrinsic
|
||||
syn match fortranType "\<implicit\>"
|
||||
syn keyword fortranStructure dimension
|
||||
@ -149,11 +150,9 @@ syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cq
|
||||
syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
|
||||
syn match fortranIntrinsic "\<len\s*[(,]"me=s+3
|
||||
syn match fortranIntrinsic "\<real\s*("me=s+4
|
||||
syn match fortranType "\<implicit\s\+real"
|
||||
syn match fortranType "^\s*real\>"
|
||||
syn match fortranIntrinsic "\<logical\s*("me=s+7
|
||||
syn match fortranType "\<implicit\s\+logical"
|
||||
syn match fortranType "^\s*logical\>"
|
||||
syn match fortranType "\<implicit\s\+real\>"
|
||||
syn match fortranType "\<implicit\s\+logical\>"
|
||||
|
||||
"Numbers of various sorts
|
||||
" Integers
|
||||
@ -168,6 +167,12 @@ syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
||||
syn match fortranFloatIll display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
||||
" floating point number
|
||||
syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
||||
" binary number
|
||||
syn match fortranBinary display "b["'][01]\+["']"
|
||||
" octal number
|
||||
syn match fortranOctal display "o["'][0-7]\+["']"
|
||||
" hexadecimal number
|
||||
syn match fortranHex display "z["'][0-9A-F]\+["']"
|
||||
" Numbers in formats
|
||||
syn match fortranFormatSpec display "\d*f\d\+\.\d\+"
|
||||
syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\="
|
||||
@ -215,7 +220,6 @@ syn match fortranUnitHeader "\<submodule\>"
|
||||
syn keyword fortranUnitHeader use only contains
|
||||
syn keyword fortranUnitHeader result operator assignment
|
||||
syn match fortranUnitHeader "\<interface\>"
|
||||
syn match fortranUnitHeader "\<recursive\>"
|
||||
syn keyword fortranKeyword allocate deallocate nullify cycle exit
|
||||
syn match fortranConditional "\<select\>"
|
||||
syn keyword fortranConditional case default where elsewhere
|
||||
@ -274,6 +278,7 @@ syn keyword fortranIntrinsic null cpu_time
|
||||
syn match fortranType "\<elemental\>"
|
||||
syn match fortranType "\<pure\>"
|
||||
syn match fortranType "\<impure\>"
|
||||
syn match fortranType "\<recursive\>"
|
||||
if exists("fortran_more_precise")
|
||||
syn match fortranConstructName "\(\<end\s*forall\s\+\)\@15<=\a\w*\>"
|
||||
endif
|
||||
@ -453,6 +458,9 @@ hi def link fortranTodo Todo
|
||||
hi def link fortranContinueMark Special
|
||||
hi def link fortranString String
|
||||
hi def link fortranNumber Number
|
||||
hi def link fortranBinary Number
|
||||
hi def link fortranOctal Number
|
||||
hi def link fortranHex Number
|
||||
hi def link fortranOperator Operator
|
||||
hi def link fortranBoolean Boolean
|
||||
hi def link fortranLabelError Error
|
||||
|
@ -1,6 +1,6 @@
|
||||
" VIM syntax file
|
||||
" Language: groff
|
||||
" Maintainer: Alejandro L<EFBFBD>pez-Valencia <dradul@yahoo.com>
|
||||
" Maintainer: Alejandro López-Valencia <dradul@yahoo.com>
|
||||
" URL: http://dradul.tripod.com/vim
|
||||
" Last Change: 2003-05-08-12:41:13 GMT-5.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Haskell
|
||||
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
|
||||
" Last Change: 2018 Mar 29 by Marcin Szamotulski
|
||||
" Last Change: 2020 Oct 4 by Marcin Szamotulski <profunctor@pm.me>
|
||||
" Original Author: John Williams <jrw@pobox.com>
|
||||
"
|
||||
" Thanks to Ryan Crumley for suggestions and John Meacham for
|
||||
@ -38,8 +38,8 @@ if exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
" (Qualified) identifiers (no default highlighting)
|
||||
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" contains=@NoSpell
|
||||
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" contains=@NoSpell
|
||||
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)*\<[A-Z][a-zA-Z0-9_']*\>" contains=@NoSpell
|
||||
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)*\<[a-z][a-zA-Z0-9_']*\>" contains=@NoSpell
|
||||
|
||||
" Infix operators--most punctuation characters and any (qualified) identifier
|
||||
" enclosed in `backquotes`. An operator starting with : is a constructor,
|
||||
@ -49,8 +49,11 @@ syn match hsConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*"
|
||||
syn match hsVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`"
|
||||
syn match hsConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`"
|
||||
|
||||
" (Non-qualified) identifiers which start with # are labels
|
||||
syn match hsLabel "#[a-z][a-zA-Z0-9_']*\>"
|
||||
|
||||
" Reserved symbols--cannot be overloaded.
|
||||
syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}"
|
||||
syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|{\|}"
|
||||
|
||||
" Strings and constants
|
||||
syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)"
|
||||
@ -62,37 +65,41 @@ syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hs
|
||||
syn match hsNumber "\v<[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*>|<0[oO]_*%(_*[0-7])*>|<0[bB]_*[01]%(_*[01])*>"
|
||||
syn match hsFloat "\v<[0-9]%(_*[0-9])*\.[0-9]%(_*[0-9])*%(_*[eE][-+]?[0-9]%(_*[0-9])*)?>|<[0-9]%(_*[0-9])*_*[eE][-+]?[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*\.[0-9a-fA-F]%(_*[0-9a-fA-F])*%(_*[pP][-+]?[0-9]%(_*[0-9])*)?>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*_*[pP][-+]?[0-9]%(_*[0-9])*>"
|
||||
|
||||
" Keyword definitions. These must be patterns instead of keywords
|
||||
" because otherwise they would match as keywords at the start of a
|
||||
" "literate" comment (see lhs.vim).
|
||||
syn match hsModule "\<module\>"
|
||||
syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod,hsLineComment,hsBlockComment,@NoSpell
|
||||
syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>" contains=@NoSpell
|
||||
syn match hsInfix "\<\(infix\|infixl\|infixr\)\>"
|
||||
syn match hsStructure "\<\(class\|data\|deriving\|instance\|default\|where\)\>"
|
||||
syn match hsTypedef "\<\(type\|newtype\)\>"
|
||||
syn match hsStatement "\<\(do\|case\|of\|let\|in\)\>"
|
||||
syn match hsConditional "\<\(if\|then\|else\)\>"
|
||||
" Keyword definitions.
|
||||
syn keyword hsModule module
|
||||
syn match hsImportGroup "\<import\>.*" contains=hsImport,hsImportModuleName,hsImportMod,hsLineComment,hsBlockComment,hsImportList,@NoSpell nextgroup=hsImport
|
||||
syn keyword hsImport import contained nextgroup=hsImportModuleName
|
||||
syn match hsImportModuleName '\<[A-Z][A-Za-z.]*' contained
|
||||
syn region hsImportList start='(' skip='([^)]\{-})' end=')' keepend contained contains=ConId,VarId,hsDelimiter,hsBlockComment,hsTypedef,@NoSpell
|
||||
|
||||
syn keyword hsImportMod contained as qualified hiding
|
||||
syn keyword hsInfix infix infixl infixr
|
||||
syn keyword hsStructure class data deriving instance default where
|
||||
syn keyword hsTypedef type
|
||||
syn keyword hsNewtypedef newtype
|
||||
syn keyword hsTypeFam family
|
||||
syn keyword hsStatement mdo do case of let in
|
||||
syn keyword hsConditional if then else
|
||||
|
||||
" Not real keywords, but close.
|
||||
if exists("hs_highlight_boolean")
|
||||
" Boolean constants from the standard prelude.
|
||||
syn match hsBoolean "\<\(True\|False\)\>"
|
||||
syn keyword hsBoolean True False
|
||||
endif
|
||||
if exists("hs_highlight_types")
|
||||
" Primitive types from the standard prelude and libraries.
|
||||
syn match hsType "\<\(Int\|Integer\|Char\|Bool\|Float\|Double\|IO\|Void\|Addr\|Array\|String\)\>"
|
||||
syn keyword hsType Int Integer Char Bool Float Double IO Void Addr Array String
|
||||
endif
|
||||
if exists("hs_highlight_more_types")
|
||||
" Types from the standard prelude libraries.
|
||||
syn match hsType "\<\(Maybe\|Either\|Ratio\|Complex\|Ordering\|IOError\|IOResult\|ExitCode\)\>"
|
||||
syn match hsMaybe "\<Nothing\>"
|
||||
syn match hsExitCode "\<\(ExitSuccess\)\>"
|
||||
syn match hsOrdering "\<\(GT\|LT\|EQ\)\>"
|
||||
syn keyword hsType Maybe Either Ratio Complex Ordering IOError IOResult ExitCode
|
||||
syn keyword hsMaybe Nothing
|
||||
syn keyword hsExitCode ExitSuccess
|
||||
syn keyword hsOrdering GT LT EQ
|
||||
endif
|
||||
if exists("hs_highlight_debug")
|
||||
" Debugging functions from the standard prelude.
|
||||
syn match hsDebug "\<\(undefined\|error\|trace\)\>"
|
||||
syn keyword hsDebug undefined error trace
|
||||
endif
|
||||
|
||||
|
||||
@ -133,12 +140,14 @@ hi def link hsImportMod hsImport
|
||||
hi def link hsInfix PreProc
|
||||
hi def link hsStructure Structure
|
||||
hi def link hsStatement Statement
|
||||
hi def link hsConditional Conditional
|
||||
hi def link hsSpecialChar SpecialChar
|
||||
hi def link hsConditional Conditional
|
||||
hi def link hsSpecialChar SpecialChar
|
||||
hi def link hsTypedef Typedef
|
||||
hi def link hsNewtypedef Typedef
|
||||
hi def link hsVarSym hsOperator
|
||||
hi def link hsConSym hsOperator
|
||||
hi def link hsOperator Operator
|
||||
hi def link hsTypeFam Structure
|
||||
if exists("hs_highlight_delimiters")
|
||||
" Some people find this highlighting distracting.
|
||||
hi def link hsDelimiter Delimiter
|
||||
@ -160,22 +169,22 @@ hi def link hsMaybe hsEnumConst
|
||||
hi def link hsOrdering hsEnumConst
|
||||
hi def link hsEnumConst Constant
|
||||
hi def link hsDebug Debug
|
||||
hi def link hsLabel Special
|
||||
|
||||
hi def link cCppString hsString
|
||||
hi def link cCommentStart hsComment
|
||||
hi def link cCommentError hsError
|
||||
hi def link cCommentStartError hsError
|
||||
hi def link cInclude Include
|
||||
hi def link cPreProc PreProc
|
||||
hi def link cDefine Macro
|
||||
hi def link cIncluded hsString
|
||||
hi def link cError Error
|
||||
hi def link cPreCondit PreCondit
|
||||
hi def link cComment Comment
|
||||
hi def link cCppSkip cCppOut
|
||||
hi def link cCppOut2 cCppOut
|
||||
hi def link cCppOut Comment
|
||||
|
||||
hi def link cCppString hsString
|
||||
hi def link cCommentStart hsComment
|
||||
hi def link cCommentError hsError
|
||||
hi def link cCommentStartError hsError
|
||||
hi def link cInclude Include
|
||||
hi def link cPreProc PreProc
|
||||
hi def link cDefine Macro
|
||||
hi def link cIncluded hsString
|
||||
hi def link cError Error
|
||||
hi def link cPreCondit PreCondit
|
||||
hi def link cComment Comment
|
||||
hi def link cCppSkip cCppOut
|
||||
hi def link cCppOut2 cCppOut
|
||||
hi def link cCppOut Comment
|
||||
|
||||
let b:current_syntax = "haskell"
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: IA-64 (Itanium) assembly language
|
||||
" Maintainer: Parth Malwankar <pmalwankar@yahoo.com>
|
||||
" URL: http://www.geocities.com/pmalwankar (Home Page with link to my Vim page)
|
||||
" http://www.geocities.com/pmalwankar/vim.htm (for VIM)
|
||||
" File Version: 0.7
|
||||
" Last Change: 2006 Sep 08
|
||||
" Language: IA-64 (Itanium) assembly language
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Parth Malwankar <pmalwankar@yahoo.com>
|
||||
" File Version: 0.8
|
||||
" Last Change: 2020 Sep 25
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -15,16 +14,16 @@ endif
|
||||
"ignore case for assembly
|
||||
syn case ignore
|
||||
|
||||
" Identifier Keyword characters (defines \k)
|
||||
setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~
|
||||
|
||||
syn sync minlines=5
|
||||
|
||||
" Read the MASM syntax to start with
|
||||
" This is needed as both IA-64 as well as IA-32 instructions are supported
|
||||
source <sfile>:p:h/masm.vim
|
||||
|
||||
syn region ia64Comment start="//" end="$" contains=ia64Todo
|
||||
" Identifier Keyword characters (defines \k)
|
||||
syn iskeyword @,48-57,#,$,.,:,?,@-@,_,~
|
||||
|
||||
syn region ia64Comment start="//" end="$" contains=ia64Todo
|
||||
syn region ia64Comment start="/\*" end="\*/" contains=ia64Todo
|
||||
|
||||
syn match ia64Identifier "[a-zA-Z_$][a-zA-Z0-9_$]*"
|
||||
@ -266,22 +265,22 @@ syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.ls
|
||||
"put masm groups with our groups
|
||||
hi def link masmOperator ia64operator
|
||||
hi def link masmDirective ia64Directive
|
||||
hi def link masmOpcode ia64Opcode
|
||||
hi def link masmOpcode ia64Opcode
|
||||
hi def link masmIdentifier ia64Identifier
|
||||
hi def link masmFloat ia64Float
|
||||
hi def link masmFloat ia64Float
|
||||
|
||||
"ia64 specific stuff
|
||||
hi def link ia64Label Define
|
||||
hi def link ia64Comment Comment
|
||||
hi def link ia64Label Define
|
||||
hi def link ia64Comment Comment
|
||||
hi def link ia64Directive Type
|
||||
hi def link ia64opcode Statement
|
||||
hi def link ia64opcode Statement
|
||||
hi def link ia64registers Operator
|
||||
hi def link ia64string String
|
||||
hi def link ia64string String
|
||||
hi def link ia64Hex Number
|
||||
hi def link ia64Binary Number
|
||||
hi def link ia64Octal Number
|
||||
hi def link ia64Float Float
|
||||
hi def link ia64Decimal Number
|
||||
hi def link ia64Binary Number
|
||||
hi def link ia64Octal Number
|
||||
hi def link ia64Float Float
|
||||
hi def link ia64Decimal Number
|
||||
hi def link ia64Identifier Identifier
|
||||
hi def link ia64data Type
|
||||
hi def link ia64delimiter Delimiter
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: initng .i files
|
||||
" Maintainer: Elan Ruusam<EFBFBD>e <glen@pld-linux.org>
|
||||
" Maintainer: Elan Ruusamäe <glen@pld-linux.org>
|
||||
" URL: http://glen.alkohol.ee/pld/initng/
|
||||
" License: GPL v2
|
||||
" Version: 0.13
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Inno Setup File (iss file) and My InnoSetup extension
|
||||
" Maintainer: Jason Mills (jmills@cs.mun.ca)
|
||||
" Previous Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" Last Change: 2019 Sep 27
|
||||
"
|
||||
" Todo:
|
||||
|
@ -2,14 +2,13 @@
|
||||
" Language: less
|
||||
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
|
||||
" URL: https://github.com/genoma/vim-less
|
||||
" Last Change: 2014 November 24
|
||||
" Last Change: 2020 Sep 29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/css.vim
|
||||
runtime! after/syntax/css.vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: Lout
|
||||
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: So 12 Feb 2012 15:15:03 CET
|
||||
" Filenames: *.lout,*.lt
|
||||
" URL: http://www.cvjb.de/comp/vim/lout.vim
|
||||
|
@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com>
|
||||
" Version Info:
|
||||
" Last Change: 2020 Apr 30
|
||||
" Last Change: 2020 Sep 19
|
||||
|
||||
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
|
||||
" * manSubHeading
|
||||
@ -21,8 +21,8 @@ runtime! syntax/ctrlh.vim
|
||||
syn case ignore
|
||||
|
||||
syn match manReference "\f\+([1-9][a-z]\=)"
|
||||
syn match manSectionHeading "^[a-z][a-z -]*[a-z]$"
|
||||
syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$"
|
||||
syn match manSectionHeading "^\a.*$"
|
||||
syn match manSubHeading "^\s\{3\}\a.*$"
|
||||
syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
|
||||
syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*"
|
||||
" syn match manHistory "^[a-z].*last change.*$"
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: MMIX
|
||||
" Maintainer: Dirk H<EFBFBD>sken, <huesken@informatik.uni-tuebingen.de>
|
||||
" Maintainer: Dirk Hüsken, <huesken@informatik.uni-tuebingen.de>
|
||||
" Last Change: 2012 Jun 01
|
||||
" (Dominique Pelle added @Spell)
|
||||
" Filenames: *.mms
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: MOO
|
||||
" Maintainer: Timo Frenay <timo@frenay.net>
|
||||
" Last Change: 2001 Oct 06
|
||||
" Last Change: 2020 Oct 19
|
||||
" Note: Requires Vim 6.0 or above
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@ -95,7 +95,7 @@ if exists("moo_unknown_builtin_functions")
|
||||
syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained
|
||||
endif
|
||||
|
||||
"<EFBFBD>Enclosed expressions
|
||||
" Enclosed expressions
|
||||
syn match mooUnenclosedError display ~[')\]|}]~
|
||||
syn match mooParenthesesError display ~[';\]|}]~ contained
|
||||
syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError
|
||||
|
@ -1,6 +1,6 @@
|
||||
" VIM syntax file
|
||||
" Language: nroff/groff
|
||||
" Maintainer: Pedro Alejandro L<EFBFBD>pez-Valencia <palopezv@gmail.com>
|
||||
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
|
||||
" URL: http://vorbote.wordpress.com/
|
||||
" Last Change: 2012 Feb 2
|
||||
"
|
||||
@ -8,7 +8,7 @@
|
||||
"
|
||||
" ACKNOWLEDGEMENTS:
|
||||
"
|
||||
" My thanks to J<EFBFBD>r<EFBFBD>me Pl<EFBFBD>t <Jerome.Plut@ens.fr>, who was the
|
||||
" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
|
||||
" creator and maintainer of this syntax file for several years.
|
||||
" May I be as good at it as he has been.
|
||||
"
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Pascal
|
||||
" Version: 2.8
|
||||
" Last Change: 2004/10/17 17:47:30
|
||||
" Maintainer: Xavier Cr<EFBFBD>gut <xavier.cregut@enseeiht.fr>
|
||||
" Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr>
|
||||
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
|
||||
|
||||
" Contributors: Tim Chase <tchase@csc.com>,
|
||||
|
@ -1,26 +1,36 @@
|
||||
" syntax file for Protocol Buffers - Google's data interchange format
|
||||
"
|
||||
" Protocol Buffers - Google's data interchange format
|
||||
" Copyright 2008 Google Inc. All rights reserved.
|
||||
" https://developers.google.com/protocol-buffers/
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
" in the Software without restriction, including without limitation the rights
|
||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
" copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
" Redistribution and use in source and binary forms, with or without
|
||||
" modification, are permitted provided that the following conditions are
|
||||
" met:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
" * Redistributions of source code must retain the above copyright
|
||||
" notice, this list of conditions and the following disclaimer.
|
||||
" * Redistributions in binary form must reproduce the above
|
||||
" copyright notice, this list of conditions and the following disclaimer
|
||||
" in the documentation and/or other materials provided with the
|
||||
" distribution.
|
||||
" * Neither the name of Google Inc. nor the names of its
|
||||
" contributors may be used to endorse or promote products derived from
|
||||
" this software without specific prior written permission.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
" THE SOFTWARE.
|
||||
"
|
||||
" http://code.google.com/p/protobuf/
|
||||
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
" This is the Vim syntax file for Google Protocol Buffers as found at
|
||||
" https://github.com/protocolbuffers/protobuf
|
||||
" Last update: 2020 Oct 29
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -33,10 +43,10 @@ syn keyword protoTodo contained TODO FIXME XXX
|
||||
syn cluster protoCommentGrp contains=protoTodo
|
||||
|
||||
syn keyword protoSyntax syntax import option
|
||||
syn keyword protoStructure package message group
|
||||
syn keyword protoStructure package message group oneof
|
||||
syn keyword protoRepeat optional required repeated
|
||||
syn keyword protoDefault default
|
||||
syn keyword protoExtend extend extensions to max
|
||||
syn keyword protoExtend extend extensions to max reserved
|
||||
syn keyword protoRPC service rpc returns
|
||||
|
||||
syn keyword protoType int32 int64 uint32 uint64 sint32 sint64
|
||||
@ -48,10 +58,10 @@ syn keyword protoBool true false
|
||||
syn match protoInt /-\?\<\d\+\>/
|
||||
syn match protoInt /\<0[xX]\x+\>/
|
||||
syn match protoFloat /\<-\?\d*\(\.\d*\)\?/
|
||||
syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp
|
||||
syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp
|
||||
syn region protoString start=/"/ skip=/\\./ end=/"/
|
||||
syn region protoString start=/'/ skip=/\\./ end=/'/
|
||||
syn region protoComment start="\/\*" end="\*\/" contains=@pbCommentGrp,@Spell
|
||||
syn region protoComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp,@Spell
|
||||
syn region protoString start=/"/ skip=/\\./ end=/"/ contains=@Spell
|
||||
syn region protoString start=/'/ skip=/\\./ end=/'/ contains=@Spell
|
||||
|
||||
hi def link protoTodo Todo
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: "Robots.txt" files
|
||||
" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
|
||||
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" URL: http://www.mggen.com/vim/syntax/robots.zip
|
||||
" Last change: 2001 May 09
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: RPL/2
|
||||
" Version: 0.15.15 against RPL/2 version 4.00pre7i
|
||||
" Last Change: 2012 Feb 03 by Thilo Six
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim
|
||||
" Credits: Nothing
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
" .hlp (windows help files) use compiled rtf files
|
||||
" rtf documentation at http://night.primate.wisc.edu/software/RTF/
|
||||
"
|
||||
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" URL: http://www.mggen.com/vim/syntax/rtf.zip
|
||||
" Last change: 2001 Mai 02
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Apr 14, 2020
|
||||
" Version: 190
|
||||
" Last Change: Aug 10, 2020
|
||||
" Version: 193
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
|
||||
@ -20,8 +20,8 @@ if getline(1) =~ '\<ksh$'
|
||||
elseif getline(1) =~ '\<bash$'
|
||||
let b:is_bash = 1
|
||||
elseif getline(1) =~ '\<dash$'
|
||||
let b:is_posix = 1
|
||||
elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
|
||||
let b:is_dash = 1
|
||||
elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") && !exists("g:is_dash")
|
||||
let s:shell = ""
|
||||
if executable("/bin/sh")
|
||||
let s:shell = resolve("/bin/sh")
|
||||
@ -33,7 +33,7 @@ elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix"
|
||||
elseif s:shell =~ 'bash$'
|
||||
let b:is_bash = 1
|
||||
elseif s:shell =~ 'dash$'
|
||||
let b:is_posix = 1
|
||||
let b:is_dash = 1
|
||||
endif
|
||||
unlet s:shell
|
||||
endif
|
||||
@ -45,7 +45,7 @@ endif
|
||||
" So, when the user sets "g:is_bash", "g:is_kornshell",
|
||||
" or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell,
|
||||
" respectively.
|
||||
if !exists("b:is_kornshell") && !exists("b:is_bash")
|
||||
if !exists("b:is_kornshell") && !exists("b:is_bash") && !exists("b:is_dash")
|
||||
if exists("g:is_posix") && !exists("g:is_kornshell")
|
||||
let g:is_kornshell= g:is_posix
|
||||
endif
|
||||
@ -59,11 +59,21 @@ if !exists("b:is_kornshell") && !exists("b:is_bash")
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
elseif exists("g:is_dash")
|
||||
let b:is_dash= 1
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
else
|
||||
let b:is_sh= 1
|
||||
endif
|
||||
endif
|
||||
|
||||
" if b:is_dash, set b:is_posix too
|
||||
if exists("b:is_dash")
|
||||
let b:is_posix= 1
|
||||
endif
|
||||
|
||||
" set up default g:sh_fold_enabled {{{1
|
||||
" ================================
|
||||
if !exists("g:sh_fold_enabled")
|
||||
@ -133,7 +143,7 @@ syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefS
|
||||
" COMBAK: removing shEscape fromshDblQuoteList fails ksh04:43
|
||||
syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ
|
||||
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
|
||||
syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
|
||||
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
|
||||
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
|
||||
@ -358,7 +368,7 @@ elseif !exists("g:sh_no_error")
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ matchgroup=shQuote end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
|
||||
syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList
|
||||
@ -424,6 +434,9 @@ if exists("b:is_bash")
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\)\>[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment
|
||||
elseif exists("b:is_kornshell") || exists("b:is_posix")
|
||||
syn match shSet "^\s*set\ze\s\+$"
|
||||
if exists("b:is_dash")
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\%(local\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
endif
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(export\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\>\)\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList nextgroup=shComment
|
||||
else
|
||||
@ -471,14 +484,14 @@ endif
|
||||
" bash: ${!prefix*} and ${#parameter}: {{{1
|
||||
" ====================================
|
||||
if exists("b:is_bash")
|
||||
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOff
|
||||
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOffset
|
||||
syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList
|
||||
endif
|
||||
if exists("b:is_kornshell")
|
||||
syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
|
||||
endif
|
||||
|
||||
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
|
||||
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOffset,shDerefOpError
|
||||
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
|
||||
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
|
||||
syn match shDerefVar contained '\d' nextgroup=@shDerefVarList
|
||||
@ -502,6 +515,7 @@ syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" co
|
||||
" bash : ${parameter^^pattern} Case modification
|
||||
" bash : ${parameter,pattern} Case modification
|
||||
" bash : ${parameter,,pattern} Case modification
|
||||
" bash : ${@:start:qty} display command line arguments from start to start+qty-1 (inferred)
|
||||
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
|
||||
if !exists("g:sh_no_error")
|
||||
syn match shDerefOpError contained ":[[:punct:]]"
|
||||
@ -522,17 +536,19 @@ syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
|
||||
syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
|
||||
|
||||
if exists("b:is_bash")
|
||||
" bash : ${parameter:offset}
|
||||
" bash : ${parameter:offset:length}
|
||||
syn region shDerefOff contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
|
||||
" bash ksh posix : ${parameter:offset}
|
||||
" bash ksh posix : ${parameter:offset:length}
|
||||
syn region shDerefOffset contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn region shDerefOffset contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple,shArithmetic
|
||||
endif
|
||||
|
||||
if exists("b:is_bash")
|
||||
" bash : ${parameter//pattern/string}
|
||||
" bash : ${parameter//pattern}
|
||||
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
|
||||
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shPPSLeftList
|
||||
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' end='"' nextgroup=shDerefPPSright contains=@shPPSLeftList
|
||||
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
|
||||
|
||||
" bash : ${parameter/#substring/replacement}
|
||||
@ -675,8 +691,8 @@ if !exists("skip_sh_syntax_inits")
|
||||
hi def link bashSpecialVariables shShellVariables
|
||||
hi def link bashStatement shStatement
|
||||
hi def link shCharClass shSpecial
|
||||
hi def link shDerefOff shDerefOp
|
||||
hi def link shDerefLen shDerefOff
|
||||
hi def link shDerefOffset shDerefOp
|
||||
hi def link shDerefLen shDerefOffset
|
||||
endif
|
||||
if exists("b:is_kornshell") || exists("b:is_posix")
|
||||
hi def link kshSpecialVariables shShellVariables
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" This file works only for Vim6.x
|
||||
" Language: Tilde
|
||||
" Maintainer: Tobias Rundstr<EFBFBD>m <tobi@tildesoftware.net>
|
||||
" Maintainer: Tobias Rundström <tobi@tildesoftware.net>
|
||||
" URL: http://www.tildesoftware.net
|
||||
" CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: TypeScript and TypeScriptReact
|
||||
" Maintainer: Bram Moolenaar, Herrington Darkholme
|
||||
" Last Change: 2019 Nov 30
|
||||
" Last Change: 2020 Oct 27
|
||||
" Based On: Herrington Darkholme's yats.vim
|
||||
" Changes: See https:github.com/HerringtonDarkholme/yats.vim
|
||||
" Credits: See yats.vim on github
|
||||
@ -21,15 +21,14 @@ if main_syntax == 'typescript' || main_syntax == 'typescriptreact'
|
||||
setlocal iskeyword+=$
|
||||
" syntax cluster htmlJavaScript contains=TOP
|
||||
endif
|
||||
" For private field added from TypeScript 3.8
|
||||
setlocal iskeyword+=#
|
||||
|
||||
" lowest priority on least used feature
|
||||
syntax match typescriptLabel /[a-zA-Z_$]\k*:/he=e-1 contains=typescriptReserved nextgroup=@typescriptStatement skipwhite skipempty
|
||||
|
||||
" other keywords like return,case,yield uses containedin
|
||||
syntax region typescriptBlock matchgroup=typescriptBraces start=/{/ end=/}/ contains=@typescriptStatement,@typescriptComments fold
|
||||
|
||||
|
||||
"runtime syntax/basic/identifiers.vim
|
||||
syntax cluster afterIdentifier contains=
|
||||
\ typescriptDotNotation,
|
||||
\ typescriptFuncCallArg,
|
||||
@ -60,7 +59,56 @@ syntax region typescriptFuncCallArg contained matchgroup=typescriptPa
|
||||
syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression
|
||||
syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events
|
||||
|
||||
"runtime syntax/basic/literal.vim
|
||||
syntax region typescriptDestructureString
|
||||
\ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
|
||||
\ contains=typescriptASCII
|
||||
\ nextgroup=typescriptDestructureAs
|
||||
\ contained skipwhite skipempty
|
||||
|
||||
syntax cluster typescriptVariableDeclarations
|
||||
\ contains=typescriptVariableDeclaration,@typescriptDestructures
|
||||
|
||||
syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
|
||||
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
|
||||
\ contained skipwhite skipempty
|
||||
|
||||
syntax cluster typescriptDestructureVariables contains=
|
||||
\ typescriptRestOrSpread,
|
||||
\ typescriptDestructureComma,
|
||||
\ typescriptDestructureLabel,
|
||||
\ typescriptDestructureVariable,
|
||||
\ @typescriptDestructures
|
||||
|
||||
syntax match typescriptDestructureVariable /[A-Za-z_$]\k*/ contained
|
||||
\ nextgroup=typescriptDefaultParam
|
||||
\ contained skipwhite skipempty
|
||||
|
||||
syntax match typescriptDestructureLabel /[A-Za-z_$]\k*\ze\_s*:/
|
||||
\ nextgroup=typescriptDestructureAs
|
||||
\ contained skipwhite skipempty
|
||||
|
||||
syntax match typescriptDestructureAs /:/
|
||||
\ nextgroup=typescriptDestructureVariable,@typescriptDestructures
|
||||
\ contained skipwhite skipempty
|
||||
|
||||
syntax match typescriptDestructureComma /,/ contained
|
||||
|
||||
syntax cluster typescriptDestructures contains=
|
||||
\ typescriptArrayDestructure,
|
||||
\ typescriptObjectDestructure
|
||||
|
||||
syntax region typescriptArrayDestructure matchgroup=typescriptBraces
|
||||
\ start=/\[/ end=/]/
|
||||
\ contains=@typescriptDestructureVariables,@typescriptComments
|
||||
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
|
||||
\ transparent contained skipwhite skipempty fold
|
||||
|
||||
syntax region typescriptObjectDestructure matchgroup=typescriptBraces
|
||||
\ start=/{/ end=/}/
|
||||
\ contains=typescriptDestructureString,@typescriptDestructureVariables,@typescriptComments
|
||||
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
|
||||
\ transparent contained skipwhite skipempty fold
|
||||
|
||||
"Syntax in the JavaScript code
|
||||
|
||||
" String
|
||||
@ -77,15 +125,15 @@ syntax region typescriptString
|
||||
\ contains=typescriptSpecial,@Spell
|
||||
\ extend
|
||||
|
||||
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{4,5}})|c\u|.)"
|
||||
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)"
|
||||
|
||||
" From vim runtime
|
||||
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
|
||||
syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}]+me=e-1 nextgroup=typescriptDotNotation oneline
|
||||
syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}:]+me=e-1 nextgroup=typescriptDotNotation oneline
|
||||
|
||||
syntax region typescriptTemplate
|
||||
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
|
||||
\ contains=typescriptTemplateSubstitution
|
||||
\ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell
|
||||
\ nextgroup=@typescriptSymbols
|
||||
\ skipwhite skipempty
|
||||
|
||||
@ -100,18 +148,16 @@ syntax region typescriptArray matchgroup=typescriptBraces
|
||||
syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
||||
syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
||||
syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
||||
syntax match typescriptNumber /\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\|\.\d[0-9]*/
|
||||
\ nextgroup=typescriptExponent,@typescriptSymbols skipwhite skipempty
|
||||
syntax match typescriptExponent /[eE][+-]\=\d[0-9]*\>/
|
||||
\ nextgroup=@typescriptSymbols skipwhite skipempty contained
|
||||
syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/
|
||||
\ nextgroup=typescriptSymbols skipwhite skipempty
|
||||
|
||||
|
||||
" runtime syntax/basic/object.vim
|
||||
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
|
||||
\ start=/{/ end=/}/
|
||||
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName
|
||||
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword
|
||||
\ fold contained
|
||||
|
||||
syntax keyword typescriptObjectAsyncKeyword async contained
|
||||
|
||||
syntax match typescriptObjectLabel contained /\k\+\_s*/
|
||||
\ nextgroup=typescriptObjectColon,@typescriptCallImpl
|
||||
\ skipwhite skipempty
|
||||
@ -136,7 +182,6 @@ syntax match typescriptObjectSpread /\.\.\./ contained containedin=typescriptObj
|
||||
|
||||
syntax match typescriptObjectColon contained /:/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
|
||||
"runtime syntax/basic/symbols.vim
|
||||
" + - ^ ~
|
||||
syntax match typescriptUnaryOp /[+\-~!]/
|
||||
\ nextgroup=@typescriptValue
|
||||
@ -153,10 +198,12 @@ syntax match typescriptBinaryOp contained /===\?/ nextgroup=@typescriptValue s
|
||||
syntax match typescriptBinaryOp contained />\(>>=\|>>\|>=\|>\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 4: <<=, <<, <=, <
|
||||
syntax match typescriptBinaryOp contained /<\(<=\|<\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 3: ||, |=, |
|
||||
syntax match typescriptBinaryOp contained /|\(|\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 3: &&, &=, &
|
||||
syntax match typescriptBinaryOp contained /&\(&\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 3: ||, |=, |, ||=
|
||||
syntax match typescriptBinaryOp contained /||\?=\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 4: &&, &=, &, &&=
|
||||
syntax match typescriptBinaryOp contained /&&\?=\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 2: ??, ??=
|
||||
syntax match typescriptBinaryOp contained /??=\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 2: *=, *
|
||||
syntax match typescriptBinaryOp contained /\*=\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 2: %=, %
|
||||
@ -177,11 +224,18 @@ syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue
|
||||
syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword
|
||||
|
||||
" runtime syntax/basic/reserved.vim
|
||||
|
||||
"runtime syntax/basic/keyword.vim
|
||||
"Import
|
||||
syntax keyword typescriptImport from as import
|
||||
syntax keyword typescriptImport from as
|
||||
syntax keyword typescriptImport import
|
||||
\ nextgroup=typescriptImportType
|
||||
\ skipwhite
|
||||
syntax keyword typescriptImportType type
|
||||
\ contained
|
||||
syntax keyword typescriptExport export
|
||||
\ nextgroup=typescriptExportType
|
||||
\ skipwhite
|
||||
syntax match typescriptExportType /\<type\s*{\@=/
|
||||
\ contained skipwhite skipempty skipnl
|
||||
syntax keyword typescriptModule namespace module
|
||||
|
||||
"this
|
||||
@ -199,16 +253,12 @@ syntax keyword typescriptIdentifier arguments this super
|
||||
\ nextgroup=@afterIdentifier
|
||||
|
||||
syntax keyword typescriptVariable let var
|
||||
\ nextgroup=typescriptVariableDeclaration
|
||||
\ skipwhite skipempty skipnl
|
||||
\ nextgroup=@typescriptVariableDeclarations
|
||||
\ skipwhite skipempty
|
||||
|
||||
syntax keyword typescriptVariable const
|
||||
\ nextgroup=typescriptEnum,typescriptVariableDeclaration
|
||||
\ skipwhite
|
||||
|
||||
syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
|
||||
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
|
||||
\ contained skipwhite skipempty skipnl
|
||||
\ nextgroup=typescriptEnum,@typescriptVariableDeclarations
|
||||
\ skipwhite skipempty
|
||||
|
||||
syntax region typescriptEnum matchgroup=typescriptEnumKeyword start=/enum / end=/\ze{/
|
||||
\ nextgroup=typescriptBlock
|
||||
@ -271,7 +321,6 @@ syntax cluster typescriptAmbients contains=
|
||||
\ typescriptEnumKeyword,typescriptEnum,
|
||||
\ typescriptModule
|
||||
|
||||
"runtime syntax/basic/doc.vim
|
||||
"Syntax coloring for Node.js shebang line
|
||||
syntax match shellbang "^#!.*node\>"
|
||||
syntax match shellbang "^#!.*iojs\>"
|
||||
@ -279,8 +328,9 @@ syntax match shellbang "^#!.*iojs\>"
|
||||
|
||||
"JavaScript comments
|
||||
syntax keyword typescriptCommentTodo TODO FIXME XXX TBD
|
||||
syntax match typescriptMagicComment "@ts-\%(ignore\|expect-error\)\>"
|
||||
syntax match typescriptLineComment "//.*"
|
||||
\ contains=@Spell,typescriptCommentTodo,typescriptRef
|
||||
\ contains=@Spell,typescriptCommentTodo,typescriptRef,typescriptMagicComment
|
||||
syntax region typescriptComment
|
||||
\ start="/\*" end="\*/"
|
||||
\ contains=@Spell,typescriptCommentTodo extend
|
||||
@ -349,24 +399,27 @@ syntax region typescriptDocLinkTag contained matchgroup=typescriptDo
|
||||
|
||||
syntax cluster typescriptDocs contains=typescriptDocParamType,typescriptDocNamedParamType,typescriptDocParam
|
||||
|
||||
if main_syntax == "typescript"
|
||||
if exists("main_syntax") && main_syntax == "typescript"
|
||||
syntax sync clear
|
||||
syntax sync ccomment typescriptComment minlines=200
|
||||
endif
|
||||
|
||||
syntax case match
|
||||
|
||||
"runtime syntax/basic/type.vim
|
||||
" Types
|
||||
syntax match typescriptOptionalMark /?/ contained
|
||||
|
||||
syntax cluster typescriptTypeParameterCluster contains=
|
||||
\ typescriptTypeParameter,
|
||||
\ typescriptGenericDefault
|
||||
|
||||
syntax region typescriptTypeParameters matchgroup=typescriptTypeBrackets
|
||||
\ start=/</ end=/>/
|
||||
\ contains=typescriptTypeParameter
|
||||
\ contains=@typescriptTypeParameterCluster
|
||||
\ contained
|
||||
|
||||
syntax match typescriptTypeParameter /\K\k*/
|
||||
\ nextgroup=typescriptConstraint,typescriptGenericDefault
|
||||
\ nextgroup=typescriptConstraint
|
||||
\ contained skipwhite skipnl
|
||||
|
||||
syntax keyword typescriptConstraint extends
|
||||
@ -409,6 +462,7 @@ syntax cluster typescriptPrimaryType contains=
|
||||
\ typescriptTupleType,
|
||||
\ typescriptTypeQuery,
|
||||
\ typescriptStringLiteralType,
|
||||
\ typescriptTemplateLiteralType,
|
||||
\ typescriptReadonlyArrayKeyword,
|
||||
\ typescriptAssertType
|
||||
|
||||
@ -417,6 +471,17 @@ syntax region typescriptStringLiteralType contained
|
||||
\ nextgroup=typescriptUnion
|
||||
\ skipwhite skipempty
|
||||
|
||||
syntax region typescriptTemplateLiteralType contained
|
||||
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
|
||||
\ contains=typescriptTemplateSubstitutionType
|
||||
\ nextgroup=typescriptTypeOperator
|
||||
\ skipwhite skipempty
|
||||
|
||||
syntax region typescriptTemplateSubstitutionType matchgroup=typescriptTemplateSB
|
||||
\ start=/\${/ end=/}/
|
||||
\ contains=@typescriptType
|
||||
\ contained
|
||||
|
||||
syntax region typescriptParenthesizedType matchgroup=typescriptParens
|
||||
\ start=/(/ end=/)/
|
||||
\ contains=@typescriptType
|
||||
@ -439,7 +504,7 @@ syntax region typescriptObjectType matchgroup=typescriptBraces
|
||||
\ start=/{/ end=/}/
|
||||
\ contains=@typescriptTypeMember,typescriptEndColons,@typescriptComments,typescriptAccessibilityModifier,typescriptReadonlyModifier
|
||||
\ nextgroup=@typescriptTypeOperator
|
||||
\ contained skipwhite fold
|
||||
\ contained skipwhite skipnl fold
|
||||
|
||||
syntax cluster typescriptTypeMember contains=
|
||||
\ @typescriptCallSignature,
|
||||
@ -447,16 +512,21 @@ syntax cluster typescriptTypeMember contains=
|
||||
\ typescriptIndexSignature,
|
||||
\ @typescriptMembers
|
||||
|
||||
syntax match typescriptTupleLable /\K\k*?\?:/
|
||||
\ contained
|
||||
|
||||
syntax region typescriptTupleType matchgroup=typescriptBraces
|
||||
\ start=/\[/ end=/\]/
|
||||
\ contains=@typescriptType,@typescriptComments
|
||||
\ contains=@typescriptType,@typescriptComments,typescriptRestOrSpread,typescriptTupleLable
|
||||
\ contained skipwhite
|
||||
|
||||
syntax cluster typescriptTypeOperator
|
||||
\ contains=typescriptUnion,typescriptTypeBracket
|
||||
\ contains=typescriptUnion,typescriptTypeBracket,typescriptConstraint,typescriptConditionalType
|
||||
|
||||
syntax match typescriptUnion /|\|&/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty
|
||||
|
||||
syntax match typescriptConditionalType /?\|:/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty
|
||||
|
||||
syntax cluster typescriptFunctionType contains=typescriptGenericFunc,typescriptFuncType
|
||||
syntax region typescriptGenericFunc matchgroup=typescriptTypeBrackets
|
||||
\ start=/</ end=/>/
|
||||
@ -511,6 +581,7 @@ syntax match typescriptTypeAnnotation /:/
|
||||
syntax cluster typescriptParameterList contains=
|
||||
\ typescriptTypeAnnotation,
|
||||
\ typescriptAccessibilityModifier,
|
||||
\ typescriptReadonlyModifier,
|
||||
\ typescriptOptionalMark,
|
||||
\ typescriptRestOrSpread,
|
||||
\ typescriptFuncComma,
|
||||
@ -550,10 +621,9 @@ syntax keyword typescriptReadonlyArrayKeyword readonly
|
||||
\ nextgroup=@typescriptPrimaryType
|
||||
\ skipwhite
|
||||
|
||||
|
||||
" extension
|
||||
if get(g:, 'yats_host_keyword', 1)
|
||||
"runtime syntax/yats.vim
|
||||
"runtime syntax/yats/typescript.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName InternalError
|
||||
@ -584,7 +654,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptGlobalMethod
|
||||
hi def link typescriptGlobalMethod Structure
|
||||
|
||||
"runtime syntax/yats/es6-number.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Number nextgroup=typescriptGlobalNumberDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalNumberDot /\./ contained nextgroup=typescriptNumberStaticProp,typescriptNumberStaticMethod,typescriptProp
|
||||
syntax keyword typescriptNumberStaticProp contained EPSILON MAX_SAFE_INTEGER MAX_VALUE
|
||||
@ -599,7 +668,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptNumberMethod
|
||||
hi def link typescriptNumberMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-string.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName String nextgroup=typescriptGlobalStringDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp
|
||||
syntax keyword typescriptStringStaticMethod contained fromCharCode fromCodePoint raw nextgroup=typescriptFuncCallArg
|
||||
@ -615,7 +683,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptStringMethod
|
||||
hi def link typescriptStringMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-array.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp
|
||||
syntax keyword typescriptArrayStaticMethod contained from isArray of nextgroup=typescriptFuncCallArg
|
||||
@ -629,7 +696,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptArrayMethod
|
||||
hi def link typescriptArrayMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-object.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp
|
||||
syntax keyword typescriptObjectStaticMethod contained create defineProperties defineProperty nextgroup=typescriptFuncCallArg
|
||||
@ -646,7 +712,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptObjectMethod
|
||||
hi def link typescriptObjectMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-symbol.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp
|
||||
syntax keyword typescriptSymbolStaticProp contained length iterator match replace
|
||||
@ -657,13 +722,11 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg
|
||||
hi def link typescriptSymbolStaticMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-function.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function
|
||||
syntax keyword typescriptFunctionMethod contained apply bind call nextgroup=typescriptFuncCallArg
|
||||
syntax cluster props add=typescriptFunctionMethod
|
||||
hi def link typescriptFunctionMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-math.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Math nextgroup=typescriptGlobalMathDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalMathDot /\./ contained nextgroup=typescriptMathStaticProp,typescriptMathStaticMethod,typescriptProp
|
||||
syntax keyword typescriptMathStaticProp contained E LN10 LN2 LOG10E LOG2E PI SQRT1_2
|
||||
@ -677,7 +740,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptMathStaticMethod contained sinh sqrt tan tanh trunc nextgroup=typescriptFuncCallArg
|
||||
hi def link typescriptMathStaticMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-date.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Date nextgroup=typescriptGlobalDateDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalDateDot /\./ contained nextgroup=typescriptDateStaticMethod,typescriptProp
|
||||
syntax keyword typescriptDateStaticMethod contained UTC now parse nextgroup=typescriptFuncCallArg
|
||||
@ -699,13 +761,11 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptDateMethod
|
||||
hi def link typescriptDateMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-json.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName JSON nextgroup=typescriptGlobalJSONDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalJSONDot /\./ contained nextgroup=typescriptJSONStaticMethod,typescriptProp
|
||||
syntax keyword typescriptJSONStaticMethod contained parse stringify nextgroup=typescriptFuncCallArg
|
||||
hi def link typescriptJSONStaticMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-regexp.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp
|
||||
syntax keyword typescriptRegExpStaticProp contained lastIndex
|
||||
@ -717,7 +777,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptRegExpMethod
|
||||
hi def link typescriptRegExpMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-map.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Map WeakMap
|
||||
syntax keyword typescriptES6MapProp contained size
|
||||
syntax cluster props add=typescriptES6MapProp
|
||||
@ -727,7 +786,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptES6MapMethod
|
||||
hi def link typescriptES6MapMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-set.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Set WeakSet
|
||||
syntax keyword typescriptES6SetProp contained size
|
||||
syntax cluster props add=typescriptES6SetProp
|
||||
@ -737,7 +795,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptES6SetMethod
|
||||
hi def link typescriptES6SetMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-proxy.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Proxy
|
||||
syntax keyword typescriptProxyAPI contained getOwnPropertyDescriptor getOwnPropertyNames
|
||||
syntax keyword typescriptProxyAPI contained defineProperty deleteProperty freeze seal
|
||||
@ -745,7 +802,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct
|
||||
hi def link typescriptProxyAPI Keyword
|
||||
|
||||
"runtime syntax/yats/es6-promise.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg
|
||||
syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp
|
||||
syntax keyword typescriptPromiseStaticMethod contained resolve reject all race nextgroup=typescriptFuncCallArg
|
||||
@ -754,7 +810,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptPromiseMethod
|
||||
hi def link typescriptPromiseMethod Keyword
|
||||
|
||||
"runtime syntax/yats/es6-reflect.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect
|
||||
syntax keyword typescriptReflectMethod contained apply construct defineProperty deleteProperty nextgroup=typescriptFuncCallArg
|
||||
syntax keyword typescriptReflectMethod contained enumerate get getOwnPropertyDescriptor nextgroup=typescriptFuncCallArg
|
||||
@ -763,14 +818,12 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptReflectMethod
|
||||
hi def link typescriptReflectMethod Keyword
|
||||
|
||||
"runtime syntax/yats/ecma-402.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Intl
|
||||
syntax keyword typescriptIntlMethod contained Collator DateTimeFormat NumberFormat nextgroup=typescriptFuncCallArg
|
||||
syntax keyword typescriptIntlMethod contained PluralRules nextgroup=typescriptFuncCallArg
|
||||
syntax cluster props add=typescriptIntlMethod
|
||||
hi def link typescriptIntlMethod Keyword
|
||||
|
||||
"runtime syntax/yats/node.vim
|
||||
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName global process
|
||||
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName console Buffer
|
||||
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName module exports
|
||||
@ -788,7 +841,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterAll
|
||||
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName expect assert
|
||||
|
||||
"runtime syntax/yats/web.vim
|
||||
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbortController
|
||||
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbstractWorker AnalyserNode
|
||||
syntax keyword typescriptBOM containedin=typescriptIdentifierName App Apps ArrayBuffer
|
||||
@ -1038,7 +1090,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptBOM containedin=typescriptIdentifierName XMLHttpRequestEventTarget
|
||||
hi def link typescriptBOM Structure
|
||||
|
||||
"runtime syntax/yats/web-window.vim
|
||||
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName applicationCache
|
||||
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName closed
|
||||
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName Components
|
||||
@ -1145,7 +1196,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName XMLSerializer
|
||||
hi def link typescriptBOMWindowCons Structure
|
||||
|
||||
"runtime syntax/yats/web-navigator.vim
|
||||
syntax keyword typescriptBOMNavigatorProp contained battery buildID connection cookieEnabled
|
||||
syntax keyword typescriptBOMNavigatorProp contained doNotTrack maxTouchPoints oscpu
|
||||
syntax keyword typescriptBOMNavigatorProp contained productSub push serviceWorker
|
||||
@ -1164,7 +1214,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptServiceWorkerMethod
|
||||
hi def link typescriptServiceWorkerMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-location.vim
|
||||
syntax keyword typescriptBOMLocationProp contained href protocol host hostname port
|
||||
syntax keyword typescriptBOMLocationProp contained pathname search hash username password
|
||||
syntax keyword typescriptBOMLocationProp contained origin
|
||||
@ -1174,7 +1223,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptBOMLocationMethod
|
||||
hi def link typescriptBOMLocationMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-history.vim
|
||||
syntax keyword typescriptBOMHistoryProp contained length current next previous state
|
||||
syntax keyword typescriptBOMHistoryProp contained scrollRestoration
|
||||
syntax cluster props add=typescriptBOMHistoryProp
|
||||
@ -1183,7 +1231,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptBOMHistoryMethod
|
||||
hi def link typescriptBOMHistoryMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-console.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName console
|
||||
syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg
|
||||
syntax keyword typescriptConsoleMethod contained groupEnd info log time timeEnd trace nextgroup=typescriptFuncCallArg
|
||||
@ -1191,7 +1238,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptConsoleMethod
|
||||
hi def link typescriptConsoleMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-xhr.vim
|
||||
syntax keyword typescriptXHRGlobal containedin=typescriptIdentifierName XMLHttpRequest
|
||||
hi def link typescriptXHRGlobal Structure
|
||||
syntax keyword typescriptXHRProp contained onreadystatechange readyState response
|
||||
@ -1204,7 +1250,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptXHRMethod
|
||||
hi def link typescriptXHRMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-blob.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Blob BlobBuilder
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName File FileReader
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName FileReaderSync
|
||||
@ -1236,7 +1281,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptURLStaticMethod contained createObjectURL revokeObjectURL nextgroup=typescriptFuncCallArg
|
||||
hi def link typescriptURLStaticMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-crypto.vim
|
||||
syntax keyword typescriptCryptoGlobal containedin=typescriptIdentifierName crypto
|
||||
hi def link typescriptCryptoGlobal Structure
|
||||
syntax keyword typescriptSubtleCryptoMethod contained encrypt decrypt sign verify nextgroup=typescriptFuncCallArg
|
||||
@ -1250,7 +1294,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptCryptoMethod
|
||||
hi def link typescriptCryptoMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-fetch.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Headers Request
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Response
|
||||
syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName fetch nextgroup=typescriptFuncCallArg
|
||||
@ -1274,7 +1317,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptResponseMethod
|
||||
hi def link typescriptResponseMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-service-worker.vim
|
||||
syntax keyword typescriptServiceWorkerProp contained controller ready
|
||||
syntax cluster props add=typescriptServiceWorkerProp
|
||||
hi def link typescriptServiceWorkerProp Keyword
|
||||
@ -1287,7 +1329,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptCacheMethod
|
||||
hi def link typescriptCacheMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-encoding.vim
|
||||
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextEncoder
|
||||
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextDecoder
|
||||
hi def link typescriptEncodingGlobal Structure
|
||||
@ -1298,21 +1339,18 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptEncodingMethod
|
||||
hi def link typescriptEncodingMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-geo.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Geolocation
|
||||
syntax keyword typescriptGeolocationMethod contained getCurrentPosition watchPosition nextgroup=typescriptFuncCallArg
|
||||
syntax keyword typescriptGeolocationMethod contained clearWatch nextgroup=typescriptFuncCallArg
|
||||
syntax cluster props add=typescriptGeolocationMethod
|
||||
hi def link typescriptGeolocationMethod Keyword
|
||||
|
||||
"runtime syntax/yats/web-network.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName NetworkInformation
|
||||
syntax keyword typescriptBOMNetworkProp contained downlink downlinkMax effectiveType
|
||||
syntax keyword typescriptBOMNetworkProp contained rtt type
|
||||
syntax cluster props add=typescriptBOMNetworkProp
|
||||
hi def link typescriptBOMNetworkProp Keyword
|
||||
|
||||
"runtime syntax/yats/web-payment.vim
|
||||
syntax keyword typescriptGlobal containedin=typescriptIdentifierName PaymentRequest
|
||||
syntax keyword typescriptPaymentMethod contained show abort canMakePayment nextgroup=typescriptFuncCallArg
|
||||
syntax cluster props add=typescriptPaymentMethod
|
||||
@ -1340,7 +1378,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptPaymentShippingOptionProp
|
||||
hi def link typescriptPaymentShippingOptionProp Keyword
|
||||
|
||||
"runtime syntax/yats/dom-node.vim
|
||||
syntax keyword typescriptDOMNodeProp contained attributes baseURI baseURIObject childNodes
|
||||
syntax keyword typescriptDOMNodeProp contained firstChild lastChild localName namespaceURI
|
||||
syntax keyword typescriptDOMNodeProp contained nextSibling nodeName nodePrincipal
|
||||
@ -1364,7 +1401,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptDOMNodeType contained DOCUMENT_FRAGMENT_NODE NOTATION_NODE
|
||||
hi def link typescriptDOMNodeType Keyword
|
||||
|
||||
"runtime syntax/yats/dom-elem.vim
|
||||
syntax keyword typescriptDOMElemAttrs contained accessKey clientHeight clientLeft
|
||||
syntax keyword typescriptDOMElemAttrs contained clientTop clientWidth id innerHTML
|
||||
syntax keyword typescriptDOMElemAttrs contained length onafterscriptexecute onbeforescriptexecute
|
||||
@ -1387,7 +1423,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax keyword typescriptDOMElemFuncs contained getAttribute
|
||||
hi def link typescriptDOMElemFuncs Keyword
|
||||
|
||||
"runtime syntax/yats/dom-document.vim
|
||||
syntax keyword typescriptDOMDocProp contained activeElement body cookie defaultView
|
||||
syntax keyword typescriptDOMDocProp contained designMode dir domain embeds forms head
|
||||
syntax keyword typescriptDOMDocProp contained images lastModified links location plugins
|
||||
@ -1419,7 +1454,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptDOMDocMethod
|
||||
hi def link typescriptDOMDocMethod Keyword
|
||||
|
||||
"runtime syntax/yats/dom-event.vim
|
||||
syntax keyword typescriptDOMEventTargetMethod contained addEventListener removeEventListener nextgroup=typescriptEventFuncCallArg
|
||||
syntax keyword typescriptDOMEventTargetMethod contained dispatchEvent waitUntil nextgroup=typescriptEventFuncCallArg
|
||||
syntax cluster props add=typescriptDOMEventTargetMethod
|
||||
@ -1480,7 +1514,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptDOMEventMethod
|
||||
hi def link typescriptDOMEventMethod Keyword
|
||||
|
||||
"runtime syntax/yats/dom-storage.vim
|
||||
syntax keyword typescriptDOMStorage contained sessionStorage localStorage
|
||||
hi def link typescriptDOMStorage Keyword
|
||||
syntax keyword typescriptDOMStorageProp contained length
|
||||
@ -1491,7 +1524,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptDOMStorageMethod
|
||||
hi def link typescriptDOMStorageMethod Keyword
|
||||
|
||||
"runtime syntax/yats/dom-form.vim
|
||||
syntax keyword typescriptDOMFormProp contained acceptCharset action elements encoding
|
||||
syntax keyword typescriptDOMFormProp contained enctype length method name target
|
||||
syntax cluster props add=typescriptDOMFormProp
|
||||
@ -1500,7 +1532,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
syntax cluster props add=typescriptDOMFormMethod
|
||||
hi def link typescriptDOMFormMethod Keyword
|
||||
|
||||
"runtime syntax/yats/css.vim
|
||||
syntax keyword typescriptDOMStyle contained alignContent alignItems alignSelf animation
|
||||
syntax keyword typescriptDOMStyle contained animationDelay animationDirection animationDuration
|
||||
syntax keyword typescriptDOMStyle contained animationFillMode animationIterationCount
|
||||
@ -1575,8 +1606,6 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
|
||||
|
||||
let typescript_props = 1
|
||||
|
||||
"runtime syntax/yats/event.vim
|
||||
syntax keyword typescriptAnimationEvent contained animationend animationiteration
|
||||
syntax keyword typescriptAnimationEvent contained animationstart beginEvent endEvent
|
||||
syntax keyword typescriptAnimationEvent contained repeatEvent
|
||||
@ -1710,14 +1739,12 @@ if get(g:, 'yats_host_keyword', 1)
|
||||
endif
|
||||
|
||||
" patch
|
||||
"runtime syntax/basic/patch.vim
|
||||
" patch for generated code
|
||||
syntax keyword typescriptGlobal Promise
|
||||
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
|
||||
syntax keyword typescriptGlobal Map WeakMap
|
||||
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
|
||||
|
||||
"runtime syntax/basic/members.vim
|
||||
syntax keyword typescriptConstructor contained constructor
|
||||
\ nextgroup=@typescriptCallSignature
|
||||
\ skipwhite skipempty
|
||||
@ -1725,7 +1752,7 @@ syntax keyword typescriptConstructor contained constructor
|
||||
|
||||
syntax cluster memberNextGroup contains=typescriptMemberOptionality,typescriptTypeAnnotation,@typescriptCallSignature
|
||||
|
||||
syntax match typescriptMember /\K\k*/
|
||||
syntax match typescriptMember /#\?\K\k*/
|
||||
\ nextgroup=@memberNextGroup
|
||||
\ contained skipwhite
|
||||
|
||||
@ -1765,7 +1792,6 @@ syntax region typescriptComputedMember contained matchgroup=typescriptPropert
|
||||
\ nextgroup=@memberNextGroup
|
||||
\ skipwhite skipempty
|
||||
|
||||
"runtime syntax/basic/class.vim
|
||||
"don't add typescriptMembers to nextgroup, let outer scope match it
|
||||
" so we won't match abstract method outside abstract class
|
||||
syntax keyword typescriptAbstract abstract
|
||||
@ -1781,7 +1807,7 @@ syntax match typescriptClassName contained /\K\k*/
|
||||
|
||||
syntax region typescriptClassTypeParameter
|
||||
\ start=/</ end=/>/
|
||||
\ contains=typescriptTypeParameter
|
||||
\ contains=@typescriptTypeParameterCluster
|
||||
\ nextgroup=typescriptClassBlock,typescriptClassExtends
|
||||
\ contained skipwhite skipnl
|
||||
|
||||
@ -1813,7 +1839,7 @@ syntax match typescriptInterfaceName contained /\k\+/
|
||||
\ skipwhite skipnl
|
||||
syntax region typescriptInterfaceTypeParameter
|
||||
\ start=/</ end=/>/
|
||||
\ contains=typescriptTypeParameter
|
||||
\ contains=@typescriptTypeParameterCluster
|
||||
\ nextgroup=typescriptObjectType,typescriptInterfaceExtends
|
||||
\ contained
|
||||
\ skipwhite skipnl
|
||||
@ -1832,7 +1858,6 @@ syntax region typescriptInterfaceTypeArguments matchgroup=typescriptTypeBrackets
|
||||
|
||||
syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl
|
||||
|
||||
"runtime syntax/basic/cluster.vim
|
||||
"Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement
|
||||
syntax cluster typescriptStatement
|
||||
\ contains=typescriptBlock,typescriptVariable,
|
||||
@ -1872,7 +1897,6 @@ syntax cluster typescriptValue
|
||||
|
||||
syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion
|
||||
|
||||
"runtime syntax/basic/function.vim
|
||||
syntax keyword typescriptAsyncFuncKeyword async
|
||||
\ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef
|
||||
\ skipwhite
|
||||
@ -1894,7 +1918,7 @@ syntax match typescriptFuncName contained /\K\k*/
|
||||
\ skipwhite
|
||||
|
||||
" destructuring ({ a: ee }) =>
|
||||
syntax match typescriptArrowFuncDef contained /({\_[^}]*}\(:\_[^)]\)\?)\s*=>/
|
||||
syntax match typescriptArrowFuncDef contained /(\(\s*\({\_[^}]*}\|\k\+\)\(:\_[^)]\)\?,\?\)\+)\s*=>/
|
||||
\ contains=typescriptArrowFuncArg,typescriptArrowFunc
|
||||
\ nextgroup=@typescriptExpression,typescriptBlock
|
||||
\ skipwhite skipempty
|
||||
@ -1913,7 +1937,7 @@ syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/
|
||||
\ skipwhite skipempty
|
||||
|
||||
" TODO: optimize this pattern
|
||||
syntax region typescriptArrowFuncDef contained start=/(\_[^)]*):/ end=/=>/
|
||||
syntax region typescriptArrowFuncDef contained start=/(\_[^(^)]*):/ end=/=>/
|
||||
\ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation
|
||||
\ nextgroup=@typescriptExpression,typescriptBlock
|
||||
\ skipwhite skipempty keepend
|
||||
@ -1925,7 +1949,7 @@ syntax region typescriptArrowFuncArg contained start=/<\|(/ end=/\ze=>
|
||||
syntax region typescriptReturnAnnotation contained start=/:/ end=/{/me=e-1 contains=@typescriptType nextgroup=typescriptBlock
|
||||
|
||||
|
||||
syntax region typescriptFuncImpl contained start=/function/ end=/{/me=e-1
|
||||
syntax region typescriptFuncImpl contained start=/function\>/ end=/{/me=e-1
|
||||
\ contains=typescriptFuncKeyword
|
||||
\ nextgroup=typescriptBlock
|
||||
|
||||
@ -1941,9 +1965,8 @@ syntax region typescriptParamImpl matchgroup=typescriptParens
|
||||
\ nextgroup=typescriptReturnAnnotation,typescriptBlock
|
||||
\ contained skipwhite skipnl
|
||||
|
||||
"runtime syntax/basic/decorator.vim
|
||||
syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
|
||||
\ nextgroup=typescriptArgumentList,typescriptTypeArguments
|
||||
\ nextgroup=typescriptFuncCallArg,typescriptTypeArguments
|
||||
\ contains=@_semantic,typescriptDotNotation
|
||||
|
||||
" Define the default highlighting.
|
||||
@ -1957,6 +1980,7 @@ hi def link typescriptComment Comment
|
||||
hi def link typescriptLineComment Comment
|
||||
hi def link typescriptDocComment Comment
|
||||
hi def link typescriptCommentTodo Todo
|
||||
hi def link typescriptMagicComment SpecialComment
|
||||
hi def link typescriptRef Include
|
||||
hi def link typescriptDocNotation SpecialComment
|
||||
hi def link typescriptDocTags SpecialComment
|
||||
@ -1970,9 +1994,11 @@ hi def link typescriptDocParamType Type
|
||||
hi def link typescriptString String
|
||||
hi def link typescriptSpecial Special
|
||||
hi def link typescriptStringLiteralType String
|
||||
hi def link typescriptTemplateLiteralType String
|
||||
hi def link typescriptStringMember String
|
||||
hi def link typescriptTemplate String
|
||||
hi def link typescriptEventString String
|
||||
hi def link typescriptDestructureString String
|
||||
hi def link typescriptASCII Special
|
||||
hi def link typescriptTemplateSB Label
|
||||
hi def link typescriptRegexpString String
|
||||
@ -1986,6 +2012,7 @@ hi def link typescriptDefault typescriptCase
|
||||
hi def link typescriptBranch Conditional
|
||||
hi def link typescriptIdentifier Structure
|
||||
hi def link typescriptVariable Identifier
|
||||
hi def link typescriptDestructureVariable PreProc
|
||||
hi def link typescriptEnumKeyword Identifier
|
||||
hi def link typescriptRepeat Repeat
|
||||
hi def link typescriptForOperator Repeat
|
||||
@ -1997,14 +2024,17 @@ hi def link typescriptCastKeyword Special
|
||||
hi def link typescriptType Type
|
||||
hi def link typescriptNull Boolean
|
||||
hi def link typescriptNumber Number
|
||||
hi def link typescriptExponent Number
|
||||
hi def link typescriptBoolean Boolean
|
||||
hi def link typescriptObjectLabel typescriptLabel
|
||||
hi def link typescriptDestructureLabel Function
|
||||
hi def link typescriptLabel Label
|
||||
hi def link typescriptTupleLable Label
|
||||
hi def link typescriptStringProperty String
|
||||
hi def link typescriptImport Special
|
||||
hi def link typescriptImportType Special
|
||||
hi def link typescriptAmbientDeclaration Special
|
||||
hi def link typescriptExport Special
|
||||
hi def link typescriptExportType Special
|
||||
hi def link typescriptModule Special
|
||||
hi def link typescriptTry Special
|
||||
hi def link typescriptExceptions Special
|
||||
@ -2013,6 +2043,7 @@ hi def link typescriptMember Function
|
||||
hi def link typescriptMethodAccessor Operator
|
||||
|
||||
hi def link typescriptAsyncFuncKeyword Keyword
|
||||
hi def link typescriptObjectAsyncKeyword Keyword
|
||||
hi def link typescriptAsyncFor Keyword
|
||||
hi def link typescriptFuncKeyword Keyword
|
||||
hi def link typescriptAsyncFunc Keyword
|
||||
|
@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 8.0 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: July 15, 2020
|
||||
" Version: 8.0-41
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: October 06, 2020
|
||||
" Version: 8.0-45
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@ -19,12 +19,12 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unl ve[rsion] vim9 vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] unlo[ckvar] verb[ose] vim9script vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] uns[ilent] vert[ical] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] up[date] vi[sual] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] v vie[w] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] unlo[ckvar] ve[rsion] vim9 vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] uns[ilent] verb[ose] vim9script vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] up[date] vert[ical] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] v vi[sual] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl var vie[w] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained Arguments Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
|
||||
|
||||
@ -78,11 +78,11 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getpos gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval match matchend menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undotree wildmenumode win_execute win_gotoid winlayout winrestview winwidth
|
||||
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable flatten fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmarklist getqflist gettabvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchadd matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setprompt prop_remove prop_type_list pyxeval readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim uniq winbufnr win_findbuf winheight winline winsaveview wordcount
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmatches getreg gettabwinvar getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchaddpos matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prop_add prop_type_add pum_getpos rand reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc values wincol win_getid win_id2tabwin winnr win_screenpos writefile
|
||||
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getmousepos getreginfo gettagstack getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matcharg matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_clear prop_type_change pumvisible range reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type virtcol windowsversion win_gettype win_id2win winrestcmd win_splitmove xor
|
||||
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpid getregtype getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapset matchdelete max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_setcallback prop_find prop_type_delete py3eval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper undofile visualmode
|
||||
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_list prop_type_get pyeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper undofile visualmode win_execute winheight winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp charclass ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_remove prop_type_list pyxeval readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable flatten fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_type_add pum_getpos rand reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim uniq winbufnr win_getid win_id2win winrestview wordcount
|
||||
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_clear prop_type_change pumvisible range reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc values wincol win_gettype winlayout winsaveview writefile
|
||||
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_find prop_type_delete py3eval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type virtcol windowsversion win_gotoid winline win_screenpos xor
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@ -236,7 +236,7 @@ endif
|
||||
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
|
||||
" =========
|
||||
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
|
||||
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
|
||||
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
|
||||
syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
@ -266,7 +266,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
|
||||
" =======================
|
||||
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
|
||||
syn keyword vimUserCommand contained com[mand]
|
||||
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
|
||||
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
|
||||
syn match vimUserAttrbError contained "-\a\+\ze\s"
|
||||
syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
|
||||
syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
|
||||
@ -295,12 +295,13 @@ syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentS
|
||||
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
|
||||
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
||||
" Vim9 comments - TODO: might be highlighted while they don't work
|
||||
syn match vim9Comment excludenl +^#[^{].*$+ contains=@vimCommentGroup,vimCommentString
|
||||
syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
|
||||
syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
|
||||
syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
|
||||
" Vim9 comment inside expression
|
||||
syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
|
||||
syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
|
||||
syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString
|
||||
|
||||
" Environment Variables: {{{2
|
||||
" =====================
|
||||
@ -370,7 +371,8 @@ syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
|
||||
syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
|
||||
|
||||
syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
|
||||
syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
|
||||
syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
|
||||
syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
|
||||
|
||||
" Complex Repeats: (:h complex-repeat) {{{2
|
||||
" ===============
|
||||
@ -386,7 +388,7 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
|
||||
|
||||
" Let: {{{2
|
||||
" ===
|
||||
syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
|
||||
syn keyword vimLet let var unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
|
||||
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment,vim9Comment
|
||||
|
||||
" Abbreviations: {{{2
|
||||
@ -397,8 +399,9 @@ syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbre
|
||||
" =======
|
||||
syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
|
||||
syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
|
||||
syn match vimAutoCmdSfxList contained "\S*"
|
||||
syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod
|
||||
syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
|
||||
syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)"
|
||||
|
||||
" Echo And Execute: -- prefer strings! {{{2
|
||||
" ================
|
||||
@ -634,7 +637,7 @@ syn match vimCtrlChar "[--]"
|
||||
" Beginners - Patterns that involve ^ {{{2
|
||||
" =========
|
||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vim9LineComment +^[ \t]*#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
|
||||
syn match vimContinue "^\s*\\"
|
||||
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
|
||||
@ -861,6 +864,7 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimAutoCmdOpt vimOption
|
||||
hi def link vimAutoCmd vimCommand
|
||||
hi def link vimAutoEvent Type
|
||||
hi def link vimAutoCmdMod Special
|
||||
hi def link vimAutoSet vimCommand
|
||||
hi def link vimBehaveModel vimBehave
|
||||
hi def link vimBehave vimCommand
|
||||
|
@ -2,7 +2,7 @@
|
||||
" This is a GENERATED FILE. Please always refer to source file at the URI below.
|
||||
" Language: XKB (X Keyboard Extension) components
|
||||
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2003-04-13
|
||||
" Last Change: 2020 Oct 18
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim
|
||||
|
||||
" Setup
|
||||
@ -41,7 +41,7 @@ syn match xkbPhysicalKey "<\w\+>"
|
||||
syn keyword xkbPreproc augment include replace
|
||||
syn keyword xkbConstant False True
|
||||
syn keyword xkbModif override replace
|
||||
syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
|
||||
syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
|
||||
syn keyword xkbFunction AnyOf ISOLock LatchGroup LatchMods LockControls LockGroup LockMods LockPointerButton MovePtr NoAction PointerButton SetControls SetGroup SetMods SetPtrDflt Terminate
|
||||
syn keyword xkbTModif default hidden partial virtual
|
||||
syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types
|
||||
|
@ -657,7 +657,7 @@ do_argfile(exarg_T *eap, int argn)
|
||||
#endif
|
||||
|
||||
// split window or create new tab page first
|
||||
if (*eap->cmd == 's' || cmdmod.tab != 0)
|
||||
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
|
||||
{
|
||||
if (win_split(0, 0) == FAIL)
|
||||
return;
|
||||
@ -878,7 +878,7 @@ do_arg_all(
|
||||
alist_T *alist; // argument list to be used
|
||||
buf_T *buf;
|
||||
tabpage_T *tpnext;
|
||||
int had_tab = cmdmod.tab;
|
||||
int had_tab = cmdmod.cmod_tab;
|
||||
win_T *old_curwin, *last_curwin;
|
||||
tabpage_T *old_curtab, *last_curtab;
|
||||
win_T *new_curwin = NULL;
|
||||
@ -1116,7 +1116,7 @@ do_arg_all(
|
||||
|
||||
// When ":tab" was used open a new tab for a new window repeatedly.
|
||||
if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
|
||||
cmdmod.tab = 9999;
|
||||
cmdmod.cmod_tab = 9999;
|
||||
}
|
||||
|
||||
// Remove the "lock" on the argument list.
|
||||
|
3
src/auto/configure
vendored
3
src/auto/configure
vendored
@ -5823,6 +5823,9 @@ $as_echo "not found" >&6; }
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${path}/libracket3m.a"; then
|
||||
MZSCHEME_LIBS="${path}/libracket3m.a"
|
||||
if test -f "${path}/librktio.a"; then
|
||||
MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
|
||||
fi
|
||||
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
|
||||
elif test -f "${path}/libracket.a"; then
|
||||
MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
|
||||
|
@ -149,6 +149,7 @@ static struct event_name
|
||||
{"InsertChange", EVENT_INSERTCHANGE},
|
||||
{"InsertEnter", EVENT_INSERTENTER},
|
||||
{"InsertLeave", EVENT_INSERTLEAVE},
|
||||
{"InsertLeavePre", EVENT_INSERTLEAVEPRE},
|
||||
{"InsertCharPre", EVENT_INSERTCHARPRE},
|
||||
{"MenuPopup", EVENT_MENUPOPUP},
|
||||
{"OptionSet", EVENT_OPTIONSET},
|
||||
@ -1432,9 +1433,9 @@ aucmd_prepbuf(
|
||||
// window. Expect a few side effects...
|
||||
win = curwin;
|
||||
|
||||
aco->save_curwin = curwin;
|
||||
aco->save_curwin_id = curwin->w_id;
|
||||
aco->save_curbuf = curbuf;
|
||||
aco->save_prevwin = prevwin;
|
||||
aco->save_prevwin_id = prevwin == NULL ? 0 : prevwin->w_id;
|
||||
if (win != NULL)
|
||||
{
|
||||
// There is a window for "buf" in the current tab page, make it the
|
||||
@ -1480,7 +1481,7 @@ aucmd_prepbuf(
|
||||
curwin = aucmd_win;
|
||||
}
|
||||
curbuf = buf;
|
||||
aco->new_curwin = curwin;
|
||||
aco->new_curwin_id = curwin->w_id;
|
||||
set_bufref(&aco->new_curbuf, curbuf);
|
||||
}
|
||||
|
||||
@ -1492,7 +1493,8 @@ aucmd_prepbuf(
|
||||
aucmd_restbuf(
|
||||
aco_save_T *aco) // structure holding saved values
|
||||
{
|
||||
int dummy;
|
||||
int dummy;
|
||||
win_T *save_curwin;
|
||||
|
||||
if (aco->use_aucmd_win)
|
||||
{
|
||||
@ -1532,19 +1534,22 @@ win_found:
|
||||
(void)win_comp_pos(); // recompute window positions
|
||||
unblock_autocmds();
|
||||
|
||||
if (win_valid(aco->save_curwin))
|
||||
curwin = aco->save_curwin;
|
||||
save_curwin = win_find_by_id(aco->save_curwin_id);
|
||||
if (save_curwin != NULL)
|
||||
curwin = save_curwin;
|
||||
else
|
||||
// Hmm, original window disappeared. Just use the first one.
|
||||
curwin = firstwin;
|
||||
if (win_valid(aco->save_prevwin))
|
||||
prevwin = aco->save_prevwin;
|
||||
curbuf = curwin->w_buffer;
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
// May need to restore insert mode for a prompt buffer.
|
||||
entering_window(curwin);
|
||||
#endif
|
||||
prevwin = win_find_by_id(aco->save_prevwin_id);
|
||||
#ifdef FEAT_EVAL
|
||||
vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables
|
||||
hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab
|
||||
#endif
|
||||
curbuf = curwin->w_buffer;
|
||||
|
||||
vim_free(globaldir);
|
||||
globaldir = aco->globaldir;
|
||||
|
||||
@ -1566,13 +1571,15 @@ win_found:
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore curwin
|
||||
if (win_valid(aco->save_curwin))
|
||||
// Restore curwin. Use the window ID, a window may have been closed
|
||||
// and the memory re-used for another one.
|
||||
save_curwin = win_find_by_id(aco->save_curwin_id);
|
||||
if (save_curwin != NULL)
|
||||
{
|
||||
// Restore the buffer which was previously edited by curwin, if
|
||||
// it was changed, we are still the same window and the buffer is
|
||||
// valid.
|
||||
if (curwin == aco->new_curwin
|
||||
if (curwin->w_id == aco->new_curwin_id
|
||||
&& curbuf != aco->new_curbuf.br_buf
|
||||
&& bufref_valid(&aco->new_curbuf)
|
||||
&& aco->new_curbuf.br_buf->b_ml.ml_mfp != NULL)
|
||||
@ -1587,10 +1594,9 @@ win_found:
|
||||
++curbuf->b_nwindows;
|
||||
}
|
||||
|
||||
curwin = aco->save_curwin;
|
||||
curwin = save_curwin;
|
||||
curbuf = curwin->w_buffer;
|
||||
if (win_valid(aco->save_prevwin))
|
||||
prevwin = aco->save_prevwin;
|
||||
prevwin = win_find_by_id(aco->save_prevwin_id);
|
||||
// In case the autocommand moves the cursor to a position that
|
||||
// does not exist in curbuf.
|
||||
check_cursor();
|
||||
|
@ -80,6 +80,7 @@ blob_copy(blob_T *from, typval_T *to)
|
||||
len = 0;
|
||||
}
|
||||
to->vval.v_blob->bv_ga.ga_len = len;
|
||||
to->vval.v_blob->bv_ga.ga_maxlen = len;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
320
src/buffer.c
320
src/buffer.c
@ -673,7 +673,7 @@ aucmd_abort:
|
||||
buf->b_nwindows = nwindows;
|
||||
|
||||
buf_freeall(buf, (del_buf ? BFA_DEL : 0)
|
||||
+ (wipe_buf ? BFA_WIPE : 0)
|
||||
+ (wipe_buf ? BFA_WIPE : 0)
|
||||
+ (ignore_abort ? BFA_IGNORE_ABORT : 0));
|
||||
|
||||
// Autocommands may have deleted the buffer.
|
||||
@ -1005,6 +1005,22 @@ free_buffer_stuff(
|
||||
VIM_CLEAR(buf->b_start_fenc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free one wininfo_T.
|
||||
*/
|
||||
void
|
||||
free_wininfo(wininfo_T *wip)
|
||||
{
|
||||
if (wip->wi_optset)
|
||||
{
|
||||
clear_winopt(&wip->wi_opt);
|
||||
#ifdef FEAT_FOLDING
|
||||
deleteFoldRecurse(&wip->wi_folds);
|
||||
#endif
|
||||
}
|
||||
vim_free(wip);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the b_wininfo list for buffer "buf".
|
||||
*/
|
||||
@ -1017,14 +1033,7 @@ clear_wininfo(buf_T *buf)
|
||||
{
|
||||
wip = buf->b_wininfo;
|
||||
buf->b_wininfo = wip->wi_next;
|
||||
if (wip->wi_optset)
|
||||
{
|
||||
clear_winopt(&wip->wi_opt);
|
||||
#ifdef FEAT_FOLDING
|
||||
deleteFoldRecurse(&wip->wi_folds);
|
||||
#endif
|
||||
}
|
||||
vim_free(wip);
|
||||
free_wininfo(wip);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1444,7 +1453,7 @@ do_buffer(
|
||||
if (!forceit && bufIsChanged(buf))
|
||||
{
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
if ((p_confirm || cmdmod.confirm) && p_write)
|
||||
if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write)
|
||||
{
|
||||
dialog_changed(buf, FALSE);
|
||||
if (!bufref_valid(&bufref))
|
||||
@ -1634,7 +1643,7 @@ do_buffer(
|
||||
if (action == DOBUF_GOTO && !can_abandon(curbuf, forceit))
|
||||
{
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
if ((p_confirm || cmdmod.confirm) && p_write)
|
||||
if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write)
|
||||
{
|
||||
bufref_T bufref;
|
||||
|
||||
@ -1689,7 +1698,7 @@ set_curbuf(buf_T *buf, int action)
|
||||
bufref_T prevbufref;
|
||||
|
||||
setpcmark();
|
||||
if (!cmdmod.keepalt)
|
||||
if ((cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
|
||||
curwin->w_alt_fnum = curbuf->b_fnum; // remember alternate file
|
||||
buflist_altfpos(curwin); // remember curpos
|
||||
|
||||
@ -1974,7 +1983,8 @@ buflist_new(
|
||||
{
|
||||
vim_free(ffname);
|
||||
if (lnum != 0)
|
||||
buflist_setfpos(buf, curwin, lnum, (colnr_T)0, FALSE);
|
||||
buflist_setfpos(buf, (flags & BLN_NOCURWIN) ? NULL : curwin,
|
||||
lnum, (colnr_T)0, FALSE);
|
||||
|
||||
if ((flags & BLN_NOOPT) == 0)
|
||||
// copy the options now, if 'cpo' doesn't have 's' and not done
|
||||
@ -2144,7 +2154,7 @@ buflist_new(
|
||||
if (top_file_num < 0) // wrap around (may cause duplicates)
|
||||
{
|
||||
emsg(_("W14: Warning: List of file names overflow"));
|
||||
if (emsg_silent == 0)
|
||||
if (emsg_silent == 0 && !in_assert_fails)
|
||||
{
|
||||
out_flush();
|
||||
ui_delay(3001L, TRUE); // make sure it is noticed
|
||||
@ -2908,7 +2918,7 @@ buflist_nr2name(
|
||||
void
|
||||
buflist_setfpos(
|
||||
buf_T *buf,
|
||||
win_T *win,
|
||||
win_T *win, // may be NULL when using :badd
|
||||
linenr_T lnum,
|
||||
colnr_T col,
|
||||
int copy_options)
|
||||
@ -2950,7 +2960,7 @@ buflist_setfpos(
|
||||
wip->wi_fpos.lnum = lnum;
|
||||
wip->wi_fpos.col = col;
|
||||
}
|
||||
if (copy_options)
|
||||
if (copy_options && win != NULL)
|
||||
{
|
||||
// Save the window-specific option values.
|
||||
copy_winopt(&win->w_onebuf_opt, &wip->wi_opt);
|
||||
@ -2997,6 +3007,7 @@ wininfo_other_tab_diff(wininfo_T *wip)
|
||||
/*
|
||||
* Find info for the current window in buffer "buf".
|
||||
* If not found, return the info for the most recently used window.
|
||||
* When "need_options" is TRUE skip entries where wi_optset is FALSE.
|
||||
* When "skip_diff_buffer" is TRUE avoid windows with 'diff' set that is in
|
||||
* another tab page.
|
||||
* Returns NULL when there isn't any info.
|
||||
@ -3004,6 +3015,7 @@ wininfo_other_tab_diff(wininfo_T *wip)
|
||||
static wininfo_T *
|
||||
find_wininfo(
|
||||
buf_T *buf,
|
||||
int need_options,
|
||||
int skip_diff_buffer UNUSED)
|
||||
{
|
||||
wininfo_T *wip;
|
||||
@ -3013,18 +3025,25 @@ find_wininfo(
|
||||
#ifdef FEAT_DIFF
|
||||
&& (!skip_diff_buffer || !wininfo_other_tab_diff(wip))
|
||||
#endif
|
||||
)
|
||||
|
||||
&& (!need_options || wip->wi_optset))
|
||||
break;
|
||||
|
||||
// If no wininfo for curwin, use the first in the list (that doesn't have
|
||||
// 'diff' set and is in another tab page).
|
||||
// If "need_options" is TRUE skip entries that don't have options set,
|
||||
// unless the window is editing "buf", so we can copy from the window
|
||||
// itself.
|
||||
if (wip == NULL)
|
||||
{
|
||||
#ifdef FEAT_DIFF
|
||||
if (skip_diff_buffer)
|
||||
{
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (!wininfo_other_tab_diff(wip))
|
||||
if (!wininfo_other_tab_diff(wip)
|
||||
&& (!need_options || wip->wi_optset
|
||||
|| (wip->wi_win != NULL
|
||||
&& wip->wi_win->w_buffer == buf)))
|
||||
break;
|
||||
}
|
||||
else
|
||||
@ -3050,7 +3069,7 @@ get_winopts(buf_T *buf)
|
||||
clearFolding(curwin);
|
||||
#endif
|
||||
|
||||
wip = find_wininfo(buf, TRUE);
|
||||
wip = find_wininfo(buf, TRUE, TRUE);
|
||||
if (wip != NULL && wip->wi_win != NULL
|
||||
&& wip->wi_win != curwin && wip->wi_win->w_buffer == buf)
|
||||
{
|
||||
@ -3097,7 +3116,7 @@ buflist_findfpos(buf_T *buf)
|
||||
wininfo_T *wip;
|
||||
static pos_T no_position = {1, 0, 0};
|
||||
|
||||
wip = find_wininfo(buf, FALSE);
|
||||
wip = find_wininfo(buf, FALSE, FALSE);
|
||||
if (wip != NULL)
|
||||
return &(wip->wi_fpos);
|
||||
else
|
||||
@ -3435,7 +3454,7 @@ setaltfname(
|
||||
|
||||
// Create a buffer. 'buflisted' is not set if it's a new buffer
|
||||
buf = buflist_new(ffname, sfname, lnum, 0);
|
||||
if (buf != NULL && !cmdmod.keepalt)
|
||||
if (buf != NULL && (cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
|
||||
curwin->w_alt_fnum = buf->b_fnum;
|
||||
return buf;
|
||||
}
|
||||
@ -3998,6 +4017,32 @@ free_titles(void)
|
||||
#endif // FEAT_TITLE
|
||||
|
||||
#if defined(FEAT_STL_OPT) || defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
||||
|
||||
/*
|
||||
* Used for building in the status line.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char_u *stl_start;
|
||||
int stl_minwid;
|
||||
int stl_maxwid;
|
||||
enum {
|
||||
Normal,
|
||||
Empty,
|
||||
Group,
|
||||
Middle,
|
||||
Highlight,
|
||||
TabPage,
|
||||
Trunc
|
||||
} stl_type;
|
||||
} stl_item_T;
|
||||
|
||||
static size_t stl_items_len = 20; // Initial value, grows as needed.
|
||||
static stl_item_T *stl_items = NULL;
|
||||
static int *stl_groupitem = NULL;
|
||||
static stl_hlrec_T *stl_hltab = NULL;
|
||||
static stl_hlrec_T *stl_tabtab = NULL;
|
||||
|
||||
/*
|
||||
* Build a string from the status line items in "fmt".
|
||||
* Return length of string in screen cells.
|
||||
@ -4021,8 +4066,8 @@ build_stl_str_hl(
|
||||
int use_sandbox UNUSED, // "fmt" was set insecurely, use sandbox
|
||||
int fillchar,
|
||||
int maxwidth,
|
||||
struct stl_hlrec *hltab, // return: HL attributes (can be NULL)
|
||||
struct stl_hlrec *tabtab) // return: tab page nrs (can be NULL)
|
||||
stl_hlrec_T **hltab, // return: HL attributes (can be NULL)
|
||||
stl_hlrec_T **tabtab) // return: tab page nrs (can be NULL)
|
||||
{
|
||||
linenr_T lnum;
|
||||
size_t len;
|
||||
@ -4050,24 +4095,7 @@ build_stl_str_hl(
|
||||
int curitem;
|
||||
int group_end_userhl;
|
||||
int group_start_userhl;
|
||||
int groupitem[STL_MAX_ITEM];
|
||||
int groupdepth;
|
||||
struct stl_item
|
||||
{
|
||||
char_u *start;
|
||||
int minwid;
|
||||
int maxwid;
|
||||
enum
|
||||
{
|
||||
Normal,
|
||||
Empty,
|
||||
Group,
|
||||
Middle,
|
||||
Highlight,
|
||||
TabPage,
|
||||
Trunc
|
||||
} type;
|
||||
} item[STL_MAX_ITEM];
|
||||
int minwid;
|
||||
int maxwid;
|
||||
int zeropad;
|
||||
@ -4077,10 +4105,18 @@ build_stl_str_hl(
|
||||
char_u buf_tmp[TMPLEN];
|
||||
char_u win_tmp[TMPLEN];
|
||||
char_u *usefmt = fmt;
|
||||
struct stl_hlrec *sp;
|
||||
stl_hlrec_T *sp;
|
||||
int save_must_redraw = must_redraw;
|
||||
int save_redr_type = curwin->w_redr_type;
|
||||
|
||||
if (stl_items == NULL)
|
||||
{
|
||||
stl_items = ALLOC_MULT(stl_item_T, stl_items_len);
|
||||
stl_groupitem = ALLOC_MULT(int, stl_items_len);
|
||||
stl_hltab = ALLOC_MULT(stl_hlrec_T, stl_items_len);
|
||||
stl_tabtab = ALLOC_MULT(stl_hlrec_T, stl_items_len);
|
||||
}
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
/*
|
||||
* When the format starts with "%!" then evaluate it as an expression and
|
||||
@ -4143,16 +4179,30 @@ build_stl_str_hl(
|
||||
prevchar_isitem = FALSE;
|
||||
for (s = usefmt; *s; )
|
||||
{
|
||||
if (curitem == STL_MAX_ITEM)
|
||||
if (curitem == (int)stl_items_len)
|
||||
{
|
||||
// There are too many items. Add the error code to the statusline
|
||||
// to give the user a hint about what went wrong.
|
||||
if (p + 6 < out + outlen)
|
||||
{
|
||||
mch_memmove(p, " E541", (size_t)5);
|
||||
p += 5;
|
||||
}
|
||||
break;
|
||||
size_t new_len = stl_items_len * 3 / 2;
|
||||
stl_item_T *new_items;
|
||||
int *new_groupitem;
|
||||
stl_hlrec_T *new_hlrec;
|
||||
|
||||
new_items = vim_realloc(stl_items, sizeof(stl_item_T) * new_len);
|
||||
if (new_items == NULL)
|
||||
break;
|
||||
stl_items = new_items;
|
||||
new_groupitem = vim_realloc(stl_groupitem, sizeof(int) * new_len);
|
||||
if (new_groupitem == NULL)
|
||||
break;
|
||||
stl_groupitem = new_groupitem;
|
||||
new_hlrec = vim_realloc(stl_hltab, sizeof(stl_hlrec_T) * new_len);
|
||||
if (new_hlrec == NULL)
|
||||
break;
|
||||
stl_hltab = new_hlrec;
|
||||
new_hlrec = vim_realloc(stl_tabtab, sizeof(stl_hlrec_T) * new_len);
|
||||
if (new_hlrec == NULL)
|
||||
break;
|
||||
stl_tabtab = new_hlrec;
|
||||
stl_items_len = new_len;
|
||||
}
|
||||
|
||||
if (*s != NUL && *s != '%')
|
||||
@ -4185,15 +4235,15 @@ build_stl_str_hl(
|
||||
s++;
|
||||
if (groupdepth > 0)
|
||||
continue;
|
||||
item[curitem].type = Middle;
|
||||
item[curitem++].start = p;
|
||||
stl_items[curitem].stl_type = Middle;
|
||||
stl_items[curitem++].stl_start = p;
|
||||
continue;
|
||||
}
|
||||
if (*s == STL_TRUNCMARK)
|
||||
{
|
||||
s++;
|
||||
item[curitem].type = Trunc;
|
||||
item[curitem++].start = p;
|
||||
stl_items[curitem].stl_type = Trunc;
|
||||
stl_items[curitem++].stl_start = p;
|
||||
continue;
|
||||
}
|
||||
if (*s == ')')
|
||||
@ -4203,83 +4253,85 @@ build_stl_str_hl(
|
||||
continue;
|
||||
groupdepth--;
|
||||
|
||||
t = item[groupitem[groupdepth]].start;
|
||||
t = stl_items[stl_groupitem[groupdepth]].stl_start;
|
||||
*p = NUL;
|
||||
l = vim_strsize(t);
|
||||
if (curitem > groupitem[groupdepth] + 1
|
||||
&& item[groupitem[groupdepth]].minwid == 0)
|
||||
if (curitem > stl_groupitem[groupdepth] + 1
|
||||
&& stl_items[stl_groupitem[groupdepth]].stl_minwid == 0)
|
||||
{
|
||||
// remove group if all items are empty and highlight group
|
||||
// doesn't change
|
||||
group_start_userhl = group_end_userhl = 0;
|
||||
for (n = groupitem[groupdepth] - 1; n >= 0; n--)
|
||||
for (n = stl_groupitem[groupdepth] - 1; n >= 0; n--)
|
||||
{
|
||||
if (item[n].type == Highlight)
|
||||
if (stl_items[n].stl_type == Highlight)
|
||||
{
|
||||
group_start_userhl = group_end_userhl = item[n].minwid;
|
||||
group_start_userhl = group_end_userhl =
|
||||
stl_items[n].stl_minwid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (n = groupitem[groupdepth] + 1; n < curitem; n++)
|
||||
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
|
||||
{
|
||||
if (item[n].type == Normal)
|
||||
if (stl_items[n].stl_type == Normal)
|
||||
break;
|
||||
if (item[n].type == Highlight)
|
||||
group_end_userhl = item[n].minwid;
|
||||
if (stl_items[n].stl_type == Highlight)
|
||||
group_end_userhl = stl_items[n].stl_minwid;
|
||||
}
|
||||
if (n == curitem && group_start_userhl == group_end_userhl)
|
||||
{
|
||||
// empty group
|
||||
p = t;
|
||||
l = 0;
|
||||
for (n = groupitem[groupdepth] + 1; n < curitem; n++)
|
||||
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
|
||||
{
|
||||
// do not use the highlighting from the removed group
|
||||
if (item[n].type == Highlight)
|
||||
item[n].type = Empty;
|
||||
if (stl_items[n].stl_type == Highlight)
|
||||
stl_items[n].stl_type = Empty;
|
||||
// adjust the start position of TabPage to the next
|
||||
// item position
|
||||
if (item[n].type == TabPage)
|
||||
item[n].start = p;
|
||||
if (stl_items[n].stl_type == TabPage)
|
||||
stl_items[n].stl_start = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (l > item[groupitem[groupdepth]].maxwid)
|
||||
if (l > stl_items[stl_groupitem[groupdepth]].stl_maxwid)
|
||||
{
|
||||
// truncate, remove n bytes of text at the start
|
||||
if (has_mbyte)
|
||||
{
|
||||
// Find the first character that should be included.
|
||||
n = 0;
|
||||
while (l >= item[groupitem[groupdepth]].maxwid)
|
||||
while (l >= stl_items[stl_groupitem[groupdepth]].stl_maxwid)
|
||||
{
|
||||
l -= ptr2cells(t + n);
|
||||
n += (*mb_ptr2len)(t + n);
|
||||
}
|
||||
}
|
||||
else
|
||||
n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
|
||||
n = (long)(p - t) - stl_items[stl_groupitem[groupdepth]]
|
||||
.stl_maxwid + 1;
|
||||
|
||||
*t = '<';
|
||||
mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
|
||||
p = p - n + 1;
|
||||
|
||||
// Fill up space left over by half a double-wide char.
|
||||
while (++l < item[groupitem[groupdepth]].minwid)
|
||||
while (++l < stl_items[stl_groupitem[groupdepth]].stl_minwid)
|
||||
*p++ = fillchar;
|
||||
|
||||
// correct the start of the items for the truncation
|
||||
for (l = groupitem[groupdepth] + 1; l < curitem; l++)
|
||||
for (l = stl_groupitem[groupdepth] + 1; l < curitem; l++)
|
||||
{
|
||||
item[l].start -= n;
|
||||
if (item[l].start < t)
|
||||
item[l].start = t;
|
||||
stl_items[l].stl_start -= n;
|
||||
if (stl_items[l].stl_start < t)
|
||||
stl_items[l].stl_start = t;
|
||||
}
|
||||
}
|
||||
else if (abs(item[groupitem[groupdepth]].minwid) > l)
|
||||
else if (abs(stl_items[stl_groupitem[groupdepth]].stl_minwid) > l)
|
||||
{
|
||||
// fill
|
||||
n = item[groupitem[groupdepth]].minwid;
|
||||
n = stl_items[stl_groupitem[groupdepth]].stl_minwid;
|
||||
if (n < 0)
|
||||
{
|
||||
// fill by appending characters
|
||||
@ -4295,8 +4347,8 @@ build_stl_str_hl(
|
||||
if (p + l >= out + outlen)
|
||||
l = (long)((out + outlen) - p - 1);
|
||||
p += l;
|
||||
for (n = groupitem[groupdepth] + 1; n < curitem; n++)
|
||||
item[n].start += l;
|
||||
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
|
||||
stl_items[n].stl_start += l;
|
||||
for ( ; l > 0; l--)
|
||||
*t++ = fillchar;
|
||||
}
|
||||
@ -4325,9 +4377,9 @@ build_stl_str_hl(
|
||||
}
|
||||
if (*s == STL_USER_HL)
|
||||
{
|
||||
item[curitem].type = Highlight;
|
||||
item[curitem].start = p;
|
||||
item[curitem].minwid = minwid > 9 ? 1 : minwid;
|
||||
stl_items[curitem].stl_type = Highlight;
|
||||
stl_items[curitem].stl_start = p;
|
||||
stl_items[curitem].stl_minwid = minwid > 9 ? 1 : minwid;
|
||||
s++;
|
||||
curitem++;
|
||||
continue;
|
||||
@ -4341,9 +4393,10 @@ build_stl_str_hl(
|
||||
// %X ends the close label, go back to the previously
|
||||
// define tab label nr.
|
||||
for (n = curitem - 1; n >= 0; --n)
|
||||
if (item[n].type == TabPage && item[n].minwid >= 0)
|
||||
if (stl_items[n].stl_type == TabPage
|
||||
&& stl_items[n].stl_minwid >= 0)
|
||||
{
|
||||
minwid = item[n].minwid;
|
||||
minwid = stl_items[n].stl_minwid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4351,9 +4404,9 @@ build_stl_str_hl(
|
||||
// close nrs are stored as negative values
|
||||
minwid = - minwid;
|
||||
}
|
||||
item[curitem].type = TabPage;
|
||||
item[curitem].start = p;
|
||||
item[curitem].minwid = minwid;
|
||||
stl_items[curitem].stl_type = TabPage;
|
||||
stl_items[curitem].stl_start = p;
|
||||
stl_items[curitem].stl_minwid = minwid;
|
||||
s++;
|
||||
curitem++;
|
||||
continue;
|
||||
@ -4371,11 +4424,11 @@ build_stl_str_hl(
|
||||
minwid = (minwid > 50 ? 50 : minwid) * l;
|
||||
if (*s == '(')
|
||||
{
|
||||
groupitem[groupdepth++] = curitem;
|
||||
item[curitem].type = Group;
|
||||
item[curitem].start = p;
|
||||
item[curitem].minwid = minwid;
|
||||
item[curitem].maxwid = maxwid;
|
||||
stl_groupitem[groupdepth++] = curitem;
|
||||
stl_items[curitem].stl_type = Group;
|
||||
stl_items[curitem].stl_start = p;
|
||||
stl_items[curitem].stl_minwid = minwid;
|
||||
stl_items[curitem].stl_maxwid = maxwid;
|
||||
s++;
|
||||
curitem++;
|
||||
continue;
|
||||
@ -4628,9 +4681,9 @@ build_stl_str_hl(
|
||||
++s;
|
||||
if (*s == '#')
|
||||
{
|
||||
item[curitem].type = Highlight;
|
||||
item[curitem].start = p;
|
||||
item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
|
||||
stl_items[curitem].stl_type = Highlight;
|
||||
stl_items[curitem].stl_start = p;
|
||||
stl_items[curitem].stl_minwid = -syn_namen2id(t, (int)(s - t));
|
||||
curitem++;
|
||||
}
|
||||
if (*s != NUL)
|
||||
@ -4638,8 +4691,8 @@ build_stl_str_hl(
|
||||
continue;
|
||||
}
|
||||
|
||||
item[curitem].start = p;
|
||||
item[curitem].type = Normal;
|
||||
stl_items[curitem].stl_start = p;
|
||||
stl_items[curitem].stl_type = Normal;
|
||||
if (str != NULL && *str)
|
||||
{
|
||||
t = str;
|
||||
@ -4738,7 +4791,7 @@ build_stl_str_hl(
|
||||
p += STRLEN(p);
|
||||
}
|
||||
else
|
||||
item[curitem].type = Empty;
|
||||
stl_items[curitem].stl_type = Empty;
|
||||
|
||||
if (opt == STL_VIM_EXPR)
|
||||
vim_free(str);
|
||||
@ -4765,16 +4818,16 @@ build_stl_str_hl(
|
||||
else
|
||||
{
|
||||
for ( ; l < itemcnt; l++)
|
||||
if (item[l].type == Trunc)
|
||||
if (stl_items[l].stl_type == Trunc)
|
||||
{
|
||||
// Truncate at %< item.
|
||||
s = item[l].start;
|
||||
s = stl_items[l].stl_start;
|
||||
break;
|
||||
}
|
||||
if (l == itemcnt)
|
||||
{
|
||||
// No %< item, truncate first item.
|
||||
s = item[0].start;
|
||||
s = stl_items[0].stl_start;
|
||||
l = 0;
|
||||
}
|
||||
}
|
||||
@ -4800,7 +4853,7 @@ build_stl_str_hl(
|
||||
else
|
||||
s = out + maxwidth - 1;
|
||||
for (l = 0; l < itemcnt; l++)
|
||||
if (item[l].start > s)
|
||||
if (stl_items[l].stl_start > s)
|
||||
break;
|
||||
itemcnt = l;
|
||||
*s++ = '>';
|
||||
@ -4834,10 +4887,10 @@ build_stl_str_hl(
|
||||
--n; // count the '<'
|
||||
for (; l < itemcnt; l++)
|
||||
{
|
||||
if (item[l].start - n >= s)
|
||||
item[l].start -= n;
|
||||
if (stl_items[l].stl_start - n >= s)
|
||||
stl_items[l].stl_start -= n;
|
||||
else
|
||||
item[l].start = s;
|
||||
stl_items[l].stl_start = s;
|
||||
}
|
||||
}
|
||||
width = maxwidth;
|
||||
@ -4846,16 +4899,16 @@ build_stl_str_hl(
|
||||
{
|
||||
// Apply STL_MIDDLE if any
|
||||
for (l = 0; l < itemcnt; l++)
|
||||
if (item[l].type == Middle)
|
||||
if (stl_items[l].stl_type == Middle)
|
||||
break;
|
||||
if (l < itemcnt)
|
||||
{
|
||||
p = item[l].start + maxwidth - width;
|
||||
STRMOVE(p, item[l].start);
|
||||
for (s = item[l].start; s < p; s++)
|
||||
p = stl_items[l].stl_start + maxwidth - width;
|
||||
STRMOVE(p, stl_items[l].stl_start);
|
||||
for (s = stl_items[l].stl_start; s < p; s++)
|
||||
*s = fillchar;
|
||||
for (l++; l < itemcnt; l++)
|
||||
item[l].start += maxwidth - width;
|
||||
stl_items[l].stl_start += maxwidth - width;
|
||||
width = maxwidth;
|
||||
}
|
||||
}
|
||||
@ -4863,13 +4916,14 @@ build_stl_str_hl(
|
||||
// Store the info about highlighting.
|
||||
if (hltab != NULL)
|
||||
{
|
||||
sp = hltab;
|
||||
*hltab = stl_hltab;
|
||||
sp = stl_hltab;
|
||||
for (l = 0; l < itemcnt; l++)
|
||||
{
|
||||
if (item[l].type == Highlight)
|
||||
if (stl_items[l].stl_type == Highlight)
|
||||
{
|
||||
sp->start = item[l].start;
|
||||
sp->userhl = item[l].minwid;
|
||||
sp->start = stl_items[l].stl_start;
|
||||
sp->userhl = stl_items[l].stl_minwid;
|
||||
sp++;
|
||||
}
|
||||
}
|
||||
@ -4880,13 +4934,14 @@ build_stl_str_hl(
|
||||
// Store the info about tab pages labels.
|
||||
if (tabtab != NULL)
|
||||
{
|
||||
sp = tabtab;
|
||||
*tabtab = stl_tabtab;
|
||||
sp = stl_tabtab;
|
||||
for (l = 0; l < itemcnt; l++)
|
||||
{
|
||||
if (item[l].type == TabPage)
|
||||
if (stl_items[l].stl_type == TabPage)
|
||||
{
|
||||
sp->start = item[l].start;
|
||||
sp->userhl = item[l].minwid;
|
||||
sp->start = stl_items[l].stl_start;
|
||||
sp->userhl = stl_items[l].stl_minwid;
|
||||
sp++;
|
||||
}
|
||||
}
|
||||
@ -5068,7 +5123,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
int r;
|
||||
int count; // Maximum number of windows to open.
|
||||
int all; // When TRUE also load inactive buffers.
|
||||
int had_tab = cmdmod.tab;
|
||||
int had_tab = cmdmod.cmod_tab;
|
||||
tabpage_T *tpnext;
|
||||
|
||||
if (eap->addr_count == 0) // make as many windows as possible
|
||||
@ -5099,7 +5154,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
{
|
||||
wpnext = wp->w_next;
|
||||
if ((wp->w_buffer->b_nwindows > 1
|
||||
|| ((cmdmod.split & WSP_VERT)
|
||||
|| ((cmdmod.cmod_split & WSP_VERT)
|
||||
? wp->w_height + wp->w_status_height < Rows - p_ch
|
||||
- tabline_height()
|
||||
: wp->w_width != Columns)
|
||||
@ -5220,7 +5275,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
#endif
|
||||
// When ":tab" was used open a new tab for a new window repeatedly.
|
||||
if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
|
||||
cmdmod.tab = 9999;
|
||||
cmdmod.cmod_tab = 9999;
|
||||
}
|
||||
--autocmd_no_enter;
|
||||
win_enter(firstwin, FALSE); // back to first window
|
||||
@ -5515,8 +5570,8 @@ bt_nofile(buf_T *buf)
|
||||
bt_dontwrite(buf_T *buf)
|
||||
{
|
||||
return buf != NULL && (buf->b_p_bt[0] == 'n'
|
||||
|| buf->b_p_bt[0] == 't'
|
||||
|| buf->b_p_bt[0] == 'p');
|
||||
|| buf->b_p_bt[0] == 't'
|
||||
|| buf->b_p_bt[0] == 'p');
|
||||
}
|
||||
|
||||
#if defined(FEAT_QUICKFIX) || defined(PROTO)
|
||||
@ -5547,7 +5602,7 @@ buf_hide(buf_T *buf)
|
||||
case 'd': return FALSE; // "delete"
|
||||
case 'h': return TRUE; // "hide"
|
||||
}
|
||||
return (p_hid || cmdmod.hide);
|
||||
return (p_hid || (cmdmod.cmod_flags & CMOD_HIDE));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -5593,10 +5648,21 @@ buf_spname(buf_T *buf)
|
||||
}
|
||||
|
||||
if (buf->b_fname == NULL)
|
||||
return (char_u *)_("[No Name]");
|
||||
return buf_get_fname(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get "buf->b_fname", use "[No Name]" if it is NULL.
|
||||
*/
|
||||
char_u *
|
||||
buf_get_fname(buf_T *buf)
|
||||
{
|
||||
if (buf->b_fname == NULL)
|
||||
return (char_u *)_("[No Name]");
|
||||
return buf->b_fname;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user