1
0
forked from aniani/vim

Update runtime files.

This commit is contained in:
Bram Moolenaar
2018-05-13 00:02:36 +02:00
parent 52ecaaa63d
commit 7db25fed5d
14 changed files with 416 additions and 208 deletions

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 8.0. Last change: 2018 May 06
*change.txt* For Vim version 8.0. Last change: 2018 May 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1445,6 +1445,55 @@ to the name of an external program for Vim to use for text formatting. The
'textwidth' and other options have no effect on formatting by an external
program.
*format-formatexpr*
The 'formatexpr' option can be set to a Vim Script function that performs
reformatting of the buffer. This should usually happen in an |ftplugin|,
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
when actually needed and the script should be called <filetype>format.vim.
For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME
directory, sets the 'formatexpr' option to: >
setlocal formatexpr=xmlformat#Format()
That means, you will find the corresponding script, defining the
xmlformat#Format() function, in the directory:
`$VIMRUNTIME/autoload/xmlformat.vim`
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: >
func! format#Format()
" only reformat on explicit gq command
if mode() != 'n'
" fall back to Vims internal reformatting
return 1
endif
let lines = getline(v:lnum, v:lnum + v:count - 1)
call map(lines, {key, val -> substitute(val, '\s\+$', '', 'g')})
call setline('.', lines)
" do not run internal formatter!
return 0
endfunc
You can then enable the formatting by executing: >
setlocal formatexpr=format#Format()
>
Note: this function explicitly returns non-zero when called from insert mode
(which basically means, text is inserted beyond the 'textwidth' limit). This
causes Vim to fall back to reformat the text by using the internal formatter.
However, if the |gq| command is used to reformat the text, the function
will receive the selected lines, trim trailing whitespace from those lines and
put them back in place. If you are going to split single lines into multiple
lines, be careful not to overwrite anything.
If you want to allow reformatting of text from insert or replace mode, one has
to be very careful, because the function might be called recursively. For
debugging it helps to set the 'debug' option.
*right-justify*
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

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.0. Last change: 2017 Oct 19
*cmdline.txt* For Vim version 8.0. Last change: 2018 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -412,14 +412,17 @@ CTRL-D List names that match the pattern in front of the cursor.
match is inserted. After the last match, the first is used
again (wrap around).
The behavior can be changed with the 'wildmode' option.
*c_<S-Tab>*
<S-Tab> Like 'wildchar' or <Tab>, but begin with the last match and
then go to the previous match.
<S-Tab> does not work everywhere.
*c_CTRL-N*
CTRL-N After using 'wildchar' which got multiple matches, go to next
match. Otherwise recall more recent command-line from history.
<S-Tab> *c_CTRL-P* *c_<S-Tab>*
*c_CTRL-P*
CTRL-P After using 'wildchar' which got multiple matches, go to
previous match. Otherwise recall older command-line from
history. <S-Tab> only works with the GUI, on the Amiga and
with MS-DOS.
history.
*c_CTRL-A*
CTRL-A All names that match the pattern in front of the cursor are
inserted.

View File

@@ -6137,6 +6137,7 @@ fork os_unix.txt /*fork*
form.vim syntax.txt /*form.vim*
format-bullet-list tips.txt /*format-bullet-list*
format-comments change.txt /*format-comments*
format-formatexpr change.txt /*format-formatexpr*
formatting change.txt /*formatting*
formfeed intro.txt /*formfeed*
fortran.vim syntax.txt /*fortran.vim*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.0. Last change: 2018 May 04
*terminal.txt* For Vim version 8.0. Last change: 2018 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -317,7 +317,7 @@ the job ends while in Terminal-Normal mode this changes to
When the job outputs lines in the terminal, such that the contents scrolls off
the top, those lines are remembered and can be seen in Terminal-Normal mode.
The number of lines is limited by the 'termwinscroll' option. When going over
this limit, the first 10% of the scrolled lins are deleted and are lost.
this limit, the first 10% of the scrolled lines are deleted and are lost.
Cursor style ~

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2018 May 05
*todo.txt* For Vim version 8.0. Last change: 2018 May 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,16 +38,8 @@ entered there will not be repeated below, unless there is extra information.
Terminal emulator window:
- Still some stuff to implement and bugs to fix, see src/terminal.c
Problem with sudo. #2758
Looks like an error for inserting register makes ":file other" not work.
(Tom M, 2018 Mar 28) Reset did_emsg after inserting a register.
Or at the top of the loop? (Apr 4)
Make assert_functions return non-zero on failure. Make sure they add one
entry to v:errors then.
Use WaitForAssert() in tests: give error when failed.
Remove asserts after WaitFor().
On Win32 when not in the console and t_Co >= 256, allow using 'tgc'.
(Nobuhiro Takasaki, #2833) Also check t_Co.
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
20, #2481)
@@ -163,6 +155,9 @@ ch_sendraw() with long string does not try to read inbetween, which may cause
a deadlock if the reading side is waiting for the write to finish. (Nate
Bosch, 2018 Jan 13, #2548)
Patch to include a cfilter plugin to filter quickfix/location lists.
(Yegappan Lakshmanan, 2018 May 12)
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
Will have to explain the manual steps (downloading the .aff and .dic files,
applying the diff, etc.
@@ -181,6 +176,8 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
Using 'wildignore' also applies to literally entered file name. Also with
:drop (remote commands).
Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
Patch to use the xdiff library instead of external diff. (Christian Brabandt,
2018 Mar 20, #2732)
@@ -296,6 +293,13 @@ Ask whether to use Windows or Vim key behavior?
Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
Nov 21)
When t_Co is changed from termresponse, the OptionSet autocmmand event isn't
triggered. Use the code from the end of set_num_option() in
set_color_count().
Add another autocommand like TermResponse that is fired for the other terminal
responses, such as bg and fg. Use "bg", "fg", "blink", etc. for the name.
When using command line window, CmdlineLeave is triggered without
CmdlineEnter. (xtal8, 2017 Oct 30, #2263)
Add some way to get the nested state. Although CmdwinEnter is obviously
@@ -1000,10 +1004,6 @@ github with a URL like this:
https://github.com/vim/vim/compare/v7.4.920%5E...v7.4.920.diff
Diff for version.c contains more context, can't skip a patch.
When t_Co is changed from termresponse, the OptionSet autocmmand event isn't
triggered. Use the code from the end of set_num_option() in
set_color_count().
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Comparing nested structures with "==" uses a different comparator than when

View File

@@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.0. Last change: 2017 Nov 24
*version8.txt* For Vim version 8.0. Last change: 2018 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1799,7 +1799,7 @@ Solution: Always use the stubs. (Danek Duvall, Yukihiro Nakadaira)
Files: src/if_ruby.c
Patch 7.4.226 (after 7.4.219)
Problem: Cursurline highlighting not redrawn when scrolling. (John
Problem: Cursorline highlighting not redrawn when scrolling. (John
Marriott)
Solution: Check for required redraw in two places.
Files: src/move.c