mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:partial 2d8ed0203aed (#18675)
* vim-patch:partial 2d8ed0203aed
Update runtime files.
2d8ed0203a
Skip:
runtime/doc/map.txt
runtime/doc/syntax.txt
runtime/doc/usr_51.txt
runtime/doc/usr_52.txt
runtime/syntax/help.vim
runtime/syntax/vim.vim
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
This commit is contained in:
parent
37ee800b51
commit
a20892c4bc
@ -1,14 +1,18 @@
|
|||||||
README.txt for color scheme files
|
README.txt for color scheme files
|
||||||
|
|
||||||
These files are used for the ":colorscheme" command. They appear in the
|
These files are used for the `:colorscheme` command. They appear in the
|
||||||
"Edit/Color Scheme" menu in the GUI.
|
"Edit/Color Scheme" menu in the GUI.
|
||||||
|
|
||||||
|
The colorschemes were updated for the Vim 9 release. If you don't like the
|
||||||
|
changes you can find the old ones here:
|
||||||
|
https://github.com/vim/colorschemes/tree/master/legacy_colors
|
||||||
|
|
||||||
|
|
||||||
Hints for writing a color scheme file:
|
Hints for writing a color scheme file:
|
||||||
|
|
||||||
There are two basic ways to define a color scheme:
|
There are two basic ways to define a color scheme:
|
||||||
|
|
||||||
1. Define a new Normal color and set the 'background' option accordingly.
|
1. Define a new Normal color and set the 'background' option accordingly. >
|
||||||
|
|
||||||
set background={light or dark}
|
set background={light or dark}
|
||||||
highlight clear
|
highlight clear
|
||||||
@ -16,7 +20,7 @@ There are two basic ways to define a color scheme:
|
|||||||
...
|
...
|
||||||
|
|
||||||
2. Use the default Normal color and automatically adjust to the value of
|
2. Use the default Normal color and automatically adjust to the value of
|
||||||
'background'.
|
'background'. >
|
||||||
|
|
||||||
highlight clear Normal
|
highlight clear Normal
|
||||||
set background&
|
set background&
|
||||||
@ -29,17 +33,17 @@ There are two basic ways to define a color scheme:
|
|||||||
...
|
...
|
||||||
endif
|
endif
|
||||||
|
|
||||||
You can use ":highlight clear" to reset everything to the defaults, and then
|
You can use `:highlight clear` to reset everything to the defaults, and then
|
||||||
change the groups that you want differently. This will also work for groups
|
change the groups that you want differently. This will also work for groups
|
||||||
that are added in later versions of Vim.
|
that are added in later versions of Vim.
|
||||||
Note that ":highlight clear" uses the value of 'background', thus set it
|
Note that `:highlight clear` uses the value of 'background', thus set it
|
||||||
before this command.
|
before this command.
|
||||||
Some attributes (e.g., bold) might be set in the defaults that you want
|
Some attributes (e.g., bold) might be set in the defaults that you want
|
||||||
removed in your color scheme. Use something like "gui=NONE" to remove the
|
removed in your color scheme. Use something like "gui=NONE" to remove the
|
||||||
attributes.
|
attributes.
|
||||||
|
|
||||||
In case you want to set 'background' depending on the colorscheme selected,
|
In case you want to set 'background' depending on the colorscheme selected,
|
||||||
this autocmd might be useful:
|
this autocmd might be useful: >
|
||||||
|
|
||||||
autocmd SourcePre */colors/blue_sky.vim set background=dark
|
autocmd SourcePre */colors/blue_sky.vim set background=dark
|
||||||
|
|
||||||
@ -49,7 +53,7 @@ In case you want to tweak a colorscheme after it was loaded, check out the
|
|||||||
ColorScheme autocommand event.
|
ColorScheme autocommand event.
|
||||||
|
|
||||||
To clean up just before loading another colorscheme, use the ColorSchemePre
|
To clean up just before loading another colorscheme, use the ColorSchemePre
|
||||||
autocommand event. For example:
|
autocommand event. For example: >
|
||||||
|
|
||||||
let g:term_ansi_colors = ...
|
let g:term_ansi_colors = ...
|
||||||
augroup MyColorscheme
|
augroup MyColorscheme
|
||||||
@ -59,20 +63,20 @@ autocommand event. For example:
|
|||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
|
To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
|
||||||
and use ":runtime" to load the original colorscheme:
|
and use ":runtime" to load the original colorscheme: >
|
||||||
|
|
||||||
" load the "evening" colorscheme
|
" load the "evening" colorscheme
|
||||||
runtime colors/evening.vim
|
runtime colors/evening.vim
|
||||||
" change the color of statements
|
" change the color of statements
|
||||||
hi Statement ctermfg=Blue guifg=Blue
|
hi Statement ctermfg=Blue guifg=Blue
|
||||||
|
|
||||||
To see which highlight group is used where, see ":help highlight-groups" and
|
To see which highlight group is used where, see `:help highlight-groups` and
|
||||||
":help group-name".
|
`:help group-name` .
|
||||||
|
|
||||||
You can use ":highlight" to find out the current colors. Exception: the
|
You can use ":highlight" to find out the current colors. Exception: the
|
||||||
ctermfg and ctermbg values are numbers, which are only valid for the current
|
ctermfg and ctermbg values are numbers, which are only valid for the current
|
||||||
terminal. Use the color names instead for better portability. See
|
terminal. Use the color names instead for better portability. See
|
||||||
":help cterm-colors".
|
`:help cterm-colors` .
|
||||||
|
|
||||||
The default color settings can be found in the source file
|
The default color settings can be found in the source file
|
||||||
"src/nvim/highlight_group.c". Search for "highlight_init".
|
"src/nvim/highlight_group.c". Search for "highlight_init".
|
||||||
@ -86,7 +90,7 @@ please check the following items:
|
|||||||
- Does it work in a color terminal as well as in the GUI? Is it consistent?
|
- Does it work in a color terminal as well as in the GUI? Is it consistent?
|
||||||
|
|
||||||
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
|
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
|
||||||
it this way:
|
it this way: >
|
||||||
|
|
||||||
let g:colors_name = expand('<sfile>:t:r')
|
let g:colors_name = expand('<sfile>:t:r')
|
||||||
|
|
||||||
@ -121,7 +125,7 @@ please check the following items:
|
|||||||
|
|
||||||
- Try to keep your color scheme simple by avoiding unnecessary logic and
|
- Try to keep your color scheme simple by avoiding unnecessary logic and
|
||||||
refraining from adding options. The best color scheme is one that only
|
refraining from adding options. The best color scheme is one that only
|
||||||
requires:
|
requires: >
|
||||||
|
|
||||||
colorscheme foobar
|
colorscheme foobar
|
||||||
|
|
||||||
@ -136,3 +140,6 @@ that:
|
|||||||
- it was made with colortemplate,
|
- it was made with colortemplate,
|
||||||
|
|
||||||
and join us at vim/colorschemes: (https://github.com/vim/colorschemes).
|
and join us at vim/colorschemes: (https://github.com/vim/colorschemes).
|
||||||
|
|
||||||
|
|
||||||
|
vim: set ft=help :
|
||||||
|
@ -1026,7 +1026,7 @@ chansend({id}, {data}) *chansend()*
|
|||||||
|
|
||||||
|
|
||||||
char2nr({string} [, {utf8}]) *char2nr()*
|
char2nr({string} [, {utf8}]) *char2nr()*
|
||||||
Return number value of the first char in {string}.
|
Return Number value of the first char in {string}.
|
||||||
Examples: >
|
Examples: >
|
||||||
char2nr(" ") returns 32
|
char2nr(" ") returns 32
|
||||||
char2nr("ABC") returns 65
|
char2nr("ABC") returns 65
|
||||||
@ -1313,13 +1313,13 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
|||||||
|
|
||||||
An example: >
|
An example: >
|
||||||
let choice = confirm("What do you want?",
|
let choice = confirm("What do you want?",
|
||||||
\ "&Apples\n&Oranges\n&Bananas", 2)
|
\ "&Apples\n&Oranges\n&Bananas", 2)
|
||||||
if choice == 0
|
if choice == 0
|
||||||
echo "make up your mind!"
|
echo "make up your mind!"
|
||||||
elseif choice == 3
|
elseif choice == 3
|
||||||
echo "tasteful"
|
echo "tasteful"
|
||||||
else
|
else
|
||||||
echo "I prefer bananas myself."
|
echo "I prefer bananas myself."
|
||||||
endif
|
endif
|
||||||
< In a GUI dialog, buttons are used. The layout of the buttons
|
< In a GUI dialog, buttons are used. The layout of the buttons
|
||||||
depends on the 'v' flag in 'guioptions'. If it is included,
|
depends on the 'v' flag in 'guioptions'. If it is included,
|
||||||
@ -1894,8 +1894,8 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is
|
|||||||
< There must be no space between the symbol (&/$/*/#) and the
|
< There must be no space between the symbol (&/$/*/#) and the
|
||||||
name.
|
name.
|
||||||
There must be no extra characters after the name, although in
|
There must be no extra characters after the name, although in
|
||||||
a few cases this is ignored. That may become more strict in
|
a few cases this is ignored. That may become stricter in the
|
||||||
the future, thus don't count on it!
|
future, thus don't count on it!
|
||||||
Working example: >
|
Working example: >
|
||||||
exists(":make")
|
exists(":make")
|
||||||
< NOT working example: >
|
< NOT working example: >
|
||||||
@ -2680,7 +2680,7 @@ getchar([expr]) *getchar()*
|
|||||||
|
|
||||||
Without [expr] and when [expr] is 0 a whole character or
|
Without [expr] and when [expr] is 0 a whole character or
|
||||||
special key is returned. If it is a single character, the
|
special key is returned. If it is a single character, the
|
||||||
result is a number. Use nr2char() to convert it to a String.
|
result is a Number. Use |nr2char()| to convert it to a String.
|
||||||
Otherwise a String is returned with the encoded character.
|
Otherwise a String is returned with the encoded character.
|
||||||
For a special key it's a String with a sequence of bytes
|
For a special key it's a String with a sequence of bytes
|
||||||
starting with 0x80 (decimal: 128). This is the same value as
|
starting with 0x80 (decimal: 128). This is the same value as
|
||||||
@ -7612,9 +7612,11 @@ strftime({format} [, {time}]) *strftime()*
|
|||||||
GetFormat()->strftime()
|
GetFormat()->strftime()
|
||||||
|
|
||||||
strgetchar({str}, {index}) *strgetchar()*
|
strgetchar({str}, {index}) *strgetchar()*
|
||||||
Get character {index} from {str}. This uses a character
|
Get a Number corresponding to the character at {index} in
|
||||||
index, not a byte index. Composing characters are considered
|
{str}. This uses a zero-based character index, not a byte
|
||||||
separate characters here.
|
index. Composing characters are considered separate
|
||||||
|
characters here. Use |nr2char()| to convert the Number to a
|
||||||
|
String.
|
||||||
Also see |strcharpart()| and |strchars()|.
|
Also see |strcharpart()| and |strchars()|.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
|
@ -1476,7 +1476,7 @@ modes Conditional, Number, Statement, Comment, PreProc, Type, and String,
|
|||||||
following the language specifications in 'Symbolic Manipulation with FORM' by
|
following the language specifications in 'Symbolic Manipulation with FORM' by
|
||||||
J.A.M. Vermaseren, CAN, Netherlands, 1991.
|
J.A.M. Vermaseren, CAN, Netherlands, 1991.
|
||||||
|
|
||||||
If you want include your own changes to the default colors, you have to
|
If you want to include your own changes to the default colors, you have to
|
||||||
redefine the following syntax groups:
|
redefine the following syntax groups:
|
||||||
|
|
||||||
- formConditional
|
- formConditional
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
|
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
|
||||||
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
|
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
|
||||||
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
|
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
|
||||||
|
" Update by Zdenek Dohnal, 2022 May 17
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@ -41,8 +42,8 @@ else:
|
|||||||
headers = spec.sourceHeader
|
headers = spec.sourceHeader
|
||||||
version = headers["Version"]
|
version = headers["Version"]
|
||||||
release = headers["Release"]
|
release = headers["Release"]
|
||||||
vim.command("let ver = " + version)
|
vim.command("let ver = '" + version + "'")
|
||||||
vim.command("let rel = " + release)
|
vim.command("let rel = '" + release + "'")
|
||||||
PYEND
|
PYEND
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||||
" Version: (v48) 2020 October 07
|
" Version: (v49) 2022 May 14
|
||||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
" Maintainer: Ajit J. Thakkar <thakkar.ajit@gmail.com>; <http://www2.unb.ca/~ajit/>
|
||||||
" Usage: For instructions, do :help fortran-indent from Vim
|
" Usage: For instructions, do :help fortran-indent from Vim
|
||||||
" Credits:
|
" Credits:
|
||||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||||
" Albert Oliver Serra, Takuya Fujiwara, Philipp Edelmann, Eisuke Kawashima,
|
" Albert Oliver Serra, Takuya Fujiwara, Philipp Edelmann, Eisuke Kawashima,
|
||||||
" and Louis Cochen.
|
" Louis Cochen, and Doug Kearns.
|
||||||
|
|
||||||
" Only load this indent file when no other was loaded.
|
" Only load this indent file when no other was loaded.
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
@ -17,6 +17,7 @@ let b:did_indent = 1
|
|||||||
|
|
||||||
let s:cposet=&cpoptions
|
let s:cposet=&cpoptions
|
||||||
set cpoptions&vim
|
set cpoptions&vim
|
||||||
|
let b:undo_indent = "setl inde< indk<"
|
||||||
|
|
||||||
setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select
|
setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select
|
||||||
setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect,=~elseif
|
setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect,=~elseif
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
" PostScript indent file
|
" PostScript indent file
|
||||||
" Language: PostScript
|
" Language: PostScript
|
||||||
" Maintainer: Mike Williams <mrw@netcomuk.co.uk> (Invalid email address)
|
" Maintainer: Mike Williams <mrw@eandem.co.uk>
|
||||||
" Doug Kearns <dougkearns@gmail.com>
|
|
||||||
" Last Change: 2022 Apr 06
|
" Last Change: 2022 Apr 06
|
||||||
|
|
||||||
|
|
||||||
" Only load this indent file when no other was loaded.
|
" Only load this indent file when no other was loaded.
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
|
Loading…
Reference in New Issue
Block a user