mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
docs: deprecate :ownsyntax
This commit is contained in:
@ -568,7 +568,6 @@ that see the '"' as part of their argument:
|
|||||||
:menu (and the like)
|
:menu (and the like)
|
||||||
:mkspell
|
:mkspell
|
||||||
:normal
|
:normal
|
||||||
:ownsyntax
|
|
||||||
:popup
|
:popup
|
||||||
:registers
|
:registers
|
||||||
:return
|
:return
|
||||||
|
@ -26,7 +26,7 @@ DIAGNOSTICS
|
|||||||
|
|
||||||
HIGHLIGHTS
|
HIGHLIGHTS
|
||||||
|
|
||||||
• todo
|
• *:ownsyntax* *w:current_syntax* Use 'winhighlight' instead.
|
||||||
|
|
||||||
LSP
|
LSP
|
||||||
|
|
||||||
|
@ -1473,7 +1473,6 @@ tag command action ~
|
|||||||
|:options| :opt[ions] open the options-window
|
|:options| :opt[ions] open the options-window
|
||||||
|:ounmap| :ou[nmap] like ":unmap" but for Operator-pending mode
|
|:ounmap| :ou[nmap] like ":unmap" but for Operator-pending mode
|
||||||
|:ounmenu| :ounme[nu] remove menu for Operator-pending mode
|
|:ounmenu| :ounme[nu] remove menu for Operator-pending mode
|
||||||
|:ownsyntax| :ow[nsyntax] set new local syntax highlight for this window
|
|
||||||
|:packadd| :pa[ckadd] add a plugin from 'packpath'
|
|:packadd| :pa[ckadd] add a plugin from 'packpath'
|
||||||
|:packloadall| :packl[oadall] load all packages under 'packpath'
|
|:packloadall| :packl[oadall] load all packages under 'packpath'
|
||||||
|:pbuffer| :pb[uffer] edit buffer in the preview window
|
|:pbuffer| :pb[uffer] edit buffer in the preview window
|
||||||
|
@ -5505,38 +5505,7 @@ And put these lines in your vimrc: >
|
|||||||
autocmd BufRead,BufNewFile *.[ch] endif
|
autocmd BufRead,BufNewFile *.[ch] endif
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
17. Window-local syntax *:ownsyntax*
|
17. Color xterms *xterm-color* *color-xterm*
|
||||||
|
|
||||||
Normally all windows on a buffer share the same syntax settings. It is
|
|
||||||
possible, however, to set a particular window on a file to have its own
|
|
||||||
private syntax setting. A possible example would be to edit LaTeX source
|
|
||||||
with conventional highlighting in one window, while seeing the same source
|
|
||||||
highlighted differently (so as to hide control sequences and indicate bold,
|
|
||||||
italic etc regions) in another. The 'scrollbind' option is useful here.
|
|
||||||
|
|
||||||
To set the current window to have the syntax "foo", separately from all other
|
|
||||||
windows on the buffer: >
|
|
||||||
:ownsyntax foo
|
|
||||||
< *w:current_syntax*
|
|
||||||
This will set the "w:current_syntax" variable to "foo". The value of
|
|
||||||
"b:current_syntax" does not change. This is implemented by saving and
|
|
||||||
restoring "b:current_syntax", since the syntax files do set
|
|
||||||
"b:current_syntax". The value set by the syntax file is assigned to
|
|
||||||
"w:current_syntax".
|
|
||||||
Note: This resets the 'spell', 'spellcapcheck', 'spellfile' and 'spelloptions'
|
|
||||||
options.
|
|
||||||
|
|
||||||
Once a window has its own syntax, syntax commands executed from other windows
|
|
||||||
on the same buffer (including :syntax clear) have no effect. Conversely,
|
|
||||||
syntax commands executed from that window do not affect other windows on the
|
|
||||||
same buffer.
|
|
||||||
|
|
||||||
A window with its own syntax reverts to normal behavior when another buffer
|
|
||||||
is loaded into that window or the file is reloaded.
|
|
||||||
When splitting the window, the new window will use the original syntax.
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
18. Color xterms *xterm-color* *color-xterm*
|
|
||||||
|
|
||||||
*colortest.vim*
|
*colortest.vim*
|
||||||
To test your color setup, a file has been included in the Vim distribution.
|
To test your color setup, a file has been included in the Vim distribution.
|
||||||
@ -5546,7 +5515,7 @@ To use it, execute this command: >
|
|||||||
Nvim uses 256-color and |true-color| terminal capabilities wherever possible.
|
Nvim uses 256-color and |true-color| terminal capabilities wherever possible.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
19. When syntax is slow *:syntime*
|
18. When syntax is slow *:syntime*
|
||||||
|
|
||||||
This is aimed at authors of a syntax file.
|
This is aimed at authors of a syntax file.
|
||||||
|
|
||||||
|
@ -5252,6 +5252,7 @@ void ex_syntax(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @deprecated
|
||||||
void ex_ownsyntax(exarg_T *eap)
|
void ex_ownsyntax(exarg_T *eap)
|
||||||
{
|
{
|
||||||
if (curwin->w_s == &curwin->w_buffer->b_s) {
|
if (curwin->w_s == &curwin->w_buffer->b_s) {
|
||||||
|
Reference in New Issue
Block a user