mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
Local fixes: - Fix usage of `replace_termcodes` which added an additional parameter upstream.
This commit is contained in:
@@ -13,7 +13,6 @@ freebsd_task:
|
||||
image_family: freebsd-12-4
|
||||
timeout_in: 20m
|
||||
install_script:
|
||||
- pkg update -f
|
||||
- pkg install -y gettext
|
||||
build_script:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
service_name: github-actions
|
||||
@@ -18,6 +18,7 @@ runtime/autoload/netrwFileHandlers.vim @cecamp
|
||||
runtime/autoload/netrwSettings.vim @cecamp
|
||||
runtime/autoload/php.vim @david-szabo97
|
||||
runtime/autoload/rubycomplete.vim @segfault @dkearns
|
||||
runtime/autoload/rust.vim @lilyball
|
||||
runtime/autoload/tar.vim @cecamp
|
||||
runtime/autoload/vimball.vim @cecamp
|
||||
runtime/autoload/xmlformat.vim @chrisbra
|
||||
@@ -150,7 +151,9 @@ runtime/ftplugin/go.vim @dbarnett
|
||||
runtime/ftplugin/gprof.vim @dpelle
|
||||
runtime/ftplugin/haml.vim @tpope
|
||||
runtime/ftplugin/hare.vim @rsaihe
|
||||
runtime/ftplugin/heex.vim @cvincent
|
||||
runtime/ftplugin/hgcommit.vim @k-takata
|
||||
runtime/ftplugin/hog.vim @wtfbbqhax
|
||||
runtime/ftplugin/html.vim @dkearns
|
||||
runtime/ftplugin/i3config.vim @hiqua
|
||||
runtime/ftplugin/icon.vim @dkearns
|
||||
@@ -180,13 +183,16 @@ runtime/ftplugin/pascal.vim @dkearns
|
||||
runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
runtime/ftplugin/perl.vim @petdance @dkearns
|
||||
runtime/ftplugin/php.vim @dkearns
|
||||
runtime/ftplugin/pod.vim @petdance @dkearns
|
||||
runtime/ftplugin/poefilter.vim @ObserverOfTime
|
||||
runtime/ftplugin/postscr.vim @mrdubya
|
||||
runtime/ftplugin/ps1.vim @heaths
|
||||
runtime/ftplugin/ps1xml.vim @heaths
|
||||
runtime/ftplugin/pymanifest.vim @ObserverOfTime
|
||||
runtime/ftplugin/python.vim @tpict
|
||||
runtime/ftplugin/qb64.vim @dkearns
|
||||
runtime/ftplugin/qml.vim @ChaseKnowlden
|
||||
runtime/ftplugin/r.vim @jalvesaq
|
||||
runtime/ftplugin/racket.vim @benknoble
|
||||
runtime/ftplugin/readline.vim @dkearns
|
||||
@@ -197,10 +203,12 @@ runtime/ftplugin/routeros.vim @zainin
|
||||
runtime/ftplugin/rrst.vim @jalvesaq
|
||||
runtime/ftplugin/rst.vim @marshallward
|
||||
runtime/ftplugin/ruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/rust.vim @lilyball
|
||||
runtime/ftplugin/sass.vim @tpope
|
||||
runtime/ftplugin/scala.vim @derekwyatt
|
||||
runtime/ftplugin/scss.vim @tpope
|
||||
runtime/ftplugin/sdoc.vim @gpanders
|
||||
runtime/ftplugin/sed.vim @dkearns
|
||||
runtime/ftplugin/sh.vim @dkearns
|
||||
runtime/ftplugin/solution.vim @dkearns
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
@@ -215,6 +223,7 @@ runtime/ftplugin/toml.vim @averms
|
||||
runtime/ftplugin/tt2html.vim @petdance
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
runtime/ftplugin/typescriptreact.vim @dkearns
|
||||
runtime/ftplugin/unison.vim @chuwy
|
||||
runtime/ftplugin/vdf.vim @ObserverOfTime
|
||||
runtime/ftplugin/wast.vim @rhysd
|
||||
runtime/ftplugin/wget.vim @dkearns
|
||||
@@ -251,6 +260,7 @@ runtime/indent/go.vim @dbarnett
|
||||
runtime/indent/gyp.vim @ObserverOfTime
|
||||
runtime/indent/haml.vim @tpope
|
||||
runtime/indent/hare.vim @rsaihe
|
||||
runtime/indent/hog.vim @wtfbbqhax
|
||||
runtime/indent/idlang.vim @dkearns
|
||||
runtime/indent/j.vim @glts
|
||||
runtime/indent/java.vim @xuhdev
|
||||
@@ -258,6 +268,7 @@ runtime/indent/javascript.vim @bounceme
|
||||
runtime/indent/json.vim @elzr
|
||||
runtime/indent/jsonc.vim @izhakjakov
|
||||
runtime/indent/julia.vim @carlobaldassi
|
||||
runtime/indent/krl.vim @KnoP-01
|
||||
runtime/indent/ld.vim @dkearns
|
||||
runtime/indent/less.vim @genoma
|
||||
runtime/indent/liquid.vim @tpope
|
||||
@@ -274,8 +285,10 @@ runtime/indent/postscr.vim @mrdubya
|
||||
runtime/indent/prolog.vim @dkearns
|
||||
runtime/indent/ps1.vim @heaths
|
||||
runtime/indent/qb64.vim @dkearns
|
||||
runtime/indent/qml.vim @ChaseKnowlden
|
||||
runtime/indent/r.vim @jalvesaq
|
||||
runtime/indent/racket.vim @benknoble
|
||||
runtime/indent/rapid.vim @KnoP-01
|
||||
runtime/indent/readline.vim @dkearns
|
||||
runtime/indent/rhelp.vim @jalvesaq
|
||||
runtime/indent/rmd.vim @jalvesaq
|
||||
@@ -377,6 +390,7 @@ runtime/syntax/hare.vim @rsaihe
|
||||
runtime/syntax/haskell.vim @coot
|
||||
runtime/syntax/hgcommit.vim @k-takata
|
||||
runtime/syntax/hitest.vim @lacygoill
|
||||
runtime/syntax/hog.vim @wtfbbqhax
|
||||
runtime/syntax/hollywood.vim @sodero
|
||||
runtime/syntax/html.vim @dkearns
|
||||
runtime/syntax/i3config.vim @hiqua
|
||||
@@ -389,6 +403,7 @@ runtime/syntax/javascript.vim @fleiner
|
||||
runtime/syntax/jsonc.vim @izhakjakov
|
||||
runtime/syntax/julia.vim @carlobaldassi
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
runtime/syntax/krl.vim @KnoP-01
|
||||
runtime/syntax/less.vim @genoma
|
||||
runtime/syntax/lex.vim @cecamp
|
||||
runtime/syntax/liquid.vim @tpope
|
||||
@@ -428,10 +443,13 @@ runtime/syntax/prolog.vim @XVilka
|
||||
runtime/syntax/ps1.vim @heaths
|
||||
runtime/syntax/ps1xml.vim @heaths
|
||||
runtime/syntax/psl.vim @danielkho
|
||||
runtime/syntax/pymanifest.vim @ObserverOfTime
|
||||
runtime/syntax/qb64.vim @dkearns
|
||||
runtime/syntax/qml.vim @ChaseKnowlden
|
||||
runtime/syntax/r.vim @jalvesaq
|
||||
runtime/syntax/racket.vim @benknoble
|
||||
runtime/syntax/raml.vim @in3d
|
||||
runtime/syntax/rapid.vim @KnoP-01
|
||||
runtime/syntax/ratpoison.vim @trapd00r
|
||||
runtime/syntax/rc.vim @chrisbra
|
||||
runtime/syntax/rcs.vim @hdima
|
||||
@@ -477,6 +495,7 @@ runtime/syntax/tt2js.vim @petdance
|
||||
runtime/syntax/typescript.vim @HerringtonDarkholme
|
||||
runtime/syntax/typescriptcommon.vim @HerringtonDarkholme
|
||||
runtime/syntax/typescriptreact.vim @HerringtonDarkholme
|
||||
runtime/syntax/unison.vim @chuwy
|
||||
runtime/syntax/vdf.vim @ObserverOfTime
|
||||
runtime/syntax/vim.vim @cecamp
|
||||
runtime/syntax/vroom.vim @dbarnett
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# list of labels and minimatch globs to match to apply the label.
|
||||
|
||||
CI:
|
||||
- any: ['.cirrus.yml']
|
||||
- any: ['.github/dependabot.yml']
|
||||
- any: ['.github/labeler.yml']
|
||||
- any: ['.github/workflows/*']
|
||||
- any: ['.appveyor.yml']
|
||||
- any: ['.codecov.yml']
|
||||
|
||||
translation:
|
||||
- any: ['src/po/*.po']
|
||||
|
||||
if_lua:
|
||||
- any: ['src/if_lua.c']
|
||||
- any: ['src/proto/if_lua.pro']
|
||||
- any: ['runtime/doc/if_lua.txt']
|
||||
|
||||
if_mzscheme:
|
||||
- any: ['src/if_mzsch.c']
|
||||
- any: ['src/if_mzsch.h']
|
||||
- any: ['src/proto/if_mzsch.pro']
|
||||
- any: ['runtime/doc/if_mzsch.txt']
|
||||
|
||||
if_perl:
|
||||
- any: ['src/if_perl.xs']
|
||||
- any: ['src/if_perlsfio.c']
|
||||
- any: ['src/proto/if_perl.pro']
|
||||
- any: ['src/proto/if_perlsfio.pro']
|
||||
- any: ['runtime/doc/if_perl.txt']
|
||||
|
||||
if_python:
|
||||
- any: ['src/if_py_both.h']
|
||||
- any: ['runtime/doc/if_pyth.txt']
|
||||
- any: ['src/if_python.c']
|
||||
- any: ['src/if_python3.c']
|
||||
- any: ['src/proto/if_python.pro']
|
||||
- any: ['src/proto/if_python3.pro']
|
||||
|
||||
if_ruby:
|
||||
- any: ['src/if_ruby.c']
|
||||
- any: ['src/proto/if_ruby.pro']
|
||||
- any: ['runtime/doc/if_ruby.txt']
|
||||
|
||||
if_tcl:
|
||||
- any: ['src/if_tcl.c']
|
||||
- any: ['src/proto/if_tcl.pro']
|
||||
- any: ['runtime/doc/if_tcl.txt']
|
||||
|
||||
runtime:
|
||||
- any: ['runtime/ftplugin']
|
||||
- any: ['runtime/syntax']
|
||||
- any: ['runtime/indent']
|
||||
- any: ['runtime/pack/dist/opt/termdebug/plugin/termdebug.vim']
|
||||
|
||||
termdebug: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
|
||||
|
||||
netrw:
|
||||
- any: ['runtime/plugin/netrwPlugin.vim']
|
||||
- any: ['runtime/autoload/netrw*']
|
||||
@@ -0,0 +1,24 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||
# file with configuration. For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/labeler.yml
|
||||
sync-labels: ''
|
||||
@@ -21,8 +21,8 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
|
||||
maintainer will do with your changes and under what license they
|
||||
will be distributed is negotiable. If there has been no negotiation
|
||||
then this license, or a later version, also applies to your changes.
|
||||
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
|
||||
changes it will be announced in appropriate places (most likely
|
||||
The current maintainers are listed here: https://github.com/orgs/vim/people.
|
||||
If this changes it will be announced in appropriate places (most likely
|
||||
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
|
||||
impossible to contact the maintainer, the obligation to send him
|
||||
your changes ceases. Once the maintainer has confirmed that he has
|
||||
|
||||
+6
-4
@@ -122,12 +122,14 @@ If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
https://www.vim.org/maillist.php
|
||||
|
||||
If nothing else works, report bugs directly:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
If nothing else works, report bugs directly to the vim-dev mailing list:
|
||||
<vim-dev@vim.org>
|
||||
|
||||
|
||||
MAIN AUTHOR
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
Most of Vim was created by Bram Moolenaar <Bram@vim.org> |Bram-Moolenaar|
|
||||
|
||||
Bram Moolenaar E-mail: Bram@vim.org
|
||||
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
|
||||
|
||||
<vim-dev@vim.org>
|
||||
|
||||
+39
-40
@@ -1,17 +1,21 @@
|
||||
[](https://www.vim.org)
|
||||
# [](https://www.vim.org)
|
||||
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22)
|
||||
[](https://ci.appveyor.com/project/chrisbra/vim)
|
||||
[](https://cirrus-ci.com/github/vim/vim)
|
||||
[](https://codecov.io/gh/vim/vim?branch=master)
|
||||
[](https://scan.coverity.com/projects/vim)
|
||||
[](https://buildd.debian.org/vim)
|
||||
[](https://repology.org/metapackage/vim)
|
||||
[](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
|
||||
If you find a bug or want to discuss the best way to add a new feature, please
|
||||
open an [issue](https://github.com/vim/vim/issues).
|
||||
[open an issue](https://github.com/vim/vim/issues/new/choose).
|
||||
If you have a question or want to discuss the best way to do something with
|
||||
Vim, you can use [StackExchange](https://vi.stackexchange.com/)
|
||||
or one of the [Maillists](https://www.vim.org/community.php).
|
||||
|
||||
|
||||
## What is Vim? ##
|
||||
## What is Vim?
|
||||
|
||||
Vim is a greatly improved version of the good old UNIX editor
|
||||
[Vi](https://en.wikipedia.org/wiki/Vi). Many new
|
||||
@@ -35,7 +39,7 @@ Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained.
|
||||
|
||||
For Vim9 script see [README_VIM9](README_VIM9.md).
|
||||
|
||||
## Distribution ##
|
||||
## Distribution
|
||||
|
||||
You can often use your favorite package manager to install Vim. On Mac and
|
||||
Linux a small version of Vim is pre-installed, you still need to install Vim
|
||||
@@ -55,48 +59,45 @@ Some popular places to get the latest Vim:
|
||||
* Get a Windows executable from the
|
||||
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
|
||||
|
||||
|
||||
|
||||
## Compiling ##
|
||||
## Compiling
|
||||
|
||||
If you obtained a binary distribution you don't need to compile Vim. If you
|
||||
obtained a source distribution, all the stuff for compiling Vim is in the
|
||||
[`src`](/src) directory. See [`src/INSTALL`](src/INSTALL) for instructions.
|
||||
[`src`](./src/) directory. See [`src/INSTALL`](./src/INSTALL) for instructions.
|
||||
|
||||
|
||||
## Installation ##
|
||||
## Installation
|
||||
|
||||
See one of these files for system-specific instructions. Either in the
|
||||
[READMEdir directory](./READMEdir/) (in the repository) or
|
||||
the top directory (if you unpack an archive):
|
||||
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
README_dos.txt MS-DOS and MS-Windows
|
||||
README_mac.txt Macintosh
|
||||
README_haiku.txt Haiku
|
||||
README_vms.txt VMS
|
||||
```
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
README_dos.txt MS-DOS and MS-Windows
|
||||
README_mac.txt Macintosh
|
||||
README_haiku.txt Haiku
|
||||
README_vms.txt VMS
|
||||
```
|
||||
|
||||
There are other `README_*.txt` files, depending on the distribution you used.
|
||||
|
||||
|
||||
## Documentation ##
|
||||
## Documentation
|
||||
|
||||
The Vim tutor is a one hour training course for beginners. Often it can be
|
||||
started as `vimtutor`. See `:help tutor` for more information.
|
||||
|
||||
The best is to use `:help` in Vim. If you don't have an executable yet, read
|
||||
[`runtime/doc/help.txt`](/runtime/doc/help.txt).
|
||||
[`runtime/doc/help.txt`](./runtime/doc/help.txt).
|
||||
It contains pointers to the other documentation files.
|
||||
The User Manual reads like a book and is recommended to learn to use
|
||||
Vim. See `:help user-manual`.
|
||||
|
||||
|
||||
## Copying ##
|
||||
## Copying
|
||||
|
||||
Vim is Charityware. You can use and copy it as much as you like, but you are
|
||||
encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
[`runtime/doc/uganda.txt`](runtime/doc/uganda.txt)
|
||||
[`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt)
|
||||
for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
@@ -105,28 +106,25 @@ text must always be included. For modified versions, a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
|
||||
## Sponsoring ##
|
||||
## Sponsoring
|
||||
|
||||
Fixing bugs and adding new features takes a lot of time and effort. To show
|
||||
your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
Since Bram is back to a paid job the money will now be used to help children
|
||||
in Uganda. See [`runtime/doc/uganda.txt`](runtime/doc/uganda.txt). But
|
||||
in Uganda. See [`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But
|
||||
at the same time donations increase Bram's motivation to keep working on Vim!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
https://www.vim.org/sponsor/
|
||||
|
||||
|
||||
## Contributing ##
|
||||
## Contributing
|
||||
|
||||
If you would like to help make Vim better, see the
|
||||
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
|
||||
[CONTRIBUTING.md](./CONTRIBUTING.md) file.
|
||||
|
||||
|
||||
## Information ##
|
||||
## Information
|
||||
|
||||
If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/).
|
||||
|
||||
@@ -141,14 +139,15 @@ If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
https://www.vim.org/maillist.php
|
||||
|
||||
If nothing else works, report bugs directly:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
If nothing else works, report bugs directly to the vim-dev mailing list:
|
||||
`<vim-dev@vim.org>`
|
||||
|
||||
## Main author
|
||||
|
||||
## Main author ##
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
Most of Vim was created by Bram Moolenaar `<Bram@vim.org>`
|
||||
[Bram-Moolenaar](https://vimhelp.org/version9.txt.html#Bram-Moolenaar)
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
|
||||
`<vim-dev@vim.org>`
|
||||
|
||||
This is `README.md` for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
If you want to report a security issue, please use [huntr.dev](https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim) to privately disclose the issue to us.
|
||||
They also have rewards in the form of money, swag and CVEs.
|
||||
|
||||
**Please don't publicly disclose the issue until it has been addressed by us.**
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
|
||||
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
vim9script noclear
|
||||
|
||||
# Vim completion script
|
||||
# Language: C
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Language: C
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Rewritten in Vim9 script by github user lacygoill
|
||||
# Last Change: 2022 Jan 31
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
var prepended: string
|
||||
var grepCache: dict<list<dict<any>>>
|
||||
|
||||
Vendored
+37
-13
@@ -2,8 +2,9 @@ vim9script
|
||||
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2023 Jun 09
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
# faster.
|
||||
@@ -286,6 +287,37 @@ export def FTe()
|
||||
endif
|
||||
enddef
|
||||
|
||||
def IsForth(): bool
|
||||
var first_line = nextnonblank(1)
|
||||
|
||||
# SwiftForth block comment (line is usually filled with '-' or '=') or
|
||||
# OPTIONAL (sometimes precedes the header comment)
|
||||
if getline(first_line) =~? '^\%({\%(\s\|$\)\|OPTIONAL\s\)'
|
||||
return true
|
||||
endif
|
||||
|
||||
var n = first_line
|
||||
while n < 100 && n <= line("$")
|
||||
# Forth comments and colon definitions
|
||||
if getline(n) =~ '^[:(\\] '
|
||||
return true
|
||||
endif
|
||||
n += 1
|
||||
endwhile
|
||||
return false
|
||||
enddef
|
||||
|
||||
# Distinguish between Forth and Fortran
|
||||
export def FTf()
|
||||
if exists("g:filetype_f")
|
||||
exe "setf " .. g:filetype_f
|
||||
elseif IsForth()
|
||||
setf forth
|
||||
else
|
||||
setf fortran
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTfrm()
|
||||
if exists("g:filetype_frm")
|
||||
exe "setf " .. g:filetype_frm
|
||||
@@ -301,21 +333,13 @@ export def FTfrm()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Distinguish between Forth and F#.
|
||||
# Provided by Doug Kearns.
|
||||
# Distinguish between Forth and F#
|
||||
export def FTfs()
|
||||
if exists("g:filetype_fs")
|
||||
exe "setf " .. g:filetype_fs
|
||||
elseif IsForth()
|
||||
setf forth
|
||||
else
|
||||
var n = 1
|
||||
while n < 100 && n <= line("$")
|
||||
# Forth comments and colon definitions
|
||||
if getline(n) =~ "^[:(\\\\] "
|
||||
setf forth
|
||||
return
|
||||
endif
|
||||
n += 1
|
||||
endwhile
|
||||
setf fsharp
|
||||
endif
|
||||
enddef
|
||||
|
||||
Vendored
+66
-24
@@ -1,9 +1,9 @@
|
||||
" Vim filetype plugin autoload file
|
||||
" Language: man
|
||||
" Maintainer: Jason Franklin <vim@justemail.net>
|
||||
" Maintainer: Jason Franklin <jason@oneway.dev>
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Autoload Split: Bram Moolenaar
|
||||
" Last Change: 2022 Jun 18
|
||||
" Last Change: 2023 Jun 28
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
@@ -21,31 +21,65 @@ catch /E145:/
|
||||
" Ignore the error in restricted mode
|
||||
endtry
|
||||
|
||||
func s:ParseIntoPageAndSection()
|
||||
" Accommodate a reference that terminates in a hyphen.
|
||||
"
|
||||
" See init_charset_table() at
|
||||
" https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/input.cpp?h=1.22.4#n6794
|
||||
"
|
||||
" See can_break_after() at
|
||||
" https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/charinfo.h?h=1.22.4#n140
|
||||
"
|
||||
" Assumptions and limitations:
|
||||
" 1) Manual-page references (in consequence of command-related filenames)
|
||||
" do not contain non-ASCII HYPHENs (0x2010), any terminating HYPHEN
|
||||
" must have been introduced to mark division of a word at the end of
|
||||
" a line and can be discarded; whereas similar references may contain
|
||||
" ASCII HYPHEN-MINUSes (0x002d) and any terminating HYPHEN-MINUS forms
|
||||
" a compound word in addition to marking word division.
|
||||
" 2) Well-formed manual-page references always have a section suffix, e.g.
|
||||
" "git-commit(1)", therefore suspended hyphenated compounds are not
|
||||
" determined, e.g. [V] (With cursor at _git-merge-_ below...)
|
||||
" ".................... git-merge- and git-merge-base. (See git-cherry-
|
||||
" pick(1) and git-cherry(1).)" (... look up "git-merge-pick(1)".)
|
||||
"
|
||||
" Note that EM DASH (0x2014), a third stooge from init_charset_table(),
|
||||
" neither connects nor divides parts of a word.
|
||||
let str = expand("<cWORD>")
|
||||
|
||||
if str =~ '\%u2010$' " HYPHEN (-1).
|
||||
let str = strpart(str, 0, strridx(str, "\u2010"))
|
||||
|
||||
" Append the leftmost WORD (or an empty string) from the line below.
|
||||
let str .= get(split(get(getbufline(bufnr('%'), line('.') + 1), 0, '')), 0, '')
|
||||
elseif str =~ '-$' " HYPHEN-MINUS.
|
||||
" Append the leftmost WORD (or an empty string) from the line below.
|
||||
let str .= get(split(get(getbufline(bufnr('%'), line('.') + 1), 0, '')), 0, '')
|
||||
endif
|
||||
|
||||
" According to man(1), section name formats vary (MANSECT):
|
||||
" 1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7
|
||||
let parts = matchlist(str, '\(\k\+\)(\(\k\+\))')
|
||||
return (len(parts) > 2)
|
||||
\ ? {'page': parts[1], 'section': parts[2]}
|
||||
\ : {'page': matchstr(str, '\k\+'), 'section': ''}
|
||||
endfunc
|
||||
|
||||
func dist#man#PreGetPage(cnt)
|
||||
if a:cnt == 0
|
||||
let old_isk = &iskeyword
|
||||
if &ft == 'man'
|
||||
setl iskeyword+=(,)
|
||||
endif
|
||||
let str = expand("<cword>")
|
||||
let &l:iskeyword = old_isk
|
||||
let page = substitute(str, '(*\(\k\+\).*', '\1', '')
|
||||
let sect = substitute(str, '\(\k\+\)(\([^()]*\)).*', '\2', '')
|
||||
if match(sect, '^[0-9 ]\+$') == -1
|
||||
let sect = ""
|
||||
endif
|
||||
if sect == page
|
||||
let sect = ""
|
||||
endif
|
||||
let what = s:ParseIntoPageAndSection()
|
||||
let sect = what.section
|
||||
let page = what.page
|
||||
else
|
||||
let what = s:ParseIntoPageAndSection()
|
||||
let sect = a:cnt
|
||||
let page = expand("<cword>")
|
||||
let page = what.page
|
||||
endif
|
||||
|
||||
call dist#man#GetPage('', sect, page)
|
||||
endfunc
|
||||
|
||||
func s:GetCmdArg(sect, page)
|
||||
|
||||
if empty(a:sect)
|
||||
return shellescape(a:page)
|
||||
endif
|
||||
@@ -75,9 +109,11 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
return
|
||||
endif
|
||||
|
||||
" To support: nmap K :Man <cword>
|
||||
if page == '<cword>'
|
||||
let page = expand('<cword>')
|
||||
" To support: nmap K :Man <cWORD><CR>
|
||||
if page ==? '<cword>'
|
||||
let what = s:ParseIntoPageAndSection()
|
||||
let sect = what.section
|
||||
let page = what.page
|
||||
endif
|
||||
|
||||
if !exists('g:ft_man_no_sect_fallback') || (g:ft_man_no_sect_fallback == 0)
|
||||
@@ -154,9 +190,14 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
endif
|
||||
let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
|
||||
let env_cmd .= ' GROFF_NO_SGR=1'
|
||||
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
|
||||
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page)
|
||||
|
||||
silent exec "r !" . man_cmd
|
||||
|
||||
" Emulate piping the buffer through the "col -b" command.
|
||||
" Ref: https://github.com/vim/vim/issues/12301
|
||||
silent! keepjumps keeppatterns %s/\v(.)\b\ze\1?//ge
|
||||
|
||||
if unsetwidth
|
||||
let $MANWIDTH = ''
|
||||
endif
|
||||
@@ -180,9 +221,10 @@ func dist#man#PopPage()
|
||||
exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
|
||||
exec "let s:man_tag_lin=s:man_tag_lin_".s:man_tag_depth
|
||||
exec "let s:man_tag_col=s:man_tag_col_".s:man_tag_depth
|
||||
|
||||
exec s:man_tag_buf."b"
|
||||
exec s:man_tag_lin
|
||||
exec "norm! ".s:man_tag_col."|"
|
||||
call cursor(s:man_tag_lin, s:man_tag_col)
|
||||
|
||||
exec "unlet s:man_tag_buf_".s:man_tag_depth
|
||||
exec "unlet s:man_tag_lin_".s:man_tag_depth
|
||||
exec "unlet s:man_tag_col_".s:man_tag_depth
|
||||
|
||||
Vendored
+3
-2
@@ -3,8 +3,9 @@ vim9script
|
||||
# Vim function for detecting a filetype from the file contents.
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2023 Jun 09
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
export def DetectFiletype()
|
||||
var line1 = getline(1)
|
||||
|
||||
Vendored
+8
-12
@@ -2,7 +2,7 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2023 Feb 01
|
||||
# Last Change: 2023 Jun 29
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
@@ -112,10 +112,6 @@ const DICT_KEY: string = '^\s*\%('
|
||||
.. '\)'
|
||||
.. ':\%(\s\|$\)'
|
||||
|
||||
# NOT_A_DICT_KEY {{{3
|
||||
|
||||
const NOT_A_DICT_KEY: string = ':\@!'
|
||||
|
||||
# END_OF_COMMAND {{{3
|
||||
|
||||
const END_OF_COMMAND: string = $'\s*\%($\|||\@!\|{INLINE_COMMENT}\)'
|
||||
@@ -197,13 +193,13 @@ patterns =<< trim eval END
|
||||
ldo\=\>!\=
|
||||
tabdo\=\>
|
||||
windo\>
|
||||
au\%[tocmd]\>.*
|
||||
com\%[mand]\>.*
|
||||
au\%[tocmd]\>!\=.*
|
||||
com\%[mand]\>!\=.*
|
||||
g\%[lobal]!\={PATTERN_DELIMITER}.*
|
||||
v\%[global]!\={PATTERN_DELIMITER}.*
|
||||
END
|
||||
|
||||
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\){NOT_A_DICT_KEY}'
|
||||
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\)\%(\s\|$\)\@='
|
||||
|
||||
# START_MIDDLE_END {{{3
|
||||
|
||||
@@ -254,7 +250,7 @@ START_MIDDLE_END = START_MIDDLE_END
|
||||
kwds->map((_, kwd: string) => kwd == ''
|
||||
? ''
|
||||
: $'\%(^\|{BAR_SEPARATION}\|\<sil\%[ent]\|{HIGHER_ORDER_COMMAND}\)\s*'
|
||||
.. $'\<\%({kwd}\)\>\%(\s*{OPERATOR}\)\@!'))
|
||||
.. $'\<\%({kwd}\)\>\%(\s\|$\|!\)\@=\%(\s*{OPERATOR}\)\@!'))
|
||||
|
||||
lockvar! START_MIDDLE_END
|
||||
|
||||
@@ -279,7 +275,7 @@ patterns = BLOCKS
|
||||
|
||||
const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
|
||||
.. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
|
||||
.. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
|
||||
.. $'\|^\s*elseif\=\>\%(\s\|$\)\@=\%(\s*{OPERATOR}\)\@!'
|
||||
|
||||
# STARTS_NAMED_BLOCK {{{3
|
||||
|
||||
@@ -296,7 +292,7 @@ patterns = []
|
||||
endfor
|
||||
}
|
||||
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>{NOT_A_DICT_KEY}'
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
|
||||
|
||||
# STARTS_CURLY_BLOCK {{{3
|
||||
|
||||
@@ -312,7 +308,7 @@ const STARTS_CURLY_BLOCK: string = '\%('
|
||||
|
||||
# STARTS_FUNCTION {{{3
|
||||
|
||||
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>{NOT_A_DICT_KEY}'
|
||||
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>!\=\s\@='
|
||||
|
||||
# ENDS_FUNCTION {{{3
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Sep 28
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
|
||||
@@ -156,8 +156,8 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
\ 'text', 'vLink']
|
||||
let bodys = bodyprop
|
||||
" Document - document.
|
||||
let docuprop = ['anchors', 'body', 'characterSet', 'doctype',
|
||||
\ 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms',
|
||||
let docuprop = ['anchors', 'applets', 'body', 'characterSet', 'childNodes',
|
||||
\ 'doctype', 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms',
|
||||
\ 'head', 'hidden', 'images', 'implementation', 'lastStyleSheetSet',
|
||||
\ 'links', 'plugins', 'preferredStyleSheetSet', 'scripts',
|
||||
\ 'scrollingElement', 'selectedStyleSheetSet', 'styleSheetSets',
|
||||
@@ -171,7 +171,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
\ 'createEvent', 'createExpression', 'createNSResolver',
|
||||
\ 'createNodeIterator', 'createProcessingInstruction', 'createRange',
|
||||
\ 'createTextNode', 'createTouchList', 'createTreeWalker',
|
||||
\ 'enableStyleSheetsForSet', 'evaluate', 'focus', 'getElementById',
|
||||
\ 'enableStyleSheetsForSet', 'evaluate', 'focus',
|
||||
\ 'getElementById', 'getElementsByClassName', 'getElementsByName',
|
||||
\ 'getElementsByTagName', 'getElementsByTagNameNS',
|
||||
\ 'hasStorageAccess', 'importNode', 'onClick', 'onDblClick',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim support file to help with paste mappings and menus
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Jan 27
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Define the string to use for items that are present both in Edit, Popup and
|
||||
" Toolbar menu. Also used in mswin.vim and macmap.vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
" Author: Kevin Ballard
|
||||
" Author: Lily Ballard
|
||||
" Description: Helper functions for Rust commands/mappings
|
||||
" Last Modified: May 27, 2014
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jul 10
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
" Always use https:// because it's secure. The certificate is for nluug.nl,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
:" Use this script to create the file "bugreport.txt", which contains
|
||||
:" information about the environment of a possible bug in Vim.
|
||||
:"
|
||||
:" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
:" Last change: 2019 Jan 27
|
||||
:" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
:" Last change: 2023 Aug 10
|
||||
:" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
:"
|
||||
:" To use inside Vim:
|
||||
:" :so $VIMRUNTIME/bugreport.vim
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim color file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2001 Jul 23
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" This is the default color scheme. It doesn't define the Normal
|
||||
" highlighting, it uses whatever the colors used to be.
|
||||
|
||||
@@ -8,4 +8,4 @@ If you want to write your own compiler plugin, have a look at the other files
|
||||
for how to do it, the format is simple.
|
||||
|
||||
If you think a compiler plugin you have written is useful for others, please
|
||||
send it to Bram@vim.org.
|
||||
send it to the vim-dev mailing list: <vim-dev@vim.org>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Microsoft Visual C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Sep 20
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
|
||||
+15
-10
@@ -1,7 +1,8 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2023 May 10
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
" Except when Vim is run with "-u NONE" or "-C".
|
||||
@@ -97,17 +98,21 @@ if 1
|
||||
filetype plugin indent on
|
||||
|
||||
" Put these in an autocmd group, so that you can revert them with:
|
||||
" ":augroup vimStartup | exe 'au!' | augroup END"
|
||||
" ":autocmd! vimStartup"
|
||||
augroup vimStartup
|
||||
au!
|
||||
autocmd!
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid, when inside an event handler
|
||||
" (happens when dropping a file on gvim) and for a commit message (it's
|
||||
" likely a different one than last time).
|
||||
" (happens when dropping a file on gvim), for a commit or rebase message
|
||||
" (likely a different one than last time), and when using xxd(1) to filter
|
||||
" and edit binary files (it transforms input files back and forth, causing
|
||||
" them to have dual nature, so to speak)
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
||||
\ | exe "normal! g`\""
|
||||
\ let line = line("'\"")
|
||||
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
|
||||
\ && index(['xxd', 'gitrebase'], &filetype) == -1
|
||||
\ | execute "normal! g`\""
|
||||
\ | endif
|
||||
|
||||
augroup END
|
||||
@@ -115,11 +120,11 @@ if 1
|
||||
" Quite a few people accidentally type "q:" instead of ":q" and get confused
|
||||
" by the command line window. Give a hint about how to get out.
|
||||
" If you don't like this you can put this in your vimrc:
|
||||
" ":augroup vimHints | exe 'au!' | augroup END"
|
||||
" ":autocmd! vimHints"
|
||||
augroup vimHints
|
||||
au!
|
||||
autocmd CmdwinEnter *
|
||||
\ echohl Todo |
|
||||
\ echohl Todo |
|
||||
\ echo gettext('You discovered the command-line window! You can close it with ":q".') |
|
||||
\ echohl None
|
||||
augroup END
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
" This Vim script deletes all the menus, so that they can be redefined.
|
||||
" Warning: This also deletes all menus defined by the user!
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Dec 10
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
aunmenu *
|
||||
tlunmenu *
|
||||
|
||||
+137
-13
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Jun 08
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Aug 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -156,7 +156,7 @@ digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
|
||||
echoraw({expr}) none output {expr} as-is
|
||||
empty({expr}) Number |TRUE| if {expr} is empty
|
||||
environ() Dict return environment variables
|
||||
err_teapot() Number produce error 418
|
||||
err_teapot([{expr}]) none give E418, or E503 if {expr} is |TRUE|
|
||||
escape({string}, {chars}) String escape {chars} in {string} with '\'
|
||||
eval({string}) any evaluate {string} into its value
|
||||
eventhandler() Number |TRUE| if inside an event handler
|
||||
@@ -709,13 +709,14 @@ trunc({expr}) Float truncate Float {expr}
|
||||
type({expr}) Number type of value {expr}
|
||||
typename({expr}) String representation of the type of {expr}
|
||||
undofile({name}) String undo file name for {name}
|
||||
undotree() List undo file tree
|
||||
undotree([{buf}]) List undo file tree for buffer {buf}
|
||||
uniq({list} [, {func} [, {dict}]])
|
||||
List remove adjacent duplicates from a list
|
||||
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
|
||||
Number UTF-16 index of byte {idx} in {string}
|
||||
values({dict}) List values in {dict}
|
||||
virtcol({expr} [, {list}]) Number or List
|
||||
virtcol({expr} [, {list} [, {winid}])
|
||||
Number or List
|
||||
screen column of cursor or mark
|
||||
virtcol2col({winid}, {lnum}, {col})
|
||||
Number byte index of a character on screen
|
||||
@@ -1251,7 +1252,7 @@ bufload({buf}) *bufload()*
|
||||
refers to an existing file then the file is read. Otherwise
|
||||
the buffer will be empty. If the buffer was already loaded
|
||||
then there is no change. If the buffer is not related to a
|
||||
file the no file is read (e.g., when 'buftype' is "nofile").
|
||||
file then no file is read (e.g., when 'buftype' is "nofile").
|
||||
If there is an existing swap file for the file of the buffer,
|
||||
there will be no dialog, the buffer will be loaded anyway.
|
||||
The {buf} argument is used like with |bufexists()|.
|
||||
@@ -3552,6 +3553,8 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
cmdline |cmdline-completion| result
|
||||
compiler compilers
|
||||
cscope |:cscope| suboptions
|
||||
custom,{func} custom completion, defined via {func}
|
||||
customlist,{func} custom completion, defined via {func}
|
||||
diff_buffer |:diffget| and |:diffput| completion
|
||||
dir directory names
|
||||
environment environment variable names
|
||||
@@ -4004,6 +4007,9 @@ getqflist([{what}]) *getqflist()*
|
||||
text description of the error
|
||||
type type of the error, 'E', '1', etc.
|
||||
valid |TRUE|: recognized error message
|
||||
user_data
|
||||
custom data associated with the item, can be
|
||||
any type.
|
||||
|
||||
When there is no error list or it's empty, an empty list is
|
||||
returned. Quickfix list entries with a non-existing buffer
|
||||
@@ -6589,7 +6595,11 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
The "%" starts a conversion specification. The following
|
||||
arguments appear in sequence:
|
||||
|
||||
% [flags] [field-width] [.precision] type
|
||||
% [pos-argument] [flags] [field-width] [.precision] type
|
||||
|
||||
pos-argument
|
||||
At most one positional argument specifier. These
|
||||
take the form {n$}, where n is >= 1.
|
||||
|
||||
flags
|
||||
Zero or more of the following flags:
|
||||
@@ -6661,6 +6671,13 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
< This limits the length of the text used from "line" to
|
||||
"width" bytes.
|
||||
|
||||
If the argument to be formatted is specified using a posional
|
||||
argument specifier, and a '*' is used to indicate that a
|
||||
number argument is to be used to specify the width or
|
||||
precision, the argument(s) to be used must also be specified
|
||||
using a {n$} positional argument specifier. See |printf-$|.
|
||||
|
||||
|
||||
The conversion specifiers and their meanings are:
|
||||
|
||||
*printf-d* *printf-b* *printf-B* *printf-o*
|
||||
@@ -6750,6 +6767,103 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
of "%" items. If there are not sufficient or too many
|
||||
arguments an error is given. Up to 18 arguments can be used.
|
||||
|
||||
*printf-$*
|
||||
In certain languages, error and informative messages are
|
||||
more readable when the order of words is different from the
|
||||
corresponding message in English. To accomodate translations
|
||||
having a different word order, positional arguments may be
|
||||
used to indicate this. For instance: >
|
||||
|
||||
#, c-format
|
||||
msgid "%s returning %s"
|
||||
msgstr "waarde %2$s komt terug van %1$s"
|
||||
<
|
||||
In this example, the sentence has its 2 string arguments reversed
|
||||
in the output. >
|
||||
|
||||
echo printf(
|
||||
"In The Netherlands, vim's creator's name is: %1$s %2$s",
|
||||
"Bram", "Moolenaar")
|
||||
< In The Netherlands, vim's creator's name is: Bram Moolenaar >
|
||||
|
||||
echo printf(
|
||||
"In Belgium, vim's creator's name is: %2$s %1$s",
|
||||
"Bram", "Moolenaar")
|
||||
< In Belgium, vim's creator's name is: Moolenaar Bram
|
||||
|
||||
Width (and precision) can be specified using the '*' specifier.
|
||||
In this case, you must specify the field width position in the
|
||||
argument list. >
|
||||
|
||||
echo printf("%1$*2$.*3$d", 1, 2, 3)
|
||||
< 001 >
|
||||
echo printf("%2$*3$.*1$d", 1, 2, 3)
|
||||
< 2 >
|
||||
echo printf("%3$*1$.*2$d", 1, 2, 3)
|
||||
< 03 >
|
||||
echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
|
||||
< 1.414
|
||||
|
||||
You can mix specifying the width and/or precision directly
|
||||
and via positional arguments: >
|
||||
|
||||
echo printf("%1$4.*2$f", 1.4142135, 6)
|
||||
< 1.414214 >
|
||||
echo printf("%1$*2$.4f", 1.4142135, 6)
|
||||
< 1.4142 >
|
||||
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
|
||||
< 1.41
|
||||
|
||||
*E1400*
|
||||
You cannot mix positional and non-positional arguments: >
|
||||
echo printf("%s%1$s", "One", "Two")
|
||||
< E1400: Cannot mix positional and non-positional
|
||||
arguments: %s%1$s
|
||||
|
||||
*E1401*
|
||||
You cannot skip a positional argument in a format string: >
|
||||
echo printf("%3$s%1$s", "One", "Two", "Three")
|
||||
< E1401: format argument 2 unused in $-style
|
||||
format: %3$s%1$s
|
||||
|
||||
*E1402*
|
||||
You can re-use a [field-width] (or [precision]) argument: >
|
||||
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
|
||||
< 1 at width 2 is: 01
|
||||
|
||||
However, you can't use it as a different type: >
|
||||
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
|
||||
< E1402: Positional argument 2 used as field
|
||||
width reused as different type: long int/int
|
||||
|
||||
*E1403*
|
||||
When a positional argument is used, but not the correct number
|
||||
or arguments is given, an error is raised: >
|
||||
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
|
||||
< E1403: Positional argument 3 out of bounds:
|
||||
%1$d at width %2$d is: %01$*2$.*3$d
|
||||
|
||||
Only the first error is reported: >
|
||||
echo printf("%01$*2$.*3$d %4$d", 1, 2)
|
||||
< E1403: Positional argument 3 out of bounds:
|
||||
%01$*2$.*3$d %4$d
|
||||
|
||||
*E1404*
|
||||
A positional argument can be used more than once: >
|
||||
echo printf("%1$s %2$s %1$s", "One", "Two")
|
||||
< One Two One
|
||||
|
||||
However, you can't use a different type the second time: >
|
||||
echo printf("%1$s %2$s %1$d", "One", "Two")
|
||||
< E1404: Positional argument 1 type used
|
||||
inconsistently: int/string
|
||||
|
||||
*E1405*
|
||||
Various other errors that lead to a format string being
|
||||
wrongly formatted lead to: >
|
||||
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
|
||||
< E1405: Invalid format specifier:
|
||||
%1$d at width %2$d is: %01$*2$.3$d
|
||||
|
||||
prompt_getprompt({buf}) *prompt_getprompt()*
|
||||
Returns the effective prompt text for buffer {buf}. {buf} can
|
||||
@@ -8300,6 +8414,8 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
text description of the error
|
||||
type single-character error type, 'E', 'W', etc.
|
||||
valid recognized error message
|
||||
user_data custom data associated with the item, can be
|
||||
any type.
|
||||
|
||||
The "col", "vcol", "nr", "type" and "text" entries are
|
||||
optional. Either "lnum" or "pattern" entry can be used to
|
||||
@@ -10097,9 +10213,10 @@ undofile({name}) *undofile()*
|
||||
Can also be used as a |method|: >
|
||||
GetFilename()->undofile()
|
||||
|
||||
undotree() *undotree()*
|
||||
Return the current state of the undo tree in a dictionary with
|
||||
the following items:
|
||||
undotree([{buf}]) *undotree()*
|
||||
Return the current state of the undo tree for the current
|
||||
buffer, or for a specific buffer if {buf} is given. The
|
||||
result is a dictionary with the following items:
|
||||
"seq_last" The highest undo sequence number used.
|
||||
"seq_cur" The sequence number of the current position in
|
||||
the undo tree. This differs from "seq_last"
|
||||
@@ -10193,7 +10310,7 @@ values({dict}) *values()*
|
||||
Can also be used as a |method|: >
|
||||
mydict->values()
|
||||
|
||||
virtcol({expr} [, {list}]) *virtcol()*
|
||||
virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
|
||||
The result is a Number, which is the screen column of the file
|
||||
position given with {expr}. That is, the last screen position
|
||||
occupied by the character at that position, when the screen
|
||||
@@ -10225,10 +10342,13 @@ virtcol({expr} [, {list}]) *virtcol()*
|
||||
returns the cursor position. Differs from |'<| in
|
||||
that it's updated right away.
|
||||
|
||||
If {list} is present and non-zero then virtcol() returns a List
|
||||
with the first and last screen position occupied by the
|
||||
If {list} is present and non-zero then virtcol() returns a
|
||||
List with the first and last screen position occupied by the
|
||||
character.
|
||||
|
||||
With the optional {winid} argument the values are obtained for
|
||||
that window instead of the current window.
|
||||
|
||||
Note that only marks in the current file can be used.
|
||||
Examples: >
|
||||
" With text "foo^Lbar" and cursor on the "^L":
|
||||
@@ -10240,7 +10360,7 @@ virtcol({expr} [, {list}]) *virtcol()*
|
||||
" With text " there", with 't at 'h':
|
||||
|
||||
virtcol("'t") " returns 6
|
||||
< The first column is 1. 0 is returned for an error.
|
||||
< The first column is 1. 0 or [0, 0] is returned for an error.
|
||||
A more advanced example that echoes the maximum length of
|
||||
all lines: >
|
||||
echo max(map(range(1, line('$')), "virtcol([v:val, '$'])"))
|
||||
@@ -10257,6 +10377,9 @@ virtcol2col({winid}, {lnum}, {col}) *virtcol2col()*
|
||||
{lnum}, then the byte index of the character at the last
|
||||
virtual column is returned.
|
||||
|
||||
For a multi-byte character, the column number of the first
|
||||
byte in the character is returned.
|
||||
|
||||
The {winid} argument can be the window number or the
|
||||
|window-ID|. If this is zero, then the current window is used.
|
||||
|
||||
@@ -10887,6 +11010,7 @@ python_dynamic Python 2.x interface is dynamically loaded. |has-python|
|
||||
python3 Python 3.x interface available. |has-python|
|
||||
python3_compiled Compiled with Python 3.x interface. |has-python|
|
||||
python3_dynamic Python 3.x interface is dynamically loaded. |has-python|
|
||||
python3_stable Python 3.x interface is using Python Stable ABI. |has-python|
|
||||
pythonx Python 2.x and/or 3.x interface available. |python_x|
|
||||
qnx QNX version of Vim.
|
||||
quickfix Compiled with |quickfix| support.
|
||||
|
||||
@@ -2436,6 +2436,25 @@ v:progpath Contains the command with which Vim was invoked, in a form
|
||||
".exe" is not added to v:progpath.
|
||||
Read-only.
|
||||
|
||||
*v:python3_version* *python3-version-variable*
|
||||
v:python3_version
|
||||
Version of Python 3 that Vim was built against. When
|
||||
Python is loaded dynamically (|python-dynamic|), this version
|
||||
should exactly match the Python library up to the minor
|
||||
version (e.g. 3.10.2 and 3.10.3 are compatible as the minor
|
||||
version is "10", whereas 3.9.4 and 3.10.3 are not compatible).
|
||||
When |python-stable-abi| is used, this will be the minimum Python
|
||||
version that you can use instead. (e.g. if v:python3_version
|
||||
indicates 3.9, you can use 3.9, 3.10, or anything above).
|
||||
|
||||
This number is encoded as a hex number following Python ABI
|
||||
versioning conventions. Do the following to have a
|
||||
human-readable full version in hex: >
|
||||
echo printf("%08X", v:python3_version)
|
||||
< You can obtain only the minor version by doing: >
|
||||
echo and(v:python3_version>>16,0xff)
|
||||
< Read-only.
|
||||
|
||||
*v:register* *register-variable*
|
||||
v:register The name of the register in effect for the current normal mode
|
||||
command (regardless of whether that command actually used a
|
||||
|
||||
@@ -146,6 +146,7 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
*.cls g:filetype_cls
|
||||
*.csh g:filetype_csh |ft-csh-syntax|
|
||||
*.dat g:filetype_dat
|
||||
*.f g:filetype_f |ft-forth-syntax|
|
||||
*.frm g:filetype_frm |ft-form-syntax|
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
@@ -394,7 +395,7 @@ ways to change this:
|
||||
You must create a new filetype plugin in a directory early in
|
||||
'runtimepath'. For Unix, for example you could use this file: >
|
||||
vim ~/.vim/ftplugin/fortran.vim
|
||||
< You can set those settings and mappings that you would like to add. Note
|
||||
< You can set those settings and mappings that you would like to add. Note
|
||||
that the global plugin will be loaded after this, it may overrule the
|
||||
settings that you do here. If this is the case, you need to use one of the
|
||||
following two methods.
|
||||
@@ -403,7 +404,7 @@ ways to change this:
|
||||
You must put the copy in a directory early in 'runtimepath'. For Unix, for
|
||||
example, you could do this: >
|
||||
cp $VIMRUNTIME/ftplugin/fortran.vim ~/.vim/ftplugin/fortran.vim
|
||||
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
|
||||
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
|
||||
variable will be set, the global plugin will not be loaded.
|
||||
A disadvantage of this method is that when the distributed plugin gets
|
||||
improved, you will have to copy and modify it again.
|
||||
@@ -412,7 +413,7 @@ ways to change this:
|
||||
You must create a new filetype plugin in a directory from the end of
|
||||
'runtimepath'. For Unix, for example, you could use this file: >
|
||||
vim ~/.vim/after/ftplugin/fortran.vim
|
||||
< In this file you can change just those settings that you want to change.
|
||||
< In this file you can change just those settings that you want to change.
|
||||
|
||||
==============================================================================
|
||||
3. Docs for the default filetype plugins. *ftplugin-docs*
|
||||
|
||||
+25
-1
@@ -769,7 +769,19 @@ Unix ~
|
||||
The 'pythondll' or 'pythonthreedll' option can be used to specify the Python
|
||||
shared library file instead of DYNAMIC_PYTHON_DLL or DYNAMIC_PYTHON3_DLL file
|
||||
what were specified at compile time. The version of the shared library must
|
||||
match the Python 2.x or Python 3 version Vim was compiled with.
|
||||
match the Python 2.x or Python 3 version (|v:python3_version|) Vim was
|
||||
compiled with unless using |python3-stable-abi|.
|
||||
|
||||
|
||||
Stable ABI and mixing Python versions ~
|
||||
*python-stable* *python-stable-abi* *python3-stable-abi*
|
||||
If Vim was not compiled with Stable ABI (only available for Python 3), the
|
||||
version of the Python shared library must match the version that Vim was
|
||||
compiled with. Otherwise, mixing versions could result in unexpected crashes
|
||||
and failures. With Stable ABI, this restriction is relaxed, and any Python 3
|
||||
library with version of at least |v:python3_version| will work. See
|
||||
|has-python| for how to check if Stable ABI is supported, or see if version
|
||||
output includes |+python3/dyn-stable|.
|
||||
|
||||
==============================================================================
|
||||
10. Python 3 *python3*
|
||||
@@ -881,6 +893,18 @@ python support: >
|
||||
endif
|
||||
endif
|
||||
|
||||
When loading the library dynamically, Vim can be compiled to support Python 3
|
||||
Stable ABI (|python3-stable-abi|) which allows you to load a different version
|
||||
of Python 3 library than the one Vim was compiled with. To check it: >
|
||||
if has('python3_dynamic')
|
||||
if has('python3_stable')
|
||||
echo 'support Python 3 Stable ABI.'
|
||||
else
|
||||
echo 'does not support Python 3 Stable ABI.'
|
||||
echo 'only use Python 3 version ' .. v:python3_version
|
||||
endif
|
||||
endif
|
||||
|
||||
This also tells you whether Python is dynamically loaded, which will fail if
|
||||
the runtime library cannot be found.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Nov 20
|
||||
*intro.txt* For Vim version 9.0. Last change: 2023 Aug 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -129,8 +129,9 @@ There are three ways to report bugs:
|
||||
3. Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will
|
||||
see the message. If you don't want that, e.g. because it is a security
|
||||
issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer
|
||||
(that's Bram).
|
||||
issue, please contact any of the current Vim maintainers
|
||||
https://github.com/orgs/vim/people (but not Bram or the vim-dev ML).
|
||||
In the future, a proper process for handling security issues will be setup.
|
||||
|
||||
Please be brief; all the time that is spent on answering mail is subtracted
|
||||
from the time that is spent on improving Vim! Always give a reproducible
|
||||
@@ -181,9 +182,9 @@ The user may create scripts for Vim that use external commands. These might
|
||||
introduce Y2K problems, but those are not really part of Vim itself.
|
||||
|
||||
==============================================================================
|
||||
3. Credits *credits* *author* *Bram* *Moolenaar*
|
||||
3. Credits *credits* *author*
|
||||
|
||||
Most of Vim was created by Bram Moolenaar <Bram@vim.org>.
|
||||
Most of Vim was created by Bram Moolenaar <Bram@vim.org> |Bram-Moolenaar|
|
||||
|
||||
Parts of the documentation come from several Vi manuals, written by:
|
||||
W.N. Joy
|
||||
@@ -216,7 +217,7 @@ Vim would never have become what it is now, without the help of these people!
|
||||
Bill Foster Athena GUI port (later removed)
|
||||
Google Lets me work on Vim one day a week
|
||||
Loic Grenie xvim (ideas for multi windows version)
|
||||
Sven Guckes Vim promoter and previous WWW page maintainer
|
||||
Sven Guckes Vim promoter and previous WWW page maintainer |Sven-Guckes|
|
||||
Darren Hiebert Exuberant ctags
|
||||
Jason Hildebrand GTK+ 2 port
|
||||
Bruce Hunsaker improvements for VMS port
|
||||
|
||||
@@ -242,8 +242,8 @@ gM Like "g0", but to halfway the text of the line.
|
||||
Thus "10gM" is near the start of the text and "90gM"
|
||||
is near the end of the text.
|
||||
|
||||
*g$* *g<End>*
|
||||
g$ or g<End> When lines wrap ('wrap' on): To the last character of
|
||||
*g$*
|
||||
g$ When lines wrap ('wrap' on): To the last character of
|
||||
the screen line and [count - 1] screen lines downward
|
||||
|inclusive|. Differs from "$" when a line is wider
|
||||
than the screen.
|
||||
@@ -256,6 +256,10 @@ g$ or g<End> When lines wrap ('wrap' on): To the last character of
|
||||
When 'virtualedit' is enabled moves to the end of the
|
||||
screen line.
|
||||
|
||||
*g<End>* *g<kEnd>*
|
||||
g<End> Like |g$| but to the last non-blank character
|
||||
instead of the last character.
|
||||
|
||||
*bar*
|
||||
| To screen column [count] in the current line.
|
||||
|exclusive| motion. Ceci n'est pas une pipe.
|
||||
|
||||
+36
-11
@@ -252,6 +252,8 @@ opt+=val" the expansion is done before the adding or removing.
|
||||
|
||||
Handling of local options *local-options*
|
||||
|
||||
Note: The following also applies to |global-local| options.
|
||||
|
||||
Some of the options only apply to a window or buffer. Each window or buffer
|
||||
has its own copy of this option, thus each can have its own value. This
|
||||
allows you to set 'list' in one window but not in another. And set
|
||||
@@ -301,6 +303,30 @@ The options local to a window are remembered for each buffer. This also
|
||||
happens when the buffer is not loaded, but they are lost when the buffer is
|
||||
wiped out |:bwipe|.
|
||||
|
||||
Special local window options *special-local-window-option*
|
||||
|
||||
The following local window options won't be copied over when new windows are
|
||||
created, thus they behave slightly differently:
|
||||
|
||||
Option Reason ~
|
||||
'previewwindow' there can only be a single one
|
||||
'scroll' specific to existing window
|
||||
'winfixheight' specific to existing window
|
||||
'winfixwidth' specific to existing window
|
||||
|
||||
Special local buffer options *special-local-buffer-option*
|
||||
|
||||
The following local buffer options won't be copied over when new buffers are
|
||||
created, thus they behave slightly differently:
|
||||
|
||||
Option Reason ~
|
||||
'filetype' explicitly set by autocommands
|
||||
'syntax' explicitly set by autocommands
|
||||
'bufhidden' denote |special-buffers|
|
||||
'buftype' denote |special-buffers|
|
||||
'readonly' will be detected automatically
|
||||
'modified' will be detected automatically
|
||||
|
||||
*:setl* *:setlocal*
|
||||
:setl[ocal][!] ... Like ":set" but set only the value local to the
|
||||
current buffer or window. Not all options have a
|
||||
@@ -374,7 +400,6 @@ used. Thus it does the same as: >
|
||||
Note: In the future more global options can be made |global-local|. Using
|
||||
":setlocal" on a global option might work differently then.
|
||||
|
||||
|
||||
*option-value-function*
|
||||
Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
|
||||
'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
|
||||
@@ -1454,7 +1479,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'bufhidden'* *'bh'*
|
||||
'bufhidden' 'bh' string (default: "")
|
||||
local to buffer
|
||||
local to buffer |special-local-buffer-option|
|
||||
This option specifies what happens when a buffer is no longer
|
||||
displayed in a window:
|
||||
<empty> follow the global 'hidden' option
|
||||
@@ -1486,7 +1511,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'buftype'* *'bt'* *E382*
|
||||
'buftype' 'bt' string (default: "")
|
||||
local to buffer
|
||||
local to buffer |special-local-buffer-option|
|
||||
The value of this option specifies the type of a buffer:
|
||||
<empty> normal buffer
|
||||
nofile buffer which is not related to a file and will not be
|
||||
@@ -3423,7 +3448,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'filetype'* *'ft'*
|
||||
'filetype' 'ft' string (default: "")
|
||||
local to buffer
|
||||
local to buffer |special-local-buffer-option|
|
||||
When this option is set, the FileType autocommand event is triggered.
|
||||
All autocommands that match with the value of this option will be
|
||||
executed. Thus the value of 'filetype' is used in place of the file
|
||||
@@ -5694,7 +5719,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'modified'* *'mod'* *'nomodified'* *'nomod'*
|
||||
'modified' 'mod' boolean (default off)
|
||||
local to buffer
|
||||
local to buffer |special-local-buffer-option|
|
||||
When on, the buffer is considered to be modified. This option is set
|
||||
when:
|
||||
1. A change was made to the text since it was last written. Using the
|
||||
@@ -6265,7 +6290,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'previewwindow'* *'nopreviewwindow'*
|
||||
*'pvw'* *'nopvw'* *E590*
|
||||
'previewwindow' 'pvw' boolean (default off)
|
||||
local to window
|
||||
local to window |special-local-window-option|
|
||||
{not available when compiled without the |+quickfix|
|
||||
feature}
|
||||
Identifies the preview window. Only one window can have this option
|
||||
@@ -6460,7 +6485,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'readonly'* *'ro'* *'noreadonly'* *'noro'*
|
||||
'readonly' 'ro' boolean (default off)
|
||||
local to buffer
|
||||
local to buffer |special-local-buffer-option|
|
||||
If on, writes fail unless you use a '!'. Protects you from
|
||||
accidentally overwriting a file. Default on when Vim is started
|
||||
in read-only mode ("vim -R") or when the executable is called "view".
|
||||
@@ -6839,7 +6864,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'scroll'* *'scr'*
|
||||
'scroll' 'scr' number (default: half the window height)
|
||||
local to window
|
||||
local to window |special-local-window-option|
|
||||
Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
|
||||
set to half the number of lines in the window when the window size
|
||||
changes. This may happen when enabling the |status-line| or
|
||||
@@ -8101,7 +8126,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'syntax'* *'syn'*
|
||||
'syntax' 'syn' string (default empty)
|
||||
local to buffer
|
||||
local to buffer |special-local-buffer-option|
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
When this option is set, the syntax with this name is loaded, unless
|
||||
@@ -9562,7 +9587,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
|
||||
'winfixheight' 'wfh' boolean (default off)
|
||||
local to window
|
||||
local to window |special-local-window-option|
|
||||
Keep the window height when windows are opened or closed and
|
||||
'equalalways' is set. Also for |CTRL-W_=|. Set by default for the
|
||||
|preview-window| and |quickfix-window|.
|
||||
@@ -9570,7 +9595,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
|
||||
'winfixwidth' 'wfw' boolean (default off)
|
||||
local to window
|
||||
local to window |special-local-window-option|
|
||||
Keep the window width when windows are opened or closed and
|
||||
'equalalways' is set. Also for |CTRL-W_=|.
|
||||
The width may be changed anyway when running out of room.
|
||||
|
||||
@@ -214,10 +214,10 @@ A syntax group name is to be used for syntax items that match the same kind of
|
||||
thing. These are then linked to a highlight group that specifies the color.
|
||||
A syntax group name doesn't specify any color or attributes itself.
|
||||
|
||||
The name for a highlight or syntax group must consist of ASCII letters, digits
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
|
||||
an error when using other characters. The maximum length of a group name is
|
||||
about 200 bytes. *E1249*
|
||||
The name for a highlight or syntax group must consist of ASCII letters,
|
||||
digits, underscores, dots, or hyphens. As a regexp: "[a-zA-Z0-9_.-]*".
|
||||
However, Vim does not give an error when using other characters. The maximum
|
||||
length of a group name is about 200 bytes. *E1249*
|
||||
|
||||
To be able to allow each user to pick their favorite set of colors, there must
|
||||
be preferred names for highlight groups that are common for many languages.
|
||||
@@ -1579,9 +1579,10 @@ example, FORM files, use this in your startup vimrc: >
|
||||
|
||||
FORTH *forth.vim* *ft-forth-syntax*
|
||||
|
||||
Files matching "*.fs" could be F# or Forth. If the automatic detection
|
||||
doesn't work for you, or you don't edit F# at all, use this in your
|
||||
startup vimrc: >
|
||||
Files matching "*.f" could be Fortran or Forth and those matching "*.fs" could
|
||||
be F# or Forth. If the automatic detection doesn't work for you, or you don't
|
||||
edit F# or Fortran at all, use this in your startup vimrc: >
|
||||
:let filetype_f = "forth"
|
||||
:let filetype_fs = "forth"
|
||||
|
||||
|
||||
|
||||
+11
-2
@@ -1456,6 +1456,7 @@ $quote eval.txt /*$quote*
|
||||
+python/dyn various.txt /*+python\/dyn*
|
||||
+python3 various.txt /*+python3*
|
||||
+python3/dyn various.txt /*+python3\/dyn*
|
||||
+python3/dyn-stable various.txt /*+python3\/dyn-stable*
|
||||
+quickfix various.txt /*+quickfix*
|
||||
+reltime various.txt /*+reltime*
|
||||
+rightleft various.txt /*+rightleft*
|
||||
@@ -3903,7 +3904,8 @@ BeOS os_beos.txt /*BeOS*
|
||||
Blob eval.txt /*Blob*
|
||||
Blobs eval.txt /*Blobs*
|
||||
Boolean eval.txt /*Boolean*
|
||||
Bram intro.txt /*Bram*
|
||||
Bram version9.txt /*Bram*
|
||||
Bram-Moolenaar version9.txt /*Bram-Moolenaar*
|
||||
BufAdd autocmd.txt /*BufAdd*
|
||||
BufCreate autocmd.txt /*BufCreate*
|
||||
BufDelete autocmd.txt /*BufDelete*
|
||||
@@ -5549,7 +5551,7 @@ Mark motion.txt /*Mark*
|
||||
MenuPopup autocmd.txt /*MenuPopup*
|
||||
MiNT os_mint.txt /*MiNT*
|
||||
ModeChanged autocmd.txt /*ModeChanged*
|
||||
Moolenaar intro.txt /*Moolenaar*
|
||||
Moolenaar version9.txt /*Moolenaar*
|
||||
MorphOS os_amiga.txt /*MorphOS*
|
||||
Motif gui_x11.txt /*Motif*
|
||||
Myspell spell.txt /*Myspell*
|
||||
@@ -9457,6 +9459,8 @@ python-path_hook if_pyth.txt /*python-path_hook*
|
||||
python-pyeval if_pyth.txt /*python-pyeval*
|
||||
python-range if_pyth.txt /*python-range*
|
||||
python-special-path if_pyth.txt /*python-special-path*
|
||||
python-stable if_pyth.txt /*python-stable*
|
||||
python-stable-abi if_pyth.txt /*python-stable-abi*
|
||||
python-strwidth if_pyth.txt /*python-strwidth*
|
||||
python-tabpage if_pyth.txt /*python-tabpage*
|
||||
python-tabpages if_pyth.txt /*python-tabpages*
|
||||
@@ -9469,6 +9473,8 @@ python.vim syntax.txt /*python.vim*
|
||||
python2-directory if_pyth.txt /*python2-directory*
|
||||
python3 if_pyth.txt /*python3*
|
||||
python3-directory if_pyth.txt /*python3-directory*
|
||||
python3-stable-abi if_pyth.txt /*python3-stable-abi*
|
||||
python3-version-variable eval.txt /*python3-version-variable*
|
||||
python_x if_pyth.txt /*python_x*
|
||||
python_x-special-comments if_pyth.txt /*python_x-special-comments*
|
||||
pythonx if_pyth.txt /*pythonx*
|
||||
@@ -9872,6 +9878,8 @@ spec_chglog_format pi_spec.txt /*spec_chglog_format*
|
||||
spec_chglog_prepend pi_spec.txt /*spec_chglog_prepend*
|
||||
spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
|
||||
special-buffers windows.txt /*special-buffers*
|
||||
special-local-buffer-option options.txt /*special-local-buffer-option*
|
||||
special-local-window-option options.txt /*special-local-window-option*
|
||||
specifies vim9class.txt /*specifies*
|
||||
speed-up tips.txt /*speed-up*
|
||||
spell spell.txt /*spell*
|
||||
@@ -10795,6 +10803,7 @@ v:prevcount eval.txt /*v:prevcount*
|
||||
v:profiling eval.txt /*v:profiling*
|
||||
v:progname eval.txt /*v:progname*
|
||||
v:progpath eval.txt /*v:progpath*
|
||||
v:python3_version eval.txt /*v:python3_version*
|
||||
v:register eval.txt /*v:register*
|
||||
v:scrollstart eval.txt /*v:scrollstart*
|
||||
v:searchforward eval.txt /*v:searchforward*
|
||||
|
||||
@@ -1384,6 +1384,9 @@ Other commands ~
|
||||
isn't one
|
||||
*:Asm* jump to the window with the disassembly, create it if there
|
||||
isn't one
|
||||
*:Var* jump to the window with the local and argument variables,
|
||||
create it if there isn't one. This window updates whenever the
|
||||
program is stopped
|
||||
|
||||
Events ~
|
||||
*termdebug-events*
|
||||
@@ -1460,6 +1463,15 @@ If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_disasm_window = 15
|
||||
Any value greater than 1 will set the Asm window height to that value.
|
||||
|
||||
*termdebug_variables_window*
|
||||
If you want the Var window shown by default, set the flag to 1.
|
||||
the "variables_window_height" entry can be used to set the window height: >
|
||||
let g:termdebug_config['variables_window'] = 1
|
||||
let g:termdebug_config['variables_window_height'] = 15
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_variables_window = 15
|
||||
Any value greater than 1 will set the Var window height to that value.
|
||||
|
||||
Communication ~
|
||||
*termdebug-communication*
|
||||
There is another, hidden, buffer, which is used for Vim to communicate with
|
||||
|
||||
@@ -335,6 +335,10 @@ prop_list({lnum} [, {props}]) *prop_list()*
|
||||
length length in bytes, one more if line break is
|
||||
included
|
||||
id property ID
|
||||
text text to be displayed before {col}. Only
|
||||
present for |virtual-text| properties.
|
||||
text_align alignment property of |virtual-text|.
|
||||
text_wrap specifies whether |virtual-text| is wrapped.
|
||||
type name of the property type, omitted if
|
||||
the type was deleted
|
||||
type_bufnr buffer number for which this type was defined;
|
||||
|
||||
+20
-8
@@ -431,14 +431,26 @@ comma-separated list of extension(s) you find yourself wanting to edit: >
|
||||
|
||||
" vim -b : edit binary using xxd-format!
|
||||
augroup Binary
|
||||
au!
|
||||
au BufReadPre *.bin let &bin=1
|
||||
au BufReadPost *.bin if &bin | %!xxd
|
||||
au BufReadPost *.bin set ft=xxd | endif
|
||||
au BufWritePre *.bin if &bin | %!xxd -r
|
||||
au BufWritePre *.bin endif
|
||||
au BufWritePost *.bin if &bin | %!xxd
|
||||
au BufWritePost *.bin set nomod | endif
|
||||
autocmd!
|
||||
autocmd BufReadPre *.bin set binary
|
||||
autocmd BufReadPost *.bin
|
||||
\ if &binary
|
||||
\ | execute "silent %!xxd -c 32"
|
||||
\ | set filetype=xxd
|
||||
\ | redraw
|
||||
\ | endif
|
||||
autocmd BufWritePre *.bin
|
||||
\ if &binary
|
||||
\ | let s:view = winsaveview()
|
||||
\ | execute "silent %!xxd -r -c 32"
|
||||
\ | endif
|
||||
autocmd BufWritePost *.bin
|
||||
\ if &binary
|
||||
\ | execute "silent %!xxd -c 32"
|
||||
\ | set nomodified
|
||||
\ | call winrestview(s:view)
|
||||
\ | redraw
|
||||
\ | endif
|
||||
augroup END
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -5535,7 +5535,6 @@ Undo:
|
||||
- Undo history wrong when ":next file" re-uses a buffer. (#5426) ex_next()
|
||||
should pass flag to do_argfile(), then to do_ecmd(). Is there a test for
|
||||
this?
|
||||
- Add buffer argument to undotree(). (#4001)
|
||||
- Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
|
||||
- Undo message is not always properly displayed. Patch by Ken Takata, 2013
|
||||
oct 3. Doesn't work properly according to Yukihiro Nakadaira.
|
||||
|
||||
@@ -46,8 +46,8 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
|
||||
maintainer will do with your changes and under what license they
|
||||
will be distributed is negotiable. If there has been no negotiation
|
||||
then this license, or a later version, also applies to your changes.
|
||||
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
|
||||
changes it will be announced in appropriate places (most likely
|
||||
The current maintainers are listed here: https://github.com/orgs/vim/people.
|
||||
If this changes it will be announced in appropriate places (most likely
|
||||
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
|
||||
impossible to contact the maintainer, the obligation to send him
|
||||
your changes ceases. Once the maintainer has confirmed that he has
|
||||
|
||||
+23
-5
@@ -111,9 +111,19 @@ use CTRL-G u. This is useful if you want an insert command to be undoable in
|
||||
parts. E.g., for each sentence. |i_CTRL-G_u|
|
||||
|
||||
Setting the value of 'undolevels' also closes the undo block. Even when the
|
||||
new value is equal to the old value. In |Vim9| script: >
|
||||
&undolevels = &undolevels
|
||||
new value is equal to the old value. Use `g:undolevels` to explicitly read
|
||||
and write only the global value of 'undolevels'. In |Vim9| script: >
|
||||
&g:undolevels = &g:undolevels
|
||||
In legacy script: >
|
||||
let &g:undolevels = &g:undolevels
|
||||
|
||||
Note that the similar-looking assignment `let &undolevels=&undolevels` does not
|
||||
preserve the global option value of 'undolevels' in the event that the local
|
||||
option has been set to a different value. For example: >
|
||||
" Start with different global and local values for 'undolevels'.
|
||||
let &g:undolevels = 1000
|
||||
let &l:undolevels = 2000
|
||||
" This assignment changes the global option to 2000:
|
||||
let &undolevels = &undolevels
|
||||
|
||||
==============================================================================
|
||||
@@ -366,12 +376,20 @@ undo is possible. Use this if you are running out of memory.
|
||||
When you set 'undolevels' to -1 the undo information is not immediately
|
||||
cleared, this happens at the next change. To force clearing the undo
|
||||
information you can use these commands: >
|
||||
:let old_undolevels = &undolevels
|
||||
:set undolevels=-1
|
||||
:let old_undolevels = &l:undolevels
|
||||
:setlocal undolevels=-1
|
||||
:exe "normal a \<BS>\<Esc>"
|
||||
:let &undolevels = old_undolevels
|
||||
:let &l:undolevels = old_undolevels
|
||||
:unlet old_undolevels
|
||||
|
||||
Note use of `&l:undolevels` to explicitly read the local value of 'undolevels'
|
||||
and the use of `:setlocal` to change only the local option (which takes
|
||||
precedence over the corresponding global option value). Saving the option value
|
||||
via the use of `&undolevels` is unpredictable; it reads either the local value
|
||||
(if one has been set) or the global value (otherwise). Also, if a local value
|
||||
has been set, changing the option via `:set undolevels` will change both the
|
||||
global and local values, requiring extra work to save and restore both values.
|
||||
|
||||
Marks for the buffer ('a to 'z) are also saved and restored, together with the
|
||||
text.
|
||||
|
||||
|
||||
+18
-8
@@ -308,17 +308,27 @@ This switches on three very clever mechanisms:
|
||||
|
||||
|
||||
*restore-cursor* *last-position-jump* >
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
||||
\ | exe "normal! g`\""
|
||||
\ | endif
|
||||
augroup RestoreCursor
|
||||
autocmd!
|
||||
autocmd BufReadPost *
|
||||
\ let line = line("'\"")
|
||||
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
|
||||
\ && index(['xxd', 'gitrebase'], &filetype) == -1
|
||||
\ | execute "normal! g`\""
|
||||
\ | endif
|
||||
augroup END
|
||||
|
||||
Another autocommand. This time it is used after reading any file. The
|
||||
complicated stuff after it checks if the '" mark is defined, and jumps to it
|
||||
if so. The backslash at the start of a line is used to continue the command
|
||||
from the previous line. That avoids a line getting very long.
|
||||
See |line-continuation|. This only works in a Vim script file, not when
|
||||
typing commands at the command-line.
|
||||
if so. It doesn't do that for a commit or rebase message, which are likely
|
||||
a different one than last time, and when using xxd(1) to filter and edit
|
||||
binary files, which transforms input files back and forth, causing them to
|
||||
have dual nature, so to speak. See also |using-xxd|.
|
||||
|
||||
The backslash at the start of a line is used to continue the command from the
|
||||
previous line. That avoids a line getting very long. See |line-continuation|.
|
||||
This only works in a Vim script file, not when typing commands at the
|
||||
command line.
|
||||
|
||||
>
|
||||
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
|
||||
|
||||
@@ -1373,7 +1373,7 @@ Various: *various-functions*
|
||||
libcallnr() idem, returning a number
|
||||
|
||||
undofile() get the name of the undo file
|
||||
undotree() return the state of the undo tree
|
||||
undotree() return the state of the undo tree for a buffer
|
||||
|
||||
shiftwidth() effective value of 'shiftwidth'
|
||||
|
||||
|
||||
@@ -452,6 +452,8 @@ m *+python* Python 2 interface |python|
|
||||
m *+python/dyn* Python 2 interface |python-dynamic| |/dyn|
|
||||
m *+python3* Python 3 interface |python|
|
||||
m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn|
|
||||
m *+python3/dyn-stable*
|
||||
Python 3 interface |python-dynamic| |python-stable| |/dyn|
|
||||
N *+quickfix* |:make| and |quickfix| commands
|
||||
N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
|
||||
'redrawtime' option
|
||||
|
||||
@@ -4629,7 +4629,7 @@ using an #ifdef. (Sergey Khorev)
|
||||
Mzscheme interface didn't link, missing function. Changed order of libraries
|
||||
in the configure script.
|
||||
|
||||
Ruby interface didn't compile on Mac. Changed #ifdef. (Kevin Ballard)
|
||||
Ruby interface didn't compile on Mac. Changed #ifdef. (Lily Ballard)
|
||||
|
||||
Patch 7.1b.001 (extra)
|
||||
Problem: Random text in a source file. No idea how it got there.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
*version9.txt* For Vim version 9.0. Last change: 2023 Aug 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -43,6 +43,17 @@ when the release was being prepared. Sven was a long time supporter of Vim.
|
||||
He registered the vim.org domain and created the first Vim website. We will
|
||||
remember him!
|
||||
|
||||
*Bram* *Moolenaar* *Bram-Moolenaar*
|
||||
Vim version 9.1 is dedicated to Bram Moolenaar, who passed away on August 3rd 2023
|
||||
while still working full-time on Vim. The Vim project would not exist without
|
||||
his ongoing passion to lead and develop Vim and the community for more than 30
|
||||
years. Bram was also passionate about his |ICCF| foundation to help children
|
||||
in Uganda. If you enjoy using Vim, please consider donating!
|
||||
We will miss his guidance, passion and leadership.
|
||||
|
||||
Obituary Articles: https://github.com/vim/vim/discussions/12742
|
||||
Say Farewell: https://github.com/vim/vim/discussions/12737
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *new-9*
|
||||
|
||||
|
||||
@@ -232,6 +232,9 @@ If the class extends a parent class, the same thing happens. In the second
|
||||
step the members of the parent class are done first. There is no need to call
|
||||
"super()" or "new()" on the parent.
|
||||
|
||||
When defining the new() method the return type should not be specified. It
|
||||
always returns an object of the class.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. class members and functions *Vim9-class-member*
|
||||
|
||||
+35
-34
@@ -6,7 +6,7 @@
|
||||
.\" Changes by Bram Moolenaar <Bram@vim.org>
|
||||
.SH NAME
|
||||
.I xxd
|
||||
\- make a hexdump or do the reverse.
|
||||
\- make a hex dump or do the reverse.
|
||||
.SH SYNOPSIS
|
||||
.B xxd
|
||||
\-h[elp]
|
||||
@@ -57,20 +57,20 @@ are all equivalent.
|
||||
.PP
|
||||
.TP
|
||||
.IR \-a " | " \-autoskip
|
||||
Toggle autoskip: A single '*' replaces nul-lines. Default off.
|
||||
Toggle autoskip: A single '*' replaces NUL-lines. Default off.
|
||||
.TP
|
||||
.IR \-b " | " \-bits
|
||||
Switch to bits (binary digits) dump, rather than hexdump.
|
||||
Switch to bits (binary digits) dump, rather than hex dump.
|
||||
This option writes octets as eight digits "1"s and "0"s instead of a normal
|
||||
hexadecimal dump. Each line is preceded by a line number in hexadecimal and
|
||||
followed by an ascii (or ebcdic) representation. The command line switches
|
||||
followed by an ASCII (or EBCDIC) representation. The command line switches
|
||||
\-r, \-p, \-i do not work with this mode.
|
||||
.TP
|
||||
.IR "\-c cols " | " \-cols cols"
|
||||
Format
|
||||
.RI < cols >
|
||||
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
|
||||
No maxmimum for \-ps. With \-ps, 0 results in one long line of output.
|
||||
No maximum for \-ps. With \-ps, 0 results in one long line of output.
|
||||
.TP
|
||||
.IR \-C " | " \-capitalize
|
||||
Capitalize variable names in C include file style, when using \-i.
|
||||
@@ -81,11 +81,11 @@ This does not change the hexadecimal representation. The option is
|
||||
meaningless in combinations with \-r, \-p or \-i.
|
||||
.TP
|
||||
.IR \-e
|
||||
Switch to little-endian hexdump.
|
||||
Switch to little-endian hex dump.
|
||||
This option treats byte groups as words in little-endian byte order.
|
||||
The default grouping of 4 bytes may be changed using
|
||||
.RI "" \-g .
|
||||
This option only applies to hexdump, leaving the ASCII (or EBCDIC)
|
||||
This option only applies to the hex dump, leaving the ASCII (or EBCDIC)
|
||||
representation unchanged.
|
||||
The command line switches
|
||||
\-r, \-p, \-i do not work with this mode.
|
||||
@@ -93,13 +93,13 @@ The command line switches
|
||||
.IR "\-g bytes " | " \-groupsize bytes"
|
||||
Separate the output of every
|
||||
.RI < bytes >
|
||||
bytes (two hex characters or eight bit-digits each) by a whitespace.
|
||||
bytes (two hex characters or eight bit digits each) by a whitespace.
|
||||
Specify
|
||||
.I \-g 0
|
||||
to suppress grouping.
|
||||
.RI < Bytes "> defaults to " 2
|
||||
in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
|
||||
Grouping does not apply to postscript or include style.
|
||||
Grouping does not apply to PostScript or include style.
|
||||
.TP
|
||||
.IR \-h " | " \-help
|
||||
Print a summary of available commands and exit. No hex dumping is performed.
|
||||
@@ -123,16 +123,16 @@ Add
|
||||
to the displayed file position.
|
||||
.TP
|
||||
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
|
||||
Output in postscript continuous hexdump style. Also known as plain hexdump
|
||||
Output in PostScript continuous hex dump style. Also known as plain hex dump
|
||||
style.
|
||||
.TP
|
||||
.IR \-r " | " \-revert
|
||||
Reverse operation: convert (or patch) hexdump into binary.
|
||||
Reverse operation: convert (or patch) hex dump into binary.
|
||||
If not writing to stdout, xxd writes into its output file without truncating
|
||||
it. Use the combination
|
||||
.I \-r \-p
|
||||
to read plain hexadecimal dumps without line number information and without a
|
||||
particular column layout. Additional Whitespace and line-breaks are allowed
|
||||
particular column layout. Additional whitespace and line breaks are allowed
|
||||
anywhere.
|
||||
.TP
|
||||
.I \-seek offset
|
||||
@@ -140,7 +140,7 @@ When used after
|
||||
.IR \-r :
|
||||
revert with
|
||||
.RI < offset >
|
||||
added to file positions found in hexdump.
|
||||
added to file positions found in hex dump.
|
||||
.TP
|
||||
.I \-s [+][\-]seek
|
||||
Start at
|
||||
@@ -153,28 +153,28 @@ should be that many characters from the end of the input (or if combined with
|
||||
Without \-s option, xxd starts at the current file position.
|
||||
.TP
|
||||
.I \-u
|
||||
Use upper case hex letters. Default is lower case.
|
||||
Use upper-case hex letters. Default is lower-case.
|
||||
.TP
|
||||
.IR \-v " | " \-version
|
||||
Show version string.
|
||||
.SH CAVEATS
|
||||
.PP
|
||||
.I xxd \-r
|
||||
has some builtin magic while evaluating line number information.
|
||||
If the output file is seekable, then the linenumbers at the start of each
|
||||
hexdump line may be out of order, lines may be missing, or overlapping. In
|
||||
has some built-in magic while evaluating line number information.
|
||||
If the output file is seekable, then the line numbers at the start of each
|
||||
hex dump line may be out of order, lines may be missing, or overlapping. In
|
||||
these cases xxd will lseek(2) to the next position. If the output file is not
|
||||
seekable, only gaps are allowed, which will be filled by null-bytes.
|
||||
.PP
|
||||
.I xxd \-r
|
||||
never generates parse errors. Garbage is silently skipped.
|
||||
.PP
|
||||
When editing hexdumps, please note that
|
||||
When editing hex dumps, please note that
|
||||
.I xxd \-r
|
||||
skips everything on the input line after reading enough columns of hexadecimal
|
||||
data (see option \-c). This also means, that changes to the printable ascii (or
|
||||
ebcdic) columns are always ignored. Reverting a plain (or postscript) style
|
||||
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.
|
||||
data (see option \-c). This also means that changes to the printable ASCII (or
|
||||
EBCDIC) columns are always ignored. Reverting a plain (or PostScript) style
|
||||
hex dump with xxd \-r \-p does not depend on the correct number of columns. Here, anything that looks like a pair of hex digits is interpreted.
|
||||
.PP
|
||||
Note the difference between
|
||||
.br
|
||||
@@ -190,20 +190,20 @@ may be different from
|
||||
as lseek(2) is used to "rewind" input. A '+'
|
||||
makes a difference if the input source is stdin, and if stdin's file position
|
||||
is not at the start of the file by the time xxd is started and given its input.
|
||||
The following examples may help to clarify (or further confuse!)...
|
||||
The following examples may help to clarify (or further confuse!):
|
||||
.PP
|
||||
Rewind stdin before reading; needed because the `cat' has already read to the
|
||||
end of stdin.
|
||||
.br
|
||||
\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
|
||||
.PP
|
||||
Hexdump from file position 0x480 (=1024+128) onwards.
|
||||
Hex dump from file position 0x480 (=1024+128) onwards.
|
||||
The `+' sign means "relative to the current position", thus the `128' adds to
|
||||
the 1k where dd left off.
|
||||
.br
|
||||
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
|
||||
.PP
|
||||
Hexdump from file position 0x100 ( = 1024\-768) on.
|
||||
Hex dump from file position 0x100 (=1024\-768) onwards.
|
||||
.br
|
||||
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
|
||||
.PP
|
||||
@@ -224,7 +224,7 @@ Print 3 lines (hex 0x30 bytes) from the end of
|
||||
\fI% xxd \-s \-0x30 file\fR
|
||||
.PP
|
||||
.br
|
||||
Print 120 bytes as continuous hexdump with 20 octets per line.
|
||||
Print 120 bytes as a continuous hex dump with 20 octets per line.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
||||
.br
|
||||
@@ -242,7 +242,7 @@ Print 120 bytes as continuous hexdump with 20 octets per line.
|
||||
.br
|
||||
|
||||
.br
|
||||
Hexdump the first 120 bytes of this man page with 12 octets per line.
|
||||
Hex dump the first 120 bytes of this man page with 12 octets per line.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-c 12 xxd.1\fR
|
||||
.br
|
||||
@@ -299,7 +299,7 @@ except for the last one which is 'A' (hex 0x41).
|
||||
\fI% echo "010000: 41" | xxd \-r > file\fR
|
||||
.PP
|
||||
.br
|
||||
Hexdump this file with autoskip.
|
||||
Hex dump this file with autoskip.
|
||||
.br
|
||||
\fI% xxd \-a \-c 12 file\fR
|
||||
.br
|
||||
@@ -310,26 +310,26 @@ Hexdump this file with autoskip.
|
||||
000fffc: 0000 0000 40 ....A
|
||||
.PP
|
||||
Create a 1 byte file containing a single 'A' character.
|
||||
The number after '\-r \-s' adds to the linenumbers found in the file;
|
||||
The number after '\-r \-s' adds to the line numbers found in the file;
|
||||
in effect, the leading bytes are suppressed.
|
||||
.br
|
||||
\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
|
||||
.PP
|
||||
Use xxd as a filter within an editor such as
|
||||
.B vim(1)
|
||||
to hexdump a region marked between `a' and `z'.
|
||||
to hex dump a region marked between `a' and `z'.
|
||||
.br
|
||||
\fI:'a,'z!xxd\fR
|
||||
.PP
|
||||
Use xxd as a filter within an editor such as
|
||||
.B vim(1)
|
||||
to recover a binary hexdump marked between `a' and `z'.
|
||||
to recover a binary hex dump marked between `a' and `z'.
|
||||
.br
|
||||
\fI:'a,'z!xxd \-r\fR
|
||||
.PP
|
||||
Use xxd as a filter within an editor such as
|
||||
.B vim(1)
|
||||
to recover one line of a hexdump. Move the cursor over the line and type:
|
||||
to recover one line of a hex dump. Move the cursor over the line and type:
|
||||
.br
|
||||
\fI!!xxd \-r\fR
|
||||
.PP
|
||||
@@ -348,8 +348,9 @@ The following error values are returned:
|
||||
no errors encountered.
|
||||
.TP
|
||||
\-1
|
||||
operation not supported (
|
||||
.I xxd \-r \-i
|
||||
operation not supported
|
||||
\%(\c
|
||||
.I \%xxd \-r \-i
|
||||
still impossible).
|
||||
.TP
|
||||
1
|
||||
@@ -367,7 +368,7 @@ desired seek position is unreachable.
|
||||
uuencode(1), uudecode(1), patch(1)
|
||||
.br
|
||||
.SH WARNINGS
|
||||
The tools weirdness matches its creators brain.
|
||||
The tool's weirdness matches its creator's brain.
|
||||
Use entirely at your own risk. Copy files. Trace it. Become a wizard.
|
||||
.br
|
||||
.SH VERSION
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
" Vim script for Evim key bindings
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 May 10
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Don't use Vi-compatible mode.
|
||||
set nocompatible
|
||||
|
||||
+40
-7
@@ -1,7 +1,8 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2023 Jun 09
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -244,7 +245,7 @@ au BufNewFile,BufRead *.bib setf bib
|
||||
au BufNewFile,BufRead *.bst setf bst
|
||||
|
||||
" Bicep
|
||||
au BufNewFile,BufRead *.bicep setf bicep
|
||||
au BufNewFile,BufRead *.bicep,*.bicepparam setf bicep
|
||||
|
||||
" BIND configuration
|
||||
" sudoedit uses namedXXXX.conf
|
||||
@@ -254,6 +255,9 @@ au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
|
||||
au BufNewFile,BufRead named.root setf bindzone
|
||||
au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
|
||||
|
||||
" Blade
|
||||
au BufNewFile,BufRead *.blade.php setf blade
|
||||
|
||||
" Blank
|
||||
au BufNewFile,BufRead *.bl setf blank
|
||||
|
||||
@@ -720,16 +724,19 @@ au BufNewFile,BufRead auto.master setf conf
|
||||
au BufNewFile,BufRead *.mas,*.master setf master
|
||||
|
||||
" Forth
|
||||
au BufNewFile,BufRead *.ft,*.fth setf forth
|
||||
au BufNewFile,BufRead *.ft,*.fth,*.4th setf forth
|
||||
|
||||
" Reva Forth
|
||||
au BufNewFile,BufRead *.frt setf reva
|
||||
|
||||
" Fortran
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran
|
||||
au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran
|
||||
endif
|
||||
au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran
|
||||
au BufNewFile,BufRead *.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran
|
||||
|
||||
" Fortran or Forth
|
||||
au BufNewFile,BufRead *.f call dist#ft#FTf()
|
||||
|
||||
" Framescript
|
||||
au BufNewFile,BufRead *.fsl setf framescript
|
||||
@@ -891,6 +898,7 @@ if exists('$XDG_CONFIG_HOME')
|
||||
endif
|
||||
au BufNewFile,BufRead $HOME/.config/cabal/config setf cabalconfig
|
||||
au BufNewFile,BufRead cabal.config setf cabalconfig
|
||||
au BufNewFile,BufRead *.persistentmodels setf haskellpersistent
|
||||
|
||||
" Haste
|
||||
au BufNewFile,BufRead *.ht setf haste
|
||||
@@ -945,6 +953,9 @@ au BufNewFile,BufRead */etc/host.conf setf hostconf
|
||||
" Hosts access
|
||||
au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
|
||||
|
||||
" Hurl
|
||||
au BufRead,BufNewFile *.hurl setf hurl
|
||||
|
||||
" Hyper Builder
|
||||
au BufNewFile,BufRead *.hb setf hb
|
||||
|
||||
@@ -1057,6 +1068,9 @@ au BufNewFile,BufRead *.json5 setf json5
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
" Geojson is also json
|
||||
au BufNewFile,BufRead *.geojson setf json
|
||||
|
||||
" Jupyter Notebook is also json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
|
||||
@@ -1558,6 +1572,10 @@ au BufNewFile,BufRead *.rcp setf pilrc
|
||||
" Pine config
|
||||
au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
|
||||
|
||||
" Pip requirements
|
||||
au BufNewFile,BufRead *.pip setf requirements
|
||||
au BufNewFile,BufRead requirements.txt setf requirements
|
||||
|
||||
" Pipenv Pipfiles
|
||||
au BufNewFile,BufRead Pipfile setf toml
|
||||
au BufNewFile,BufRead Pipfile.lock setf json
|
||||
@@ -1676,6 +1694,9 @@ au BufNewFile,BufRead *.pk setf poke
|
||||
" Protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
|
||||
" PyPA manifest files
|
||||
au BufNewFile,BufRead MANIFEST.in setf pymanifest
|
||||
|
||||
" Pyret
|
||||
au BufNewFile,BufRead *.arr setf pyret
|
||||
|
||||
@@ -1690,6 +1711,9 @@ au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
|
||||
" QL
|
||||
au BufRead,BufNewFile *.ql,*.qll setf ql
|
||||
|
||||
" QML
|
||||
au BufRead,BufNewFile *.qml,*.qbs setf qml
|
||||
|
||||
" QMLdir
|
||||
au BufRead,BufNewFile qmldir setf qmldir
|
||||
|
||||
@@ -2314,6 +2338,9 @@ au BufNewFile,BufRead */.config/upstart/*.override setf upstart
|
||||
" URL shortcut
|
||||
au BufNewFile,BufRead *.url setf urlshortcut
|
||||
|
||||
" V
|
||||
au BufNewFile,BufRead *.vsh,*.vv setf v
|
||||
|
||||
" Vala
|
||||
au BufNewFile,BufRead *.vala setf vala
|
||||
|
||||
@@ -2396,6 +2423,9 @@ au BufNewFile,BufRead .wgetrc,wgetrc setf wget
|
||||
" Wget2 config
|
||||
au BufNewFile,BufRead .wget2rc,wget2rc setf wget2
|
||||
|
||||
" WebGPU Shading Language (WGSL)
|
||||
au BufNewFile,BufRead *.wgsl setf wgsl
|
||||
|
||||
" Website MetaLanguage
|
||||
au BufNewFile,BufRead *.wml setf wml
|
||||
|
||||
@@ -2484,6 +2514,9 @@ au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml
|
||||
" VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files
|
||||
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
|
||||
|
||||
" Unison Language
|
||||
au BufNewFile,BufRead *.u,*.uu setf unison
|
||||
|
||||
" Qt Linguist translation source and Qt User Interface Files are XML
|
||||
" However, for .ts TypeScript is more common.
|
||||
au BufNewFile,BufRead *.ui setf xml
|
||||
@@ -2529,7 +2562,7 @@ au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
|
||||
au BufNewFile,BufRead *.y call dist#ft#FTy()
|
||||
|
||||
" Yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml,*.eyaml setf yaml
|
||||
|
||||
" Raml
|
||||
au BufNewFile,BufRead *.raml setf raml
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
" Vim support file to switch off detection of file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2001 Jun 11
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if exists("did_load_filetypes")
|
||||
unlet did_load_filetypes
|
||||
|
||||
@@ -2,8 +2,9 @@ vim9script noclear
|
||||
|
||||
# Vim support file to switch on loading plugins for file types
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last change: 2022 Feb 11
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if exists("g:did_load_ftplugin")
|
||||
finish
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Aap recipe
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Nov 14
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: BTM
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2004 Jul 06
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Apr 08
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C++
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jul 26
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Diff
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Nov 14
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -17,6 +17,7 @@ let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
setlocal omnifunc=haskellcomplete#Complete
|
||||
setlocal iskeyword+='
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -14,3 +14,14 @@ setlocal comments=:<%!--
|
||||
setlocal commentstring=<%!--\ %s\ --%>
|
||||
|
||||
let b:undo_ftplugin = 'set sw< sts< et< com< cms<'
|
||||
|
||||
" HTML: thanks to Johannes Zellner and Benji Fisher.
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 1
|
||||
let b:match_words = '<!--:-->,' ..
|
||||
\ '<:>,' ..
|
||||
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' ..
|
||||
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' ..
|
||||
\ '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Mail
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Oct 23
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Make
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Oct 16
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
" Vim filetype plugin
|
||||
" Language: nix
|
||||
" Maintainer: Keith Smiley <keithbsmiley@gmail.com>
|
||||
" Last Change: 2023 Jul 22
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring< comments<"
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Objective C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2003 Jan 15
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin
|
||||
" Language: PyPA manifest
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Last Change: 2023 Aug 08
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setl comments=:# commentstring=#\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms<'
|
||||
@@ -0,0 +1,31 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: QML
|
||||
" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
|
||||
" Last Change: 2023 Aug 16
|
||||
|
||||
if exists( 'b:did_ftplugin' )
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpoptions_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
" command for undo
|
||||
let b:undo_ftplugin = "setlocal formatoptions< comments< commentstring<"
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists( 'b:browsefilter' )
|
||||
let b:browsefilter =
|
||||
\ 'QML Files (*.qml,*.qbs)\t*.qml;*.qbs\n' .
|
||||
\ 'All Files\t*\n'
|
||||
endif
|
||||
|
||||
" Set 'comments' to format dashed lists in comments.
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//%s
|
||||
|
||||
setlocal formatoptions-=t
|
||||
setlocal formatoptions+=croql
|
||||
|
||||
let &cpoptions = s:cpoptions_save
|
||||
unlet s:cpoptions_save
|
||||
@@ -1,7 +1,7 @@
|
||||
" Language: Rust
|
||||
" Description: Vim ftplugin for Rust
|
||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||
" Maintainer: Kevin Ballard <kevin@sb.org>
|
||||
" Maintainer: Lily Ballard <lily@ballards.net>
|
||||
" Last Change: June 08, 2016
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: sed
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Apr 1
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "sed Script Files (*.sed)\t*.sed\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: TOML
|
||||
" Homepage: https://github.com/cespare/vim-toml
|
||||
" Maintainer: Aman Verma
|
||||
" Author: Kevin Ballard <kevin@sb.org>
|
||||
" Author: Lily Ballard <lily@ballards.net>
|
||||
" Last Change: Sep 21, 2021
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: unison
|
||||
" Maintainer: Anton Parkhomenko <anton@chuwy.me>
|
||||
" Latest Revision: 2023-08-07
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl cms< isk<"
|
||||
|
||||
setlocal commentstring=--\ %s
|
||||
setlocal iskeyword+=!,'
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2023 Feb 07
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zimbu
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Sep 07
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -2,8 +2,9 @@ vim9script
|
||||
|
||||
# Vim support file to switch off loading plugins for file types
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Feb 09
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if exists("g:did_load_ftplugin")
|
||||
unlet g:did_load_ftplugin
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
" The commands in this are executed when the GUI is started, after the vimrc
|
||||
" has been executed.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2016 Apr 05
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
"
|
||||
" To use it, copy it to
|
||||
" for Unix: ~/.gvimrc
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
" Vim support file to switch on loading indent files for file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Feb 11
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if exists("did_indent_on")
|
||||
finish
|
||||
|
||||
@@ -6,15 +6,16 @@ at ":help indent-expression". Looking at the existing files should give you
|
||||
inspiration.
|
||||
|
||||
If you make a new indent file which would be useful for others, please send it
|
||||
to Bram@vim.org. Include instructions for detecting the file type for this
|
||||
language, by file name extension or by checking a few lines in the file.
|
||||
And please stick to the rules below.
|
||||
to the vim-dev mailing list <vim-dev@vim.org>. Include instructions for
|
||||
detecting the file type for this language, by file name extension or by
|
||||
checking a few lines in the file. And please stick to the rules below.
|
||||
|
||||
If you have remarks about an existing file, send them to the maintainer of
|
||||
that file. Only when you get no response send a message to Bram@vim.org.
|
||||
that file. Only when you get no response send a message to the vim-dev
|
||||
mailing list: <vim-dev@vim.org>.
|
||||
|
||||
If you are the maintainer of an indent file and make improvements, e-mail the
|
||||
new version to Bram@vim.org.
|
||||
new version to the vim-dev mailing list: <vim-dev@vim.org>.
|
||||
|
||||
|
||||
Rules for making an indent file:
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: Aap recipe
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Jun 24
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Mar 27
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: C++
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Nov 29
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: CUDA
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Nov 29
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
+11
-1
@@ -27,6 +27,16 @@ if exists("*GetLuaIndent")
|
||||
endif
|
||||
|
||||
function! GetLuaIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return GetLuaIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! GetLuaIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let prevlnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
@@ -41,7 +51,7 @@ function! GetLuaIndent()
|
||||
let prevline = getline(prevlnum)
|
||||
let midx = match(prevline, '^\s*\%(if\>\|for\>\|while\>\|repeat\>\|else\>\|elseif\>\|do\>\|then\>\)')
|
||||
if midx == -1
|
||||
let midx = match(prevline, '{\s*$')
|
||||
let midx = match(prevline, '{\s*\%(--\%([^[].*\)\?\)\?$')
|
||||
if midx == -1
|
||||
let midx = match(prevline, '\<function\>\s*\%(\k\|[.:]\)\{-}\s*(')
|
||||
endif
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
" Vim indent file
|
||||
" Language: Python
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Language: Python
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Original Author: David Bustos <bustos@caltech.edu>
|
||||
" Last Change: 2021 Sep 26
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
" Vim indent file
|
||||
" Language: QML
|
||||
" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
|
||||
" Last Change: 2023 Aug 16
|
||||
"
|
||||
" Improved JavaScript indent script.
|
||||
|
||||
" Indent script in place for this already?
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
let b:undo_indent = "setlocal indentexpr< indentkeys<"
|
||||
|
||||
setlocal indentexpr=s:GetQmlIndent()
|
||||
setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=*/
|
||||
|
||||
" Only define functions once per session
|
||||
if exists("*s:GetQmlIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Clean up a line of code by removing trailing '//' and '/* */' comments, and trimming
|
||||
" whitespace
|
||||
function! s:Trim(line)
|
||||
return substitute(substitute(substitute(a:line, '// .*', '', ''), '/\* .* \*/', '', ''), '^\s*\|\s*$', '', 'g')
|
||||
endfunction
|
||||
|
||||
function! s:GetQmlIndent()
|
||||
let num = v:lnum
|
||||
let line = s:Trim(getline(num))
|
||||
|
||||
let pnum = prevnonblank(num - 1)
|
||||
if pnum == 0
|
||||
return 0
|
||||
endif
|
||||
let pline = s:Trim(getline(pnum))
|
||||
|
||||
let ind = indent(pnum)
|
||||
|
||||
" bracket/brace/paren blocks
|
||||
if pline =~ '[{[(]$'
|
||||
let ind += &sw
|
||||
endif
|
||||
if line =~ '^[}\])]'
|
||||
let ind -= &sw
|
||||
endif
|
||||
|
||||
" '/*' comments
|
||||
if pline =~ '^/\*.*\*/'
|
||||
" no indent for single-line form
|
||||
elseif pline =~ '^/\*'
|
||||
let ind += 1
|
||||
elseif pline =~ '^\*/'
|
||||
let ind -= 1
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
@@ -0,0 +1,255 @@
|
||||
" ABB Rapid Command indent file for Vim
|
||||
" Language: ABB Rapid Command
|
||||
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
|
||||
" Version: 2.2.7
|
||||
" Last Change: 12. May 2023
|
||||
" Credits: Based on indent/vim.vim
|
||||
"
|
||||
" Suggestions of improvement are very welcome. Please email me!
|
||||
"
|
||||
" Known bugs: ../doc/rapid.txt
|
||||
"
|
||||
" TODO
|
||||
" * indent wrapped lines which do not end with an ; or special key word,
|
||||
" maybe this is a better idea, but then () and [] has to be changed as
|
||||
" well
|
||||
"
|
||||
|
||||
if exists("g:rapidNoSpaceIndent")
|
||||
if !exists("g:rapidSpaceIndent")
|
||||
let g:rapidSpaceIndent = !g:rapidNoSpaceIndent
|
||||
endif
|
||||
unlet g:rapidNoSpaceIndent
|
||||
endif
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent") || get(g:,'rapidNoIndent',0)
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nolisp
|
||||
setlocal nosmartindent
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=GetRapidIndent()
|
||||
if get(g:,'rapidNewStyleIndent',0)
|
||||
setlocal indentkeys=!^F,o,O,0=~endmodule,0=~error,0=~undo,0=~backward,0=~endproc,0=~endrecord,0=~endtrap,0=~endfunc,0=~else,0=~endif,0=~endtest,0=~endfor,0=~endwhile,:,<[>,<]>,<(>,<)>
|
||||
else
|
||||
setlocal indentkeys=!^F,o,O,0=~endmodule,0=~error,0=~undo,0=~backward,0=~endproc,0=~endrecord,0=~endtrap,0=~endfunc,0=~else,0=~endif,0=~endtest,0=~endfor,0=~endwhile,:
|
||||
endif
|
||||
let b:undo_indent="setlocal lisp< si< ai< inde< indk<"
|
||||
|
||||
if get(g:,'rapidSpaceIndent',1)
|
||||
" Use spaces for indention, 2 is enough.
|
||||
" More or even tabs wastes space on the teach pendant.
|
||||
setlocal softtabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal expandtab
|
||||
setlocal shiftround
|
||||
let b:undo_indent = b:undo_indent." sts< sw< et< sr<"
|
||||
endif
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRapidIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
function GetRapidIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return s:GetRapidIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function s:GetRapidIndentIntern() abort
|
||||
|
||||
let l:currentLineNum = v:lnum
|
||||
let l:currentLine = getline(l:currentLineNum)
|
||||
|
||||
if l:currentLine =~ '^!' && !get(g:,'rapidCommentIndent',0)
|
||||
" If current line is ! line comment, do not change indent
|
||||
" This may be usefull if code is commented out at the first column.
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Find a non-blank line above the current line.
|
||||
let l:preNoneBlankLineNum = s:RapidPreNoneBlank(v:lnum - 1)
|
||||
if l:preNoneBlankLineNum == 0
|
||||
" At the start of the file use zero indent.
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:preNoneBlankLine = getline(l:preNoneBlankLineNum)
|
||||
let l:ind = indent(l:preNoneBlankLineNum)
|
||||
|
||||
" Define add a 'shiftwidth' pattern
|
||||
let l:addShiftwidthPattern = '\c\v^\s*('
|
||||
let l:addShiftwidthPattern .= '((local|task)\s+)?(module|record|proc|func|trap)\s+\k'
|
||||
let l:addShiftwidthPattern .= '|(backward|error|undo)>'
|
||||
let l:addShiftwidthPattern .= ')'
|
||||
"
|
||||
" Define Subtract 'shiftwidth' pattern
|
||||
let l:subtractShiftwidthPattern = '\c\v^\s*('
|
||||
let l:subtractShiftwidthPattern .= 'end(module|record|proc|func|trap)>'
|
||||
let l:subtractShiftwidthPattern .= '|(backward|error|undo)>'
|
||||
let l:subtractShiftwidthPattern .= ')'
|
||||
|
||||
" Add shiftwidth
|
||||
if l:preNoneBlankLine =~ l:addShiftwidthPattern
|
||||
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "then", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "else", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "do", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "case", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "default", 0)>=0
|
||||
let l:ind += &sw
|
||||
endif
|
||||
|
||||
" Subtract shiftwidth
|
||||
if l:currentLine =~ l:subtractShiftwidthPattern
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "endif", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "endfor", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "endwhile", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "endtest", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "else", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "elseif", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "case", 0)>=0
|
||||
\|| s:RapidLenTilStr(l:currentLineNum, "default", 0)>=0
|
||||
let l:ind = l:ind - &sw
|
||||
endif
|
||||
|
||||
" First case (or default) after a test gets the indent of the test.
|
||||
if (s:RapidLenTilStr(l:currentLineNum, "case", 0)>=0 || s:RapidLenTilStr(l:currentLineNum, "default", 0)>=0) && s:RapidLenTilStr(l:preNoneBlankLineNum, "test", 0)>=0
|
||||
let l:ind += &sw
|
||||
endif
|
||||
|
||||
" continued lines with () or []
|
||||
let l:OpenSum = s:RapidLoneParen(l:preNoneBlankLineNum,"(") + s:RapidLoneParen(l:preNoneBlankLineNum,"[")
|
||||
if get(g:,'rapidNewStyleIndent',0)
|
||||
let l:CloseSum = s:RapidLoneParen(l:preNoneBlankLineNum,")") + s:RapidLoneParen(l:currentLineNum,"]")
|
||||
else
|
||||
let l:CloseSum = s:RapidLoneParen(l:preNoneBlankLineNum,")") + s:RapidLoneParen(l:preNoneBlankLineNum,"]")
|
||||
endif
|
||||
if l:OpenSum > l:CloseSum
|
||||
let l:ind += (l:OpenSum * 4 * &sw)
|
||||
elseif l:OpenSum < l:CloseSum
|
||||
let l:ind -= (l:CloseSum * 4 * &sw)
|
||||
endif
|
||||
|
||||
return l:ind
|
||||
endfunction
|
||||
|
||||
" Returns the length of the line until a:str occur outside a string or
|
||||
" comment. Search starts at string index a:startIdx.
|
||||
" If a:str is a word also add word bounderies and case insesitivity.
|
||||
" Note: rapidTodoComment and rapidDebugComment are not taken into account.
|
||||
function s:RapidLenTilStr(lnum, str, startIdx) abort
|
||||
|
||||
let l:line = getline(a:lnum)
|
||||
let l:len = strlen(l:line)
|
||||
let l:idx = a:startIdx
|
||||
let l:str = a:str
|
||||
if l:str =~ '^\k\+$'
|
||||
let l:str = '\c\<' . l:str . '\>'
|
||||
endif
|
||||
|
||||
while l:len > l:idx
|
||||
let l:idx = match(l:line, l:str, l:idx)
|
||||
if l:idx < 0
|
||||
" a:str not found
|
||||
return -1
|
||||
endif
|
||||
let l:synName = synIDattr(synID(a:lnum,l:idx+1,0),"name")
|
||||
if l:synName != "rapidString"
|
||||
\&& l:synName != "rapidConcealableString"
|
||||
\&& (l:synName != "rapidComment" || l:str =~ '^!')
|
||||
" a:str found outside string or line comment
|
||||
return l:idx
|
||||
endif
|
||||
" a:str is part of string or line comment
|
||||
let l:idx += 1 " continue search for a:str
|
||||
endwhile
|
||||
|
||||
" a:str not found or l:len <= a:startIdx
|
||||
return -1
|
||||
endfunction
|
||||
|
||||
" a:lchar shoud be one of (, ), [, ], { or }
|
||||
" returns the number of opening/closing parenthesise which have no
|
||||
" closing/opening match in getline(a:lnum)
|
||||
function s:RapidLoneParen(lnum,lchar) abort
|
||||
if a:lchar == "(" || a:lchar == ")"
|
||||
let l:opnParChar = "("
|
||||
let l:clsParChar = ")"
|
||||
elseif a:lchar == "[" || a:lchar == "]"
|
||||
let l:opnParChar = "["
|
||||
let l:clsParChar = "]"
|
||||
elseif a:lchar == "{" || a:lchar == "}"
|
||||
let l:opnParChar = "{"
|
||||
let l:clsParChar = "}"
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:line = getline(a:lnum)
|
||||
|
||||
" look for the first ! which is not part of a string
|
||||
let l:len = s:RapidLenTilStr(a:lnum,"!",0)
|
||||
if l:len == 0
|
||||
return 0 " first char is !; ignored
|
||||
endif
|
||||
|
||||
let l:opnParen = 0
|
||||
" count opening brakets
|
||||
let l:i = 0
|
||||
while l:i >= 0
|
||||
let l:i = s:RapidLenTilStr(a:lnum, l:opnParChar, l:i)
|
||||
if l:i >= 0
|
||||
let l:opnParen += 1
|
||||
let l:i += 1
|
||||
endif
|
||||
endwhile
|
||||
|
||||
let l:clsParen = 0
|
||||
" count closing brakets
|
||||
let l:i = 0
|
||||
while l:i >= 0
|
||||
let l:i = s:RapidLenTilStr(a:lnum, l:clsParChar, l:i)
|
||||
if l:i >= 0
|
||||
let l:clsParen += 1
|
||||
let l:i += 1
|
||||
endif
|
||||
endwhile
|
||||
|
||||
if (a:lchar == "(" || a:lchar == "[" || a:lchar == "{") && l:opnParen>l:clsParen
|
||||
return (l:opnParen-l:clsParen)
|
||||
elseif (a:lchar == ")" || a:lchar == "]" || a:lchar == "}") && l:clsParen>l:opnParen
|
||||
return (l:clsParen-l:opnParen)
|
||||
endif
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" This function works almost like prevnonblank() but handles %%%-headers and
|
||||
" comments like blank lines
|
||||
function s:RapidPreNoneBlank(lnum) abort
|
||||
|
||||
let nPreNoneBlank = prevnonblank(a:lnum)
|
||||
|
||||
while nPreNoneBlank>0 && getline(nPreNoneBlank) =~ '\v\c^\s*(\%\%\%|!)'
|
||||
" Previouse none blank line irrelevant. Look further aback.
|
||||
let nPreNoneBlank = prevnonblank(nPreNoneBlank - 1)
|
||||
endwhile
|
||||
|
||||
return nPreNoneBlank
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:sw=2 sts=2 et
|
||||
@@ -132,6 +132,22 @@ function GetRustIndent(lnum)
|
||||
return indent(prevlinenum) + 6
|
||||
endif
|
||||
|
||||
"match newline after struct with generic bound like
|
||||
"struct SomeThing<T>
|
||||
"| <-- newline indent should same as prevline
|
||||
if prevline[len(prevline) - 1] == ">"
|
||||
\ && prevline =~# "\s*struct.*>$"
|
||||
return indent(prevlinenum)
|
||||
endif
|
||||
|
||||
"match newline after where like:
|
||||
"struct SomeThing<T>
|
||||
"where
|
||||
" T: Display,
|
||||
if prevline =~# '^\s*where$'
|
||||
return indent(prevlinenum) + 4
|
||||
endif
|
||||
|
||||
if prevline[len(prevline) - 1] == ","
|
||||
\ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]'
|
||||
\ && prevline !~ '^\s*fn\s'
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
! vim: set ft=rapid :
|
||||
|
||||
! START_INDENT
|
||||
|
||||
%%%
|
||||
VERSION:1
|
||||
LANGUAGE:ENGLISH
|
||||
%%%
|
||||
|
||||
module LowerCaseModule
|
||||
|
||||
task pers num n1 := 0;
|
||||
local pers num n2 := 1;
|
||||
var bool b1 := false;
|
||||
var intnum i1;
|
||||
|
||||
! put some stuff in those strings that may confuse indentation
|
||||
const string st1 := "endmodule (";
|
||||
pers string st_Appl_Info{3,3}:=[
|
||||
[
|
||||
"["
|
||||
,
|
||||
"default"
|
||||
,
|
||||
"case"
|
||||
],
|
||||
[
|
||||
"else"
|
||||
,
|
||||
"then"
|
||||
,
|
||||
"endif"
|
||||
],
|
||||
[
|
||||
"do"
|
||||
,
|
||||
"}"
|
||||
,
|
||||
")"
|
||||
],
|
||||
];
|
||||
|
||||
pers tooldata tTool1:=[TRUE,
|
||||
[
|
||||
[97.4, 0, 223.1],
|
||||
[0.924, 0, 0.383 ,0]
|
||||
],
|
||||
[5,
|
||||
[23, 0, 75],
|
||||
[1, 0, 0, 0], 0, 0, 0
|
||||
]
|
||||
];
|
||||
const robtarget p1:=[
|
||||
[600, 500, 225.3],
|
||||
[1, 0, 0, 0],
|
||||
[1, 1, 0, 0],
|
||||
[ 11, 12.3, 9E9, 9E9, 9E9, 9E9]
|
||||
];
|
||||
|
||||
record myRec
|
||||
num nRecNum1
|
||||
bool bRecBool1
|
||||
endrecord
|
||||
|
||||
proc proc1(num n1,
|
||||
num n2)
|
||||
var string st1;
|
||||
n1 := n1+1;
|
||||
MoveJSync p1, vmax, z30, tool1, "proc2";
|
||||
backward
|
||||
MoveJSync p1, v100, fine, tool1, "proc2";
|
||||
undo
|
||||
n1 := n1-1;
|
||||
error
|
||||
trynext;
|
||||
endproc
|
||||
|
||||
func num nFunc1(
|
||||
switch s1
|
||||
|switch s2
|
||||
,num n1
|
||||
,bool b1)
|
||||
var num nVar;
|
||||
if not Present(s1) return;
|
||||
if Present(s1) then
|
||||
Incr n1;'
|
||||
elseif Present(s2) then
|
||||
b1:=false;
|
||||
else
|
||||
while n1>0 do
|
||||
Decr n1;
|
||||
test n1
|
||||
|
||||
case 1:
|
||||
test1;
|
||||
case 2:
|
||||
test2;
|
||||
default:
|
||||
WaitUntil false;
|
||||
endtest
|
||||
endwhile
|
||||
endif
|
||||
for i from 1 to 10 step 2 do
|
||||
for j from 1 to 10 do
|
||||
st_Appl_Info{i,j} := "";
|
||||
endfor
|
||||
endfor
|
||||
! return 1;
|
||||
return 0;
|
||||
error
|
||||
return -1;
|
||||
endfunc
|
||||
|
||||
trap Trap1
|
||||
Reset do1;
|
||||
endtrap
|
||||
|
||||
endmodule
|
||||
|
||||
MODULE UpperCaseModule(SYSMODULE,NOSTEPIN)
|
||||
TASK pers num n1 := 0;
|
||||
LOCAL pers num n2 := 1;
|
||||
VAR bool b1 := false;
|
||||
VAR intnum i1;
|
||||
|
||||
LOCAL FUNC num nFunc1(
|
||||
switch s1
|
||||
|switch s2
|
||||
,num n1
|
||||
,bool b1)
|
||||
VAR num nVar;
|
||||
IF NOT PRESENT(s1) RETURN;
|
||||
IF PRESENT(s1) THEN
|
||||
INCR n1;'
|
||||
ELSEIF PRESENT(s2) THEN
|
||||
b1:=FALSE;
|
||||
ELSE
|
||||
WHILE n1>0 DO
|
||||
DECR n1;
|
||||
TEST n1
|
||||
|
||||
CASE 1:
|
||||
test1;
|
||||
CASE 2:
|
||||
test2;
|
||||
DEFAULT:
|
||||
WAITUNTIL FALSE;
|
||||
ENDTEST
|
||||
ENDWHILE
|
||||
ENDIF
|
||||
FOR i FROM 1 TO 10 STEP 2 DO
|
||||
FOR j FROM 1 TO 10 DO
|
||||
st_Appl_Info{i,j} := "";
|
||||
ENDFOR
|
||||
ENDFOR
|
||||
! RETURN 1;
|
||||
RETURN 0;
|
||||
ERROR
|
||||
RETURN -1;
|
||||
ENDFUNC
|
||||
|
||||
TRAP Trap1
|
||||
Reset do1;
|
||||
ENDTRAP
|
||||
|
||||
ENDMODULE
|
||||
|
||||
Module MixedCaseModule(SysModule)
|
||||
Task pers num n1 := 0;
|
||||
Local pers num n2 := 1;
|
||||
Var bool b1 := false;
|
||||
Var intnum i1;
|
||||
|
||||
Task Func num nFunc1(
|
||||
switch s1
|
||||
|switch s2
|
||||
,num n1
|
||||
,bool b1)
|
||||
Var num nVar;
|
||||
If Not Present(s1) Return;
|
||||
If Present(s1) Then
|
||||
Incr n1;'
|
||||
ElseIf Present(s2) Then
|
||||
b1:=false;
|
||||
Else
|
||||
While n1>0 Do
|
||||
Decr n1;
|
||||
Test n1
|
||||
|
||||
Case 1:
|
||||
test1;
|
||||
Case 2:
|
||||
test2;
|
||||
Default:
|
||||
WaitUntil false;
|
||||
EndTest
|
||||
EndWhile
|
||||
EndIf
|
||||
For i From 1 To 10 Step 2 Do
|
||||
For j From 1 To 10 Do
|
||||
st_Appl_Info{i,j} := "";
|
||||
EndFor
|
||||
EndFor
|
||||
! Return 1;
|
||||
Return 0;
|
||||
Error
|
||||
Return -1;
|
||||
EndFunc
|
||||
|
||||
Trap Trap1
|
||||
Reset do1;
|
||||
EndTrap
|
||||
|
||||
EndModule
|
||||
|
||||
! END_INDENT
|
||||
|
||||
! START_INDENT
|
||||
! INDENT_EXE let g:rapidSpaceIndent = 0
|
||||
! INDENT_EXE set shiftwidth=4
|
||||
|
||||
proc bla()
|
||||
var num i;
|
||||
Incr i;
|
||||
endproc
|
||||
|
||||
! END_INDENT
|
||||
|
||||
! START_INDENT
|
||||
! INDENT_EXE let g:rapidCommentIndent = 1
|
||||
!
|
||||
proc bla()
|
||||
! indent this first column comment because of g:rapidCommentIndent=1
|
||||
endproc
|
||||
! END_INDENT
|
||||
|
||||
! START_INDENT
|
||||
! INDENT_EXE let g:rapidNewStyleIndent = 1
|
||||
pers string st_Appl_Info{3,3}:=
|
||||
[
|
||||
[
|
||||
"["
|
||||
,
|
||||
"default"
|
||||
,
|
||||
"case"
|
||||
]
|
||||
,
|
||||
[
|
||||
"else"
|
||||
,
|
||||
"then"
|
||||
,
|
||||
"endif"
|
||||
]
|
||||
,
|
||||
[
|
||||
"do"
|
||||
,
|
||||
"}"
|
||||
,
|
||||
")"
|
||||
]
|
||||
,
|
||||
];
|
||||
! END_INDENT
|
||||
@@ -0,0 +1,266 @@
|
||||
! vim: set ft=rapid :
|
||||
|
||||
! START_INDENT
|
||||
|
||||
%%%
|
||||
VERSION:1
|
||||
LANGUAGE:ENGLISH
|
||||
%%%
|
||||
|
||||
module LowerCaseModule
|
||||
|
||||
task pers num n1 := 0;
|
||||
local pers num n2 := 1;
|
||||
var bool b1 := false;
|
||||
var intnum i1;
|
||||
|
||||
! put some stuff in those strings that may confuse indentation
|
||||
const string st1 := "endmodule (";
|
||||
pers string st_Appl_Info{3,3}:=[
|
||||
[
|
||||
"["
|
||||
,
|
||||
"default"
|
||||
,
|
||||
"case"
|
||||
],
|
||||
[
|
||||
"else"
|
||||
,
|
||||
"then"
|
||||
,
|
||||
"endif"
|
||||
],
|
||||
[
|
||||
"do"
|
||||
,
|
||||
"}"
|
||||
,
|
||||
")"
|
||||
],
|
||||
];
|
||||
|
||||
pers tooldata tTool1:=[TRUE,
|
||||
[
|
||||
[97.4, 0, 223.1],
|
||||
[0.924, 0, 0.383 ,0]
|
||||
],
|
||||
[5,
|
||||
[23, 0, 75],
|
||||
[1, 0, 0, 0], 0, 0, 0
|
||||
]
|
||||
];
|
||||
const robtarget p1:=[
|
||||
[600, 500, 225.3],
|
||||
[1, 0, 0, 0],
|
||||
[1, 1, 0, 0],
|
||||
[ 11, 12.3, 9E9, 9E9, 9E9, 9E9]
|
||||
];
|
||||
|
||||
record myRec
|
||||
num nRecNum1
|
||||
bool bRecBool1
|
||||
endrecord
|
||||
|
||||
proc proc1(num n1,
|
||||
num n2)
|
||||
var string st1;
|
||||
n1 := n1+1;
|
||||
MoveJSync p1, vmax, z30, tool1, "proc2";
|
||||
backward
|
||||
MoveJSync p1, v100, fine, tool1, "proc2";
|
||||
undo
|
||||
n1 := n1-1;
|
||||
error
|
||||
trynext;
|
||||
endproc
|
||||
|
||||
func num nFunc1(
|
||||
switch s1
|
||||
|switch s2
|
||||
,num n1
|
||||
,bool b1)
|
||||
var num nVar;
|
||||
if not Present(s1) return;
|
||||
if Present(s1) then
|
||||
Incr n1;'
|
||||
elseif Present(s2) then
|
||||
b1:=false;
|
||||
else
|
||||
while n1>0 do
|
||||
Decr n1;
|
||||
test n1
|
||||
|
||||
case 1:
|
||||
test1;
|
||||
case 2:
|
||||
test2;
|
||||
default:
|
||||
WaitUntil false;
|
||||
endtest
|
||||
endwhile
|
||||
endif
|
||||
for i from 1 to 10 step 2 do
|
||||
for j from 1 to 10 do
|
||||
st_Appl_Info{i,j} := "";
|
||||
endfor
|
||||
endfor
|
||||
! return 1;
|
||||
return 0;
|
||||
error
|
||||
return -1;
|
||||
endfunc
|
||||
|
||||
trap Trap1
|
||||
Reset do1;
|
||||
endtrap
|
||||
|
||||
endmodule
|
||||
|
||||
MODULE UpperCaseModule(SYSMODULE,NOSTEPIN)
|
||||
TASK pers num n1 := 0;
|
||||
LOCAL pers num n2 := 1;
|
||||
VAR bool b1 := false;
|
||||
VAR intnum i1;
|
||||
|
||||
LOCAL FUNC num nFunc1(
|
||||
switch s1
|
||||
|switch s2
|
||||
,num n1
|
||||
,bool b1)
|
||||
VAR num nVar;
|
||||
IF NOT PRESENT(s1) RETURN;
|
||||
IF PRESENT(s1) THEN
|
||||
INCR n1;'
|
||||
ELSEIF PRESENT(s2) THEN
|
||||
b1:=FALSE;
|
||||
ELSE
|
||||
WHILE n1>0 DO
|
||||
DECR n1;
|
||||
TEST n1
|
||||
|
||||
CASE 1:
|
||||
test1;
|
||||
CASE 2:
|
||||
test2;
|
||||
DEFAULT:
|
||||
WAITUNTIL FALSE;
|
||||
ENDTEST
|
||||
ENDWHILE
|
||||
ENDIF
|
||||
FOR i FROM 1 TO 10 STEP 2 DO
|
||||
FOR j FROM 1 TO 10 DO
|
||||
st_Appl_Info{i,j} := "";
|
||||
ENDFOR
|
||||
ENDFOR
|
||||
! RETURN 1;
|
||||
RETURN 0;
|
||||
ERROR
|
||||
RETURN -1;
|
||||
ENDFUNC
|
||||
|
||||
TRAP Trap1
|
||||
Reset do1;
|
||||
ENDTRAP
|
||||
|
||||
ENDMODULE
|
||||
|
||||
Module MixedCaseModule(SysModule)
|
||||
Task pers num n1 := 0;
|
||||
Local pers num n2 := 1;
|
||||
Var bool b1 := false;
|
||||
Var intnum i1;
|
||||
|
||||
Task Func num nFunc1(
|
||||
switch s1
|
||||
|switch s2
|
||||
,num n1
|
||||
,bool b1)
|
||||
Var num nVar;
|
||||
If Not Present(s1) Return;
|
||||
If Present(s1) Then
|
||||
Incr n1;'
|
||||
ElseIf Present(s2) Then
|
||||
b1:=false;
|
||||
Else
|
||||
While n1>0 Do
|
||||
Decr n1;
|
||||
Test n1
|
||||
|
||||
Case 1:
|
||||
test1;
|
||||
Case 2:
|
||||
test2;
|
||||
Default:
|
||||
WaitUntil false;
|
||||
EndTest
|
||||
EndWhile
|
||||
EndIf
|
||||
For i From 1 To 10 Step 2 Do
|
||||
For j From 1 To 10 Do
|
||||
st_Appl_Info{i,j} := "";
|
||||
EndFor
|
||||
EndFor
|
||||
! Return 1;
|
||||
Return 0;
|
||||
Error
|
||||
Return -1;
|
||||
EndFunc
|
||||
|
||||
Trap Trap1
|
||||
Reset do1;
|
||||
EndTrap
|
||||
|
||||
EndModule
|
||||
|
||||
! END_INDENT
|
||||
|
||||
! START_INDENT
|
||||
! INDENT_EXE let g:rapidSpaceIndent = 0
|
||||
! INDENT_EXE set shiftwidth=4
|
||||
|
||||
proc bla()
|
||||
var num i;
|
||||
Incr i;
|
||||
endproc
|
||||
|
||||
! END_INDENT
|
||||
|
||||
! START_INDENT
|
||||
! INDENT_EXE let g:rapidCommentIndent = 1
|
||||
!
|
||||
proc bla()
|
||||
! indent this first column comment because of g:rapidCommentIndent=1
|
||||
endproc
|
||||
! END_INDENT
|
||||
|
||||
! START_INDENT
|
||||
! INDENT_EXE let g:rapidNewStyleIndent = 1
|
||||
pers string st_Appl_Info{3,3}:=
|
||||
[
|
||||
[
|
||||
"["
|
||||
,
|
||||
"default"
|
||||
,
|
||||
"case"
|
||||
]
|
||||
,
|
||||
[
|
||||
"else"
|
||||
,
|
||||
"then"
|
||||
,
|
||||
"endif"
|
||||
]
|
||||
,
|
||||
[
|
||||
"do"
|
||||
,
|
||||
"}"
|
||||
,
|
||||
")"
|
||||
]
|
||||
,
|
||||
];
|
||||
! END_INDENT
|
||||
@@ -483,6 +483,13 @@ endif
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
var d = {
|
||||
end: 0}
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
nunmap <buffer> (
|
||||
nunmap <buffer> )
|
||||
|
||||
@@ -483,6 +483,13 @@ if true
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
var d = {
|
||||
end: 0}
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
nunmap <buffer> (
|
||||
nunmap <buffer> )
|
||||
|
||||
@@ -2,8 +2,9 @@ vim9script
|
||||
|
||||
# Vim indent file
|
||||
# Language: Vim script
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2023 Feb 02
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: XHTML
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org> (for now)
|
||||
" Last Change: 2005 Jun 24
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: Zimbu
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Sep 26
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
" Vim support file to switch off loading indent files for file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2001 Jun 11
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
if exists("did_indent_on")
|
||||
unlet did_indent_on
|
||||
|
||||
@@ -1,54 +1,140 @@
|
||||
" Vim Keymap file for Russian characters
|
||||
" layout English-US standard 104 key 'QWERTY', 'JCUKEN'
|
||||
" layout English-US 104 key 'QWERTY'
|
||||
"
|
||||
" Maintainer: Restorer <restorers@users.sourceforge.net>
|
||||
" Last Changed: 20 Jan 2019
|
||||
" Description: Раскладка сделана на основе раскладки «русская машинопись»
|
||||
" (KBDRU1.DLL), поставляемой в составе ОС MS Windows. Эта раскладка позволяет
|
||||
" печать практически все знаки препинания используя цифровой ряд и не требуя при
|
||||
" этом нажатия дополнительных клавиш, ну и также удобное расположение буквы «Ё».
|
||||
" Однако были внесены некоторые дополнения (улучшения?), в частности:
|
||||
" ‐ раздельные символы круглых скобок (), расположены на тех же позициях, что и
|
||||
" в US-International;
|
||||
" ‐ раздельные символы типографских кавычек «», расположены на клавишах «3» и
|
||||
" «4» соответственно;
|
||||
" ‐ на этих же клавишах находятся внутренние кавычки “лапки”, набираемые при
|
||||
" нажатой клавише «ALT»;
|
||||
" ‐ возможность набирать символы, отсутствующие в русской раскладке клавиатуры,
|
||||
" а именно @#$^&*{}[]"'`~<>, которые расположены на тех же местах, что и раньше.
|
||||
" Для этого не требуется переключаться в латинскую раскладку клавиатуры, а
|
||||
" оставаясь в русской, использовать для этого дополнительные клавиши «SHIFT» и
|
||||
" «ALT»;
|
||||
" ‐ и ещё несколько удобств, которые позволяют быстро и с минимальными усилиями
|
||||
" набирать текст.
|
||||
" Maintainer: Restorer <restorer@mail2k.ru>
|
||||
" Last Changed: 25 Apr 2023
|
||||
" Version: 3.3
|
||||
" Description: описание дано после изображений клавиатуры
|
||||
|
||||
scriptencoding utf-8
|
||||
" Расположение символов для русского языка при подключенном файле с раскладкой
|
||||
" клавиатуры «русская типографская» (russian-typograph.vim). Версия 3.3
|
||||
|
||||
" Переключение языка ввода со стандартного сочетания <CTRL+^> на указанные ниже
|
||||
" Для режимов вставки и замены
|
||||
""или SHIFT+SPACE
|
||||
" inoremap <S-Space> <C-^>
|
||||
""или CTRL+SPACE"
|
||||
" inoremap <C-Space> <C-^>
|
||||
" Для режима командной строки
|
||||
""или SHIFT+SPACE
|
||||
" cnoremap <S-Space> <C-^>
|
||||
""или CTRL+SPACE"
|
||||
" cnoremap <C-Space> <C-^>
|
||||
" Одной командой для режимов вставки, замены и командной строки
|
||||
" noremap! <S-Space> <C-^>
|
||||
" noremap! <C-Space> <C-^>
|
||||
|
||||
" Ни одна из клавиш модификаторов не нажата
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | % | ! | — | « | » | : | , | . | ? | ( | ) | ‐ | ; | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | й | ц | у | к | е | н | г | ш | щ | з | х | ъ | / |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | ф | ы | в | а | п | р | о | л | д | ж | э | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | Shift | я | ч | с | м | и | т | ь | б | ю | ё | Shift |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | Ctrl | | Alt | | Alt | | Ctrl |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Нажата клавиша SHIFT
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | Й | Ц | У | К | Е | Н | Г | Ш | Щ | З | Х | Ъ | § |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | Ф | Ы | В | А | П | Р | О | Л | Д | Ж | Э | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | SHIFT | Я | Ч | С | М | И | Т | Ь | Б | Ю | Ё | SHIFT |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | Ctrl | | Alt | | Alt | | Ctrl |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Нажата клавиша ALT
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | ` | № | – | „ | “ | | | … | | | | ‑ | ± | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | | | | | | | | | | | [ | ] | \ |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | | | | | | ₽ | | | | | ' | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | Shift | | | | | | | | | | | Shift |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | Ctrl | | ALT | NNBSP | ALT | | Ctrl |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Нажаты клавиши SHIFT и ALT
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | ~ | | @ | # | $ | | ^ | & | * | | | _ | | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | | | | | | | | | | | { | } | | |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | | | | | | | | | | | " | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | SHIFT | | | | | | | | < | > | | SHIFT |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | Ctrl | | ALT | | ALT | | Ctrl |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Нажаты клавиши SHIFT и CTRL
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | | | | | | | | | | | | | | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | | | | | | | | | | | | | |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | | | | | | | | | | | | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | SHIFT | | | | | | | | | | | SHIFT |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | CTRL | | Alt | NBSP | Alt | | CTRL |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Нажаты клавиши ALT и CTRL
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | | | | | | | | | | | | | | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | | | у́ | | е́ | | | | | | | | |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | | ы́ | | а́ | | | о́ | | | | э́ | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | Shift | я́ | | | | и́ | | | | ю́ | | Shift |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | CTRL | | ALT | | ALT | | CTRL |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Нажаты клавиши SHIFT, ALT и CTRL
|
||||
|
||||
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|
||||
" | | | | | | | | | | | | | | <--- |
|
||||
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
|
||||
" | ->| | | | У́ | | Е́ | | | | | | | | |
|
||||
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
|
||||
" | Caps | | Ы́ | | А́ | | | О́ | | | | Э́ | Enter |
|
||||
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
|
||||
" | SHIFT | Я́ | | | | И́ | | | | Ю́ | | SHIFT |
|
||||
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
|
||||
" | CTRL | | ALT | | ALT | | CTRL |
|
||||
" '------' '-----'--------------------------'------' '------'
|
||||
|
||||
|
||||
" Раскладка сделана на основе раскладки «русская машинопись» (KBDRU1.DLL),
|
||||
" поставляемой в составе ОС MS Windows.
|
||||
"
|
||||
" Стандартное переключение по CTRL+^ после этих переназначений также сохраняется
|
||||
" Как видите, принцип достаточно простой, — при наборе русского текста все
|
||||
" буквы, знаки пунктуации и большинство специальных символов находятся под
|
||||
" пальцами и их набор не требует нажатия каких-то дополнительных клавиш. При
|
||||
" наборе символов, которые отсутствуют в русской раскладке, но есть в раскладке
|
||||
" US-International, требуется нажать или клавишу <ALT>, если в английской
|
||||
" раскладке они набираются без модификаторов, или нажать <ALT>+<SHIFT>, если они
|
||||
" набираются с модификатором <SHIFT>.
|
||||
|
||||
" scriptencoding utf-8
|
||||
|
||||
let b:keymap_name ="RUS"
|
||||
|
||||
loadkeymap
|
||||
|
||||
" DIGITAL ROW
|
||||
" DIGITAL ROW
|
||||
|
||||
" The Shift key is not pressed
|
||||
"
|
||||
" None of the modifier keys are pressed
|
||||
<char-0x0060> <char-0x0025> " PERCENT SIGN
|
||||
<char-0x0031> <char-0x0021> " EXCLAMATION MARK
|
||||
<char-0x0032> <char-0x2014> " EM DASH
|
||||
@@ -63,8 +149,7 @@ loadkeymap
|
||||
<char-0x002d> <char-0x2010> " HYPHEN
|
||||
<char-0x003d> <char-0x003b> " SEMICOLON
|
||||
|
||||
" The Shift key is pressed
|
||||
|
||||
" The SHIFT key is pressed
|
||||
<char-0x007e> <char-0x003d> " EQUALS SIGN
|
||||
<char-0x0021> <char-0x0031> " DIGIT ONE
|
||||
<char-0x0040> <char-0x0032> " DIGIT TWO
|
||||
@@ -79,112 +164,188 @@ loadkeymap
|
||||
<char-0x005f> <char-0x002d> " HYPHEN-MINUS
|
||||
<char-0x002b> <char-0x002b> " PLUS SIGN
|
||||
|
||||
" ALPHABETICAL 1st ROW
|
||||
|
||||
<char-0x0071> <char-0x0439> " CYRILLIC SMALL LETTER SHORT I
|
||||
<char-0x0051> <char-0x0419> " CYRILLIC CAPITAL LETTER SHORT I
|
||||
<char-0x0077> <char-0x0446> " CYRILLIC SMALL LETTER TSE
|
||||
<char-0x0057> <char-0x0426> " CYRILLIC CAPITAL LETTER TSE
|
||||
<char-0x0065> <char-0x0443> " CYRILLIC SMALL LETTER U
|
||||
<char-0x0045> <char-0x0423> " CYRILLIC CAPITAL LETTER U
|
||||
<char-0x0072> <char-0x043a> " CYRILLIC SMALL LETTER KA
|
||||
<char-0x0052> <char-0x041a> " CYRILLIC CAPITAL LETTER KA
|
||||
<char-0x0074> <char-0x0435> " CYRILLIC SMALL LETTER IE
|
||||
<char-0x0054> <char-0x0415> " CYRILLIC CAPITAL LETTER IE
|
||||
<char-0x0079> <char-0x043d> " CYRILLIC SMALL LETTER EN
|
||||
<char-0x0059> <char-0x041d> " CYRILLIC CAPITAL LETTER EN
|
||||
<char-0x0075> <char-0x0433> " CYRILLIC SMALL LETTER GHE
|
||||
<char-0x0055> <char-0x0413> " CYRILLIC CAPITAL LETTER GHE
|
||||
<char-0x0069> <char-0x0448> " CYRILLIC SMALL LETTER SHA
|
||||
<char-0x0049> <char-0x0428> " CYRILLIC CAPITAL LETTER SHA
|
||||
<char-0x006f> <char-0x0449> " CYRILLIC SMALL LETTER SHCHA
|
||||
<char-0x004f> <char-0x0429> " CYRILLIC CAPITAL LETTER SHCHA
|
||||
<char-0x0070> <char-0x0437> " CYRILLIC SMALL LETTER ZE
|
||||
<char-0x0050> <char-0x0417> " CYRILLIC CAPITAL LETTER ZE
|
||||
<char-0x005b> <char-0x0445> " CYRILLIC SMALL LETTER HA
|
||||
<char-0x007b> <char-0x0425> " CYRILLIC CAPITAL LETTER HA
|
||||
<char-0x005d> <char-0x044a> " CYRILLIC SMALL LETTER HARD SIGN
|
||||
<char-0x007d> <char-0x042a> " CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
|
||||
" ALPHABETIC 2nd ROW
|
||||
|
||||
<char-0x0061> <char-0x0444> " CYRILLIC SMALL LETTER EF
|
||||
<char-0x0041> <char-0x0424> " CYRILLIC CAPITAL LETTER EF
|
||||
<char-0x0073> <char-0x044b> " CYRILLIC SMALL LETTER YERU
|
||||
<char-0x0053> <char-0x042b> " CYRILLIC CAPITAL LETTER YERU
|
||||
<char-0x0064> <char-0x0432> " CYRILLIC SMALL LETTER VE
|
||||
<char-0x0044> <char-0x0412> " CYRILLIC CAPITAL LETTER VE
|
||||
<char-0x0066> <char-0x0430> " CYRILLIC SMALL LETTER A
|
||||
<char-0x0046> <char-0x0410> " CYRILLIC CAPITAL LETTER A
|
||||
<char-0x0067> <char-0x043f> " CYRILLIC SMALL LETTER PE
|
||||
<char-0x0047> <char-0x041f> " CYRILLIC CAPITAL LETTER PE
|
||||
<char-0x0068> <char-0x0440> " CYRILLIC SMALL LETTER ER
|
||||
<char-0x0048> <char-0x0420> " CYRILLIC CAPITAL LETTER ER
|
||||
<char-0x006a> <char-0x043e> " CYRILLIC SMALL LETTER O
|
||||
<char-0x004a> <char-0x041e> " CYRILLIC CAPITAL LETTER O
|
||||
<char-0x006b> <char-0x043b> " CYRILLIC SMALL LETTER EL
|
||||
<char-0x004b> <char-0x041b> " CYRILLIC CAPITAL LETTER EL
|
||||
<char-0x006c> <char-0x0434> " CYRILLIC SMALL LETTER DE
|
||||
<char-0x004c> <char-0x0414> " CYRILLIC CAPITAL LETTER DE
|
||||
<char-0x003b> <char-0x0436> " CYRILLIC SMALL LETTER ZHE
|
||||
<char-0x003a> <char-0x0416> " CYRILLIC CAPITAL LETTER ZHE
|
||||
<char-0x0027> <char-0x044d> " CYRILLIC SMALL LETTER E
|
||||
<char-0x0022> <char-0x042d> " CYRILLIC CAPITAL LETTER E
|
||||
|
||||
" ALPHABETIC 3rd ROW
|
||||
|
||||
<char-0x007a> <char-0x044f> " CYRILLIC SMALL LETTER YA
|
||||
<char-0x005a> <char-0x042f> " CYRILLIC CAPITAL LETTER YA
|
||||
<char-0x0078> <char-0x0447> " CYRILLIC SMALL LETTER CHE
|
||||
<char-0x0058> <char-0x0427> " CYRILLIC CAPITAL LETTER CHE
|
||||
<char-0x0063> <char-0x0441> " CYRILLIC SMALL LETTER ES
|
||||
<char-0x0043> <char-0x0421> " CYRILLIC CAPITAL LETTER ES
|
||||
<char-0x0076> <char-0x043c> " CYRILLIC SMALL LETTER EM
|
||||
<char-0x0056> <char-0x041c> " CYRILLIC CAPITAL LETTER EM
|
||||
<char-0x0062> <char-0x0438> " CYRILLIC SMALL LETTER I
|
||||
<char-0x0042> <char-0x0418> " CYRILLIC CAPITAL LETTER I
|
||||
<char-0x006e> <char-0x0442> " CYRILLIC SMALL LETTER TE
|
||||
<char-0x004e> <char-0x0422> " CYRILLIC CAPITAL LETTER TE
|
||||
<char-0x006d> <char-0x044c> " CYRILLIC SMALL LETTER SOFT SIGN
|
||||
<char-0x004d> <char-0x042c> " CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
<char-0x002c> <char-0x0431> " CYRILLIC SMALL LETTER BE
|
||||
<char-0x003c> <char-0x0411> " CYRILLIC CAPITAL LETTER BE
|
||||
<char-0x002e> <char-0x044e> " CYRILLIC SMALL LETTER YU
|
||||
<char-0x003e> <char-0x042e> " CYRILLIC CAPITAL LETTER YU
|
||||
<char-0x002f> <char-0x0451> " CYRILLIC SMALL LETTER IO
|
||||
<char-0x003f> <char-0x0401> " CYRILLIC CAPITAL LETTER IO
|
||||
|
||||
" VK_OEM_5 key (scan code 2b)
|
||||
|
||||
" The Shift key is not pressed
|
||||
<char-0x005c> <char-0x002f> " SOLIDUS
|
||||
" The Shift key is pressed
|
||||
<char-0x007c> <char-0x005c> " REVERSE SOLIDUS
|
||||
|
||||
" Alt key pressed
|
||||
|
||||
" The ALT key pressed
|
||||
<A-char-0x0060> <char-0x0060> " GRAVE ACCENT
|
||||
<A-char-0x0031> <char-0x2116> " NUMERO SIGN
|
||||
<A-char-0x0033> <char-0x201c> " LEFT DOUBLE QUOTATION MARK
|
||||
<A-char-0x0034> <char-0x201d> " RIGHT DOUBLE QUOTATION MARK
|
||||
<A-char-0x0032> <char-0x2013> " EN DASH
|
||||
<A-char-0x0033> <char-0x201e> " DOUBLE LOW-9 QUOTATION MARK
|
||||
<A-char-0x0034> <char-0x201c> " LEFT DOUBLE QUOTATION MARK
|
||||
<A-char-0x0037> <char-0x2026> " HORIZONTAL ELLIPSIS
|
||||
<A-char-0x002d> <char-0x2011> " NON-BREAKING HYPHEN
|
||||
<A-char-0x003d> <char-0x00b1> " PLUS-MINUS SIGN
|
||||
|
||||
" The SHIFT and ALT keys pressed
|
||||
<A-char-0x007e> <char-0x007e> " TILDE
|
||||
<A-char-0x0040> <char-0x0040> " COMMERCIAL AT
|
||||
<A-char-0x0023> <char-0x0023> " NUMBER SIGN
|
||||
<A-char-0x0024> <char-0x0024> " DOLLAR SIGN
|
||||
<A-char-0x005e> <char-0x005e> " CIRCUMFLEX ACCENT
|
||||
<A-char-0x0026> <char-0x0026> " AMPERSAND
|
||||
<A-char-0x002a> <char-0x002a> " ASTERISK
|
||||
<A-char-0x005f> <char-0x005f> " LOW LINE
|
||||
|
||||
|
||||
" ALPHABETICAL 1st ROW
|
||||
|
||||
" None of the modifier keys are pressed
|
||||
<char-0x0071> <char-0x0439> " CYRILLIC SMALL LETTER SHORT I
|
||||
<char-0x0077> <char-0x0446> " CYRILLIC SMALL LETTER TSE
|
||||
<char-0x0065> <char-0x0443> " CYRILLIC SMALL LETTER U
|
||||
<char-0x0072> <char-0x043a> " CYRILLIC SMALL LETTER KA
|
||||
<char-0x0074> <char-0x0435> " CYRILLIC SMALL LETTER IE
|
||||
<char-0x0079> <char-0x043d> " CYRILLIC SMALL LETTER EN
|
||||
<char-0x0075> <char-0x0433> " CYRILLIC SMALL LETTER GHE
|
||||
<char-0x0069> <char-0x0448> " CYRILLIC SMALL LETTER SHA
|
||||
<char-0x006f> <char-0x0449> " CYRILLIC SMALL LETTER SHCHA
|
||||
<char-0x0070> <char-0x0437> " CYRILLIC SMALL LETTER ZE
|
||||
<char-0x005b> <char-0x0445> " CYRILLIC SMALL LETTER HA
|
||||
<char-0x005d> <char-0x044a> " CYRILLIC SMALL LETTER HARD SIGN
|
||||
|
||||
" The SHIFT key is pressed
|
||||
<char-0x0051> <char-0x0419> " CYRILLIC CAPITAL LETTER SHORT I
|
||||
<char-0x0057> <char-0x0426> " CYRILLIC CAPITAL LETTER TSE
|
||||
<char-0x0045> <char-0x0423> " CYRILLIC CAPITAL LETTER U
|
||||
<char-0x0052> <char-0x041a> " CYRILLIC CAPITAL LETTER KA
|
||||
<char-0x0054> <char-0x0415> " CYRILLIC CAPITAL LETTER IE
|
||||
<char-0x0059> <char-0x041d> " CYRILLIC CAPITAL LETTER EN
|
||||
<char-0x0055> <char-0x0413> " CYRILLIC CAPITAL LETTER GHE
|
||||
<char-0x0049> <char-0x0428> " CYRILLIC CAPITAL LETTER SHA
|
||||
<char-0x004f> <char-0x0429> " CYRILLIC CAPITAL LETTER SHCHA
|
||||
<char-0x0050> <char-0x0417> " CYRILLIC CAPITAL LETTER ZE
|
||||
<char-0x007b> <char-0x0425> " CYRILLIC CAPITAL LETTER HA
|
||||
<char-0x007d> <char-0x042a> " CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
|
||||
" The ALT key pressed
|
||||
<A-char-0x005b> <char-0x005b> " LEFT SQUARE BRACKET
|
||||
<A-char-0x005d> <char-0x005d> " RIGHT SQUARE BRACKET
|
||||
<A-char-0x0027> <char-0x0027> " APOSTROPHE
|
||||
|
||||
" Alt and Shift keys pressed
|
||||
|
||||
<A-char-0x007e> <char-0x007e> " TILDE
|
||||
<A-char-0x0040> <char-0x0040> " COMMERCIAL AT
|
||||
<A-char-0x0023> <char-0x0023> " NUMBER SIGN
|
||||
<A-char-0x0024> <char-0x0024> " DOLLAR SIGN
|
||||
<A-char-0x005e> <char-0x005e> " CIRCUMFLEX ACCENT
|
||||
<A-char-0x0026> <char-0x0026> " AMPERSAND
|
||||
<A-char-0x002a> <char-0x002a> " ASTERISK
|
||||
<A-char-0x005f> <char-0x005f> " LOW LINE
|
||||
" The SHIFT and ALT keys pressed
|
||||
<A-char-0x007b> <char-0x007b> " LEFT CURLY BRACKET
|
||||
<A-char-0x007d> <char-0x007d> " RIGHT CURLY BRACKET
|
||||
|
||||
" The ALT and CTRL key pressed
|
||||
<A-C-char-0x0065> <char-0x0443><char-0x0301> " CYRILLIC SMALL LETTER U with COMBINING ACUTE ACCENT
|
||||
<A-C-char-0x0074> <char-0x0435><char-0x0301> " CYRILLIC SMALL LETTER IE with COMBINING ACUTE ACCENT
|
||||
|
||||
" The SHIFT and ALT and CTRL keys pressed
|
||||
<S-A-C-char-0x0045> <char-0x0423><char-0x0301> " CYRILLIC CAPITAL LETTER U with COMBINING ACUTE ACCENT
|
||||
<S-A-C-char-0x0054> <char-0x0415><char-0x0301> " CYRILLIC CAPITAL LETTER IE with COMBINING ACUTE ACCENT
|
||||
|
||||
|
||||
" ALPHABETIC 2st ROW
|
||||
|
||||
" None of the modifier keys are pressed
|
||||
<char-0x0061> <char-0x0444> " CYRILLIC SMALL LETTER EF
|
||||
<char-0x0073> <char-0x044b> " CYRILLIC SMALL LETTER YERU
|
||||
<char-0x0064> <char-0x0432> " CYRILLIC SMALL LETTER VE
|
||||
<char-0x0066> <char-0x0430> " CYRILLIC SMALL LETTER A
|
||||
<char-0x0067> <char-0x043f> " CYRILLIC SMALL LETTER PE
|
||||
<char-0x0068> <char-0x0440> " CYRILLIC SMALL LETTER ER
|
||||
<char-0x006a> <char-0x043e> " CYRILLIC SMALL LETTER O
|
||||
<char-0x006b> <char-0x043b> " CYRILLIC SMALL LETTER EL
|
||||
<char-0x006c> <char-0x0434> " CYRILLIC SMALL LETTER DE
|
||||
<char-0x003b> <char-0x0436> " CYRILLIC SMALL LETTER ZHE
|
||||
<char-0x0027> <char-0x044d> " CYRILLIC SMALL LETTER E
|
||||
|
||||
" The SHIFT key is pressed
|
||||
<char-0x0041> <char-0x0424> " CYRILLIC CAPITAL LETTER EF
|
||||
<char-0x0053> <char-0x042b> " CYRILLIC CAPITAL LETTER YERU
|
||||
<char-0x0044> <char-0x0412> " CYRILLIC CAPITAL LETTER VE
|
||||
<char-0x0046> <char-0x0410> " CYRILLIC CAPITAL LETTER A
|
||||
<char-0x0047> <char-0x041f> " CYRILLIC CAPITAL LETTER PE
|
||||
<char-0x0048> <char-0x0420> " CYRILLIC CAPITAL LETTER ER
|
||||
<char-0x004a> <char-0x041e> " CYRILLIC CAPITAL LETTER O
|
||||
<char-0x004b> <char-0x041b> " CYRILLIC CAPITAL LETTER EL
|
||||
<char-0x004c> <char-0x0414> " CYRILLIC CAPITAL LETTER DE
|
||||
<char-0x003a> <char-0x0416> " CYRILLIC CAPITAL LETTER ZHE
|
||||
<char-0x0022> <char-0x042d> " CYRILLIC CAPITAL LETTER E
|
||||
|
||||
" The ALT key pressed
|
||||
<A-char-0x0027> <char-0x0027> " APOSTROPHE
|
||||
<A-char-0x0068> <char-0x20bd> " RUBLE SIGN
|
||||
|
||||
" The SHIFT and ALT keys pressed
|
||||
<A-char-0x0022> <char-0x0022> " QUOTATION MARK
|
||||
|
||||
" The ALT and CTRL key pressed
|
||||
<A-C-char-0x0073> <char-0x044b><char-0x0301> " CYRILLIC SMALL LETTER YERU with COMBINING ACUTE ACCENT
|
||||
<A-C-char-0x0066> <char-0x0430><char-0x0301> " CYRILLIC SMALL LETTER A with COMBINING ACUTE ACCENT
|
||||
<A-C-char-0x006a> <char-0x043e><char-0x0301> " CYRILLIC SMALL LETTER O with COMBINING ACUTE ACCENT
|
||||
<A-C-char-0x0027> <char-0x044d><char-0x0301> " CYRILLIC SMALL LETTER E with COMBINING ACUTE ACCENT
|
||||
|
||||
" The SHIFT and ALT and CTRL keys pressed
|
||||
<S-A-C-char-0x0053> <char-0x042b><char-0x0301> " CYRILLIC CAPITAL LETTER YERU with COMBINING ACUTE ACCENT
|
||||
<S-A-C-char-0x0046> <char-0x0410><char-0x0301> " CYRILLIC CAPITAL LETTER A with COMBINING ACUTE ACCENT
|
||||
<S-A-C-char-0x004a> <char-0x041e><char-0x0301> " CYRILLIC CAPITAL LETTER O with COMBINING ACUTE ACCENT
|
||||
<S-A-C-char-0x0022> <char-0x042d><char-0x0301> " CYRILLIC CAPITAL LETTER E with COMBINING ACUTE ACCENT
|
||||
|
||||
|
||||
" ALPHABETIC 3st ROW
|
||||
|
||||
" None of the modifier keys are pressed
|
||||
<char-0x007a> <char-0x044f> " CYRILLIC SMALL LETTER YA
|
||||
<char-0x0078> <char-0x0447> " CYRILLIC SMALL LETTER CHE
|
||||
<char-0x0063> <char-0x0441> " CYRILLIC SMALL LETTER ES
|
||||
<char-0x0076> <char-0x043c> " CYRILLIC SMALL LETTER EM
|
||||
<char-0x0062> <char-0x0438> " CYRILLIC SMALL LETTER I
|
||||
<char-0x006e> <char-0x0442> " CYRILLIC SMALL LETTER TE
|
||||
<char-0x006d> <char-0x044c> " CYRILLIC SMALL LETTER SOFT SIGN
|
||||
<char-0x002c> <char-0x0431> " CYRILLIC SMALL LETTER BE
|
||||
<char-0x002e> <char-0x044e> " CYRILLIC SMALL LETTER YU
|
||||
<char-0x002f> <char-0x0451> " CYRILLIC SMALL LETTER IO
|
||||
|
||||
" The SHIFT key is pressed
|
||||
<char-0x005a> <char-0x042f> " CYRILLIC CAPITAL LETTER YA
|
||||
<char-0x0058> <char-0x0427> " CYRILLIC CAPITAL LETTER CHE
|
||||
<char-0x0043> <char-0x0421> " CYRILLIC CAPITAL LETTER ES
|
||||
<char-0x0056> <char-0x041c> " CYRILLIC CAPITAL LETTER EM
|
||||
<char-0x0042> <char-0x0418> " CYRILLIC CAPITAL LETTER I
|
||||
<char-0x004e> <char-0x0422> " CYRILLIC CAPITAL LETTER TE
|
||||
<char-0x004d> <char-0x042c> " CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
<char-0x003c> <char-0x0411> " CYRILLIC CAPITAL LETTER BE
|
||||
<char-0x003e> <char-0x042e> " CYRILLIC CAPITAL LETTER YU
|
||||
<char-0x003f> <char-0x0401> " CYRILLIC CAPITAL LETTER IO
|
||||
|
||||
" The ALT key pressed
|
||||
|
||||
|
||||
" The SHIFT and ALT keys pressed
|
||||
<A-char-0x003c> <char-0x003c> " LESS-THAN SIGN
|
||||
<A-char-0x003e> <char-0x003e> " GREATER-THAN SIGN
|
||||
|
||||
" The ALT and CTRL key pressed
|
||||
<A-C-char-0x007a> <char-0x044f><char-0x0301> " CYRILLIC SMALL LETTER YA with COMBINING ACUTE ACCENT
|
||||
<A-C-char-0x0062> <char-0x0438><char-0x0301> " CYRILLIC SMALL LETTER I with COMBINING ACUTE ACCENT
|
||||
<A-C-char-0x002e> <char-0x044e><char-0x0301> " CYRILLIC SMALL LETTER YU with COMBINING ACUTE ACCENT
|
||||
|
||||
" The SHIFT and ALT and CTRL keys pressed
|
||||
<S-A-C-char-0x005a> <char-0x042f><char-0x0301> " CYRILLIC CAPITAL LETTER YA with COMBINING ACUTE ACCENT
|
||||
<S-A-C-char-0x0042> <char-0x0418><char-0x0301> " CYRILLIC CAPITAL LETTER I with COMBINING ACUTE ACCENT
|
||||
<S-A-C-char-0x003e> <char-0x042e><char-0x0301> " CYRILLIC CAPITAL LETTER Y with COMBINING ACUTE ACCENT
|
||||
|
||||
|
||||
" VK_OEM_5 key (scan code 2b)
|
||||
|
||||
" None of the modifier keys are pressed
|
||||
<char-0x005c> <char-0x002f> " SOLIDUS
|
||||
|
||||
" The SHIFT key is pressed
|
||||
<char-0x007c> <char-0x00a7> " SECTION SIGN
|
||||
|
||||
" The ALT key is pressed
|
||||
<A-char-0x005c> <char-0x005c> " REVERSE SOLIDUS
|
||||
|
||||
" The SHIFT and ALT keys pressed
|
||||
<A-char-0x007c> <char-0x007c> " VERTICAL LINE
|
||||
|
||||
|
||||
" SPACE BAR key
|
||||
|
||||
" The ALT key pressed
|
||||
<A-char-0x0020> <char-0x202f> " NARROW NO-BREAK SPACE
|
||||
|
||||
" The SHIFT and CTRL keys pressed
|
||||
<S-C-char-0x0020> <char-0x00A0> " NO-BREAK SPACE
|
||||
|
||||
" \///\\
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim script to work like "less"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Dec 17
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Avoid loading this file twice, allow the user to define his own script.
|
||||
if exists("loaded_less")
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
vim9script
|
||||
|
||||
# Script to define the syntax menu in synmenu.vim
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Jun 27
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# This is used by "make menu" in the src directory.
|
||||
edit <sfile>:p:h/synmenu.vim
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
" Vim support file to define the default menus
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2023 May 03
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" 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.
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
" Set options and add mapping such that Vim behaves a lot like MS-Windows
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2018 Dec 07
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Bail out if this isn't wanted.
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Dec 16
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
vim9script
|
||||
|
||||
# cfilter.vim: Plugin to filter entries from a quickfix/location list
|
||||
# Last Change: Jun 30, 2022
|
||||
# Last Change: August 16, 2023
|
||||
# Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
|
||||
# Version: 2.0
|
||||
#
|
||||
@@ -31,11 +31,11 @@ def Qf_filter(qf: bool, searchpat: string, bang: string)
|
||||
if qf
|
||||
Xgetlist = function('getqflist')
|
||||
Xsetlist = function('setqflist')
|
||||
cmd = ':Cfilter' .. bang
|
||||
cmd = $':Cfilter{bang}'
|
||||
else
|
||||
Xgetlist = function('getloclist', [0])
|
||||
Xsetlist = function('setloclist', [0])
|
||||
cmd = ':Lfilter' .. bang
|
||||
cmd = $':Lfilter{bang}'
|
||||
endif
|
||||
|
||||
firstchar = searchpat[0]
|
||||
@@ -62,7 +62,7 @@ def Qf_filter(qf: bool, searchpat: string, bang: string)
|
||||
endif
|
||||
|
||||
items = filter(Xgetlist(), Cond)
|
||||
title = cmd .. ' /' .. pat .. '/'
|
||||
title = $'{cmd} /{pat}/'
|
||||
Xsetlist([], ' ', {title: title, items: items})
|
||||
enddef
|
||||
|
||||
|
||||
+9
-8
@@ -1,6 +1,6 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" autload script of matchit plugin, see ../plugin/matchit.vim
|
||||
" Last Change: Jun 10, 2021
|
||||
" Last Change: Jan 24, 2022
|
||||
|
||||
" Neovim does not support scriptversion
|
||||
if has("vimscript-4")
|
||||
@@ -42,6 +42,10 @@ function s:RestoreOptions()
|
||||
let restore_options = " ve=" .. &ve .. restore_options
|
||||
set ve=
|
||||
endif
|
||||
if &smartcase
|
||||
let restore_options = " smartcase " .. restore_options
|
||||
set nosmartcase
|
||||
endif
|
||||
return restore_options
|
||||
endfunction
|
||||
|
||||
@@ -134,9 +138,6 @@ function matchit#Match_wrapper(word, forward, mode) range
|
||||
let curcol = match(matchline, regexp)
|
||||
" If there is no match, give up.
|
||||
if curcol == -1
|
||||
" Make sure macros abort properly
|
||||
"exe "norm! \<esc>"
|
||||
call feedkeys("\e", 'tni')
|
||||
return s:CleanUp(restore_options, a:mode, startpos)
|
||||
endif
|
||||
let endcol = matchend(matchline, regexp)
|
||||
@@ -756,15 +757,15 @@ endfun
|
||||
fun! s:ParseSkip(str)
|
||||
let skip = a:str
|
||||
if skip[1] == ":"
|
||||
if skip[0] == "s"
|
||||
if skip[0] ==# "s"
|
||||
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" ..
|
||||
\ strpart(skip,2) .. "'"
|
||||
elseif skip[0] == "S"
|
||||
elseif skip[0] ==# "S"
|
||||
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" ..
|
||||
\ strpart(skip,2) .. "'"
|
||||
elseif skip[0] == "r"
|
||||
elseif skip[0] ==# "r"
|
||||
let skip = "strpart(getline('.'),0,col('.'))=~'" .. strpart(skip,2) .. "'"
|
||||
elseif skip[0] == "R"
|
||||
elseif skip[0] ==# "R"
|
||||
let skip = "strpart(getline('.'),0,col('.'))!~'" .. strpart(skip,2) .. "'"
|
||||
endif
|
||||
endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user