mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
vim-patch:41d6de2: runtime(doc): update the change.txt help file
41d6de2974
Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
This commit is contained in:
parent
022449b522
commit
98e3610316
@ -1443,18 +1443,17 @@ since formatting is highly dependent on the type of file. It makes
|
|||||||
sense to use an |autoload| script, so the corresponding script is only loaded
|
sense to use an |autoload| script, so the corresponding script is only loaded
|
||||||
when actually needed and the script should be called <filetype>format.vim.
|
when actually needed and the script should be called <filetype>format.vim.
|
||||||
|
|
||||||
For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME
|
For example, the XML filetype plugin distributed with Vim in the
|
||||||
directory, sets the 'formatexpr' option to: >
|
$VIMRUNTIME/ftplugin directory, sets the 'formatexpr' option to: >
|
||||||
|
|
||||||
setlocal formatexpr=xmlformat#Format()
|
setlocal formatexpr=xmlformat#Format()
|
||||||
|
|
||||||
That means, you will find the corresponding script, defining the
|
That means, you will find the corresponding script, defining the
|
||||||
xmlformat#Format() function, in the directory:
|
xmlformat#Format() function, in the file `$VIMRUNTIME/autoload/xmlformat.vim`
|
||||||
`$VIMRUNTIME/autoload/xmlformat.vim`
|
|
||||||
|
|
||||||
Here is an example script that removes trailing whitespace from the selected
|
Here is an example script that removes trailing whitespace from the selected
|
||||||
text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
|
text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim:
|
||||||
|
>vim
|
||||||
func! format#Format()
|
func! format#Format()
|
||||||
" only reformat on explicit gq command
|
" only reformat on explicit gq command
|
||||||
if mode() != 'n'
|
if mode() != 'n'
|
||||||
@ -1487,7 +1486,7 @@ debugging it helps to set the 'debug' option.
|
|||||||
|
|
||||||
*right-justify*
|
*right-justify*
|
||||||
There is no command in Vim to right justify text. You can do it with
|
There is no command in Vim to right justify text. You can do it with
|
||||||
an external command, like "par" (e.g.: "!}par" to format until the end of the
|
an external command, like "par" (e.g.: `:.,}!par` to format until the end of the
|
||||||
paragraph) or set 'formatprg' to "par".
|
paragraph) or set 'formatprg' to "par".
|
||||||
|
|
||||||
*format-comments*
|
*format-comments*
|
||||||
@ -1553,7 +1552,7 @@ type of comment string. A part consists of:
|
|||||||
some indent for the start or end part that can be removed.
|
some indent for the start or end part that can be removed.
|
||||||
|
|
||||||
When a string has none of the 'f', 's', 'm' or 'e' flags, Vim assumes the
|
When a string has none of the 'f', 's', 'm' or 'e' flags, Vim assumes the
|
||||||
comment string repeats at the start of each line. The flags field may be
|
comment string repeats at the start of each line. The {flags} field may be
|
||||||
empty.
|
empty.
|
||||||
|
|
||||||
Any blank space in the text before and after the {string} is part of the
|
Any blank space in the text before and after the {string} is part of the
|
||||||
|
@ -323,6 +323,9 @@ gx Opens the current filepath or URL (decided by
|
|||||||
To avoid the hit-enter prompt use: >
|
To avoid the hit-enter prompt use: >
|
||||||
:silent !{cmd}
|
:silent !{cmd}
|
||||||
<
|
<
|
||||||
|
*:!-range*
|
||||||
|
:{range}!{cmd} Like |:!| but execute {cmd} for each line in the
|
||||||
|
{range}.
|
||||||
*:!!*
|
*:!!*
|
||||||
:!! Repeat last ":!{cmd}".
|
:!! Repeat last ":!{cmd}".
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user