diff --git a/runtime/autoload/RstFold.vim b/runtime/autoload/RstFold.vim new file mode 100644 index 0000000000..5becb04685 --- /dev/null +++ b/runtime/autoload/RstFold.vim @@ -0,0 +1,48 @@ +" Author: Antony Lee +" Description: Helper functions for reStructuredText syntax folding +" Last Modified: 2018-01-07 + +function s:CacheRstFold() + let closure = {'header_types': {}, 'max_level': 0, 'levels': {}} + function closure.Process(match) dict + let curline = getcurpos()[1] + if has_key(self.levels, curline - 1) + " For over+under-lined headers, the regex will match both at the + " overline and at the title itself; in that case, skip the second match. + return + endif + let lines = split(a:match, '\n') + let key = repeat(lines[-1][0], len(lines)) + if !has_key(self.header_types, key) + let self.max_level += 1 + let self.header_types[key] = self.max_level + endif + let self.levels[curline] = self.header_types[key] + endfunction + let save_cursor = getcurpos() + silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn + call setpos('.', save_cursor) + let b:RstFoldCache = closure.levels +endfunction + +function RstFold#GetRstFold() + if !has_key(b:, 'RstFoldCache') + call s:CacheRstFold() + endif + if has_key(b:RstFoldCache, v:lnum) + return '>' . b:RstFoldCache[v:lnum] + else + return '=' + endif +endfunction + +function RstFold#GetRstFoldText() + if !has_key(b:, 'RstFoldCache') + call s:CacheRstFold() + endif + let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1) + let thisline = getline(v:foldstart) + " For over+under-lined headers, skip the overline. + let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline + return indent . text +endfunction diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim index 83ba49a073..f227b5ee25 100644 --- a/runtime/autoload/xmlformat.vim +++ b/runtime/autoload/xmlformat.vim @@ -2,9 +2,8 @@ " Last Change: Thu, 22 May 2018 21:26:55 +0100 " Version: 0.1 " Author: Christian Brabandt -" Script: http://www.vim.org/scripts/script.php?script_id= +" Repository: https://github.com/chrisbra/vim-xml-ftplugin " License: VIM License -" GetLatestVimScripts: ???? 18 :AutoInstall: xmlformat.vim " Documentation: see :h xmlformat.txt (TODO!) " --------------------------------------------------------------------- " Load Once: {{{1 diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 0572b85f8f..2303a2b862 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -319,4 +319,4 @@ There is one known minor bug, No other bugs are known to exist. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 051dedbdbd..8d1dca2ff9 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1593,4 +1593,4 @@ This will write the file without triggering the autocommands defined by the gzip plugin. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 59e1cc79dd..56bcb04cb6 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -177,8 +177,6 @@ gR Enter Virtual Replace mode: Each character you type may replace several characters at once. Repeat the entered text [count]-1 times. See |Virtual-Replace-mode| for more details. - {not available when compiled without the |+vreplace| - feature} *c* ["x]c{motion} Delete {motion} text [into register x] and start @@ -303,8 +301,6 @@ gr{char} Replace the virtual characters under the cursor with space. See |gR| and |Virtual-Replace-mode| for more details. As with |r| a count may be given. {char} can be entered like with |r|. - {not available when compiled without the |+vreplace| - feature} *digraph-arg* The argument for Normal mode commands like |r| and |t| is a single character. @@ -1884,4 +1880,4 @@ The sorting can be interrupted, but if you interrupt it too late in the process you may end up with duplicated lines. This also depends on the system library function used. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index 72887fea0b..4cc36258c0 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -816,4 +816,4 @@ the cursor to the last line. "A" will move to the end of the line, "I" to the start of the line. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index ae364c3230..df18ec6c45 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1164,4 +1164,4 @@ The character used for the pattern indicates the type of command-line: @ string for |input()| - text for |:insert| or |:append| - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 6d2cea5d81..b03bf1517f 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -172,4 +172,4 @@ Visual C++ 2005 Express Edition can be downloaded for free from: http://msdn.microsoft.com/vstudio/express/visualC/default.aspx ========================================================================= - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/debugger.txt b/runtime/doc/debugger.txt index 9aa2fb8467..3370cf0988 100644 --- a/runtime/doc/debugger.txt +++ b/runtime/doc/debugger.txt @@ -139,4 +139,4 @@ Programming Environment. For Sun NetBeans support see |netbeans|. - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 20a623f362..b1b3cc49ec 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -563,4 +563,4 @@ long 32 or 64 bit signed, can hold a pointer Note that some compilers cannot handle long lines or strings. The C89 standard specifies a limit of 509 characters. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index e263e6b83e..502fb49181 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -441,4 +441,4 @@ evaluating 'patchexpr'. This hopefully avoids that files in the current directory are accidentally patched. Vim will also delete files starting with v:fname_in and ending in ".rej" and ".orig". - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index 2a232228ed..62f23a2f80 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -1488,4 +1488,4 @@ char digraph hex dec official name ~ ſt ft FB05 64261 LATIN SMALL LIGATURE LONG S T st st FB06 64262 LATIN SMALL LIGATURE ST - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 4e974579fa..04bf4b1fd6 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1747,4 +1747,4 @@ There are three different types of searching: currently work with 'path' items that contain a URL or use the double star with depth limiter (/usr/**2) or upward search (;) notations. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 24ff375441..c8ad8c2a26 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -6016,7 +6016,7 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()* the pattern. 'smartcase' is NOT used. The matching is always done like 'magic' is set and 'cpoptions' is empty. - *matchadd()* *E798* *E799* *E801* + *matchadd()* *E798* *E799* *E801* *E957* matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) Defines a pattern to be highlighted in the current window (a "match"). It will be highlighted with {group}. Returns an @@ -6055,6 +6055,8 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) conceal Special character to show instead of the match (only for |hl-Conceal| highlighted matches, see |:syn-cchar|) + window Instead of the current window use the + window with this number or window ID. The number of matches is not limited, as it is the case with the |:match| commands. @@ -6222,32 +6224,38 @@ mode([expr]) Return a string that indicates the current mode. a non-empty String (|non-zero-arg|), then the full mode is returned, otherwise only the first letter is returned. - n Normal, Terminal-Normal - no Operator-pending - v Visual by character - V Visual by line - CTRL-V Visual blockwise - s Select by character - S Select by line - CTRL-S Select blockwise - i Insert - ic Insert mode completion |compl-generic| - ix Insert mode |i_CTRL-X| completion - R Replace |R| - Rc Replace mode completion |compl-generic| - Rv Virtual Replace |gR| - Rx Replace mode |i_CTRL-X| completion - c Command-line editing - cv Vim Ex mode |gQ| - ce Normal Ex mode |Q| - r Hit-enter prompt - rm The -- more -- prompt - r? A |:confirm| query of some sort - ! Shell or external command is executing - t Terminal-Job mode: keys go to the job + n Normal, Terminal-Normal + no Operator-pending + niI Normal using |i_CTRL-O| in |Insert-mode| + niR Normal using |i_CTRL-O| in |Replace-mode| + niV Normal using |i_CTRL-O| in |Virtual-Replace-mode| + v Visual by character + V Visual by line + CTRL-V Visual blockwise + s Select by character + S Select by line + CTRL-S Select blockwise + i Insert + ic Insert mode completion |compl-generic| + ix Insert mode |i_CTRL-X| completion + R Replace |R| + Rc Replace mode completion |compl-generic| + Rv Virtual Replace |gR| + Rx Replace mode |i_CTRL-X| completion + c Command-line editing + cv Vim Ex mode |gQ| + ce Normal Ex mode |Q| + r Hit-enter prompt + rm The -- more -- prompt + r? A |:confirm| query of some sort + ! Shell or external command is executing + t Terminal-Job mode: keys go to the job This is useful in the 'statusline' option or when used with |remote_expr()| In most other places it always returns "c" or "n". + Note that in the future more modes and more specific modes may + be added. It's better not to compare the whole string but only + the leading character(s). Also see |visualmode()|. mzeval({expr}) *mzeval()* @@ -9263,6 +9271,7 @@ amiga Amiga version of Vim. arabic Compiled with Arabic support |Arabic|. arp Compiled with ARP support (Amiga). autocmd Compiled with autocommand support. |autocommand| +autochdir Compiled with support for 'autochdir' autoservername Automatically enable |clientserver| balloon_eval Compiled with |balloon-eval| support. balloon_multiline GUI supports multiline balloons. @@ -11649,4 +11658,4 @@ without the |+eval| feature. Find more information in the file src/testdir/README.txt. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index 1bb9f20727..493714e4d6 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -266,4 +266,4 @@ changes made in the current line. For more information about the bugs refer to rileft.txt. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 0c33845f55..b08e3d73f9 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -695,4 +695,4 @@ The mappings can be disabled with: > < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index ad3f514663..c3ee97e162 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -601,4 +601,4 @@ used. Otherwise the values from the window where the buffer was edited last are used. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index 9819c066af..f461b7eab5 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -777,4 +777,4 @@ Setting the filetype back to Perl sets all the usual "perl" related items back as they were. -vim:tw=78:ts=8:ft=help:norl: +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index f2d17af042..884e868438 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1079,4 +1079,4 @@ careful! For the Win32 GUI the external commands are executed in a separate window. See |gui-shell-win32|. - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt index 7bd12aa610..15dd275a03 100644 --- a/runtime/doc/gui_w32.txt +++ b/runtime/doc/gui_w32.txt @@ -451,4 +451,4 @@ To try out if XPM support works do this: > :exe 'sign place 1 line=1 name=vimxpm file=' . expand('%:p') < - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index 1d692fc01e..fba3e53f75 100644 --- a/runtime/doc/gui_x11.txt +++ b/runtime/doc/gui_x11.txt @@ -730,4 +730,4 @@ and use CLIPBOARD ("+) for cut/copy/paste operations. You thus have access to both by choosing to use either of the "* or "+ registers. - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt index 56f188b2d5..708cfe9ac4 100644 --- a/runtime/doc/hangulin.txt +++ b/runtime/doc/hangulin.txt @@ -109,4 +109,4 @@ Send comments, patches and suggestions to: SungHyun Nam Chi-Deok Hwang <...> - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index 5400b49326..f2c3a3db44 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -139,4 +139,4 @@ The result is that all Hebrew characters are displayed as ~x. To solve this problem, set isprint=@,128-255. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index ab1b85159f..195d1febbf 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -226,4 +226,4 @@ will try to find help for it. Especially for options in single quotes, e.g. 'compatible'. ------------------------------------------------------------------------------ - vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: + vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl: diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 29941c1aeb..f6c6ab7444 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -370,4 +370,4 @@ highlighting. So do these: You can find the details in $VIMRUNTIME/syntax/help.vim - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/howto.txt b/runtime/doc/howto.txt index f6973102c6..26d611ef05 100644 --- a/runtime/doc/howto.txt +++ b/runtime/doc/howto.txt @@ -93,4 +93,4 @@ How to ... *howdoi* *how-do-i* *howto* *how-to* |2html.vim| convert a colored file to HTML |less| use Vim like less or more with syntax highlighting - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index cf2aff2bcc..ba0f1d5d13 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -484,4 +484,4 @@ For a cscope version for Win32 see (seems abandoned): Win32 support was added by Sergey Khorev . Contact him if you have Win32-specific issues. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index f118b17dcc..9d27683f7f 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -312,4 +312,4 @@ MzScheme's raco command: raco pkg install cext-lib # raco ctool command < ====================================================================== - vim:tw=78:ts=8:sts=4:ft=help:norl: + vim:tw=78:ts=8:noet:sts=4:ft=help:norl: diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt index 4ec9ac5f1e..e734df9847 100644 --- a/runtime/doc/if_ole.txt +++ b/runtime/doc/if_ole.txt @@ -202,4 +202,4 @@ In Vim > [.Net remarks provided by Dave Fishburn and Brian Sturk] ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt index a06954e173..b82ee832fa 100644 --- a/runtime/doc/if_perl.txt +++ b/runtime/doc/if_perl.txt @@ -303,4 +303,4 @@ version of the shared library must match the Perl version Vim was compiled with. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 89baef42f8..30a3a726a0 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -924,4 +924,4 @@ If you have more than one version of Python 3, you need to link python3 to the one you prefer, before running configure. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt index 1b4fd40f3c..b1404769f8 100644 --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -145,7 +145,7 @@ self[{n}] Returns the buffer object for the number {n}. The first number Methods: -name Returns the name of the buffer. +name Returns the full name of the buffer. number Returns the number of the buffer. count Returns the number of lines. length Returns the number of lines. @@ -181,6 +181,7 @@ height = {n} Sets the window height to {n}. width Returns the width of the window. width = {n} Sets the window width to {n}. cursor Returns a [row, col] array for the cursor position. + First line number is 1 and first column number is 0. cursor = [{row}, {col}] Sets the cursor position to {row} and {col}. @@ -233,4 +234,4 @@ version of the shared library must match the Ruby version Vim was compiled with. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_sniff.txt b/runtime/doc/if_sniff.txt index cf6ed1c981..d0e16a8da5 100644 --- a/runtime/doc/if_sniff.txt +++ b/runtime/doc/if_sniff.txt @@ -8,4 +8,4 @@ The SNiFF+ support was removed at patch 7.4.1433. If you want to check it out sync to before that. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt index 979a19b473..e822dfd170 100644 --- a/runtime/doc/if_tcl.txt +++ b/runtime/doc/if_tcl.txt @@ -544,4 +544,4 @@ of DYNAMIC_TCL_DLL file what was specified at compile time. The version of the shared library must match the Tcl version Vim was compiled with. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 180d932b3f..54fb52618b 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1156,4 +1156,4 @@ indent for a continuation line, a line that starts with a backslash: > Three times shiftwidth is the default value. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 2dd5eab674..b0b53bf289 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1659,4 +1659,4 @@ tag command action ~ |:~| :~ repeat last ":substitute" - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index ca19136738..e145cacf31 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -2005,4 +2005,4 @@ self explanatory. Using the long or the short version depends on the [READ ERRORS] not all of the file could be read - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 8325bb33bf..a000482e59 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -906,4 +906,4 @@ buffer lines logical lines window lines screen lines ~ 6. ~ ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 18b61df001..d6dbd5032f 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1552,4 +1552,4 @@ local to the script and use mappings local to the script. When the user invokes the user command, it will run in the context of the script it was defined in. This matters if || is used in a command. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 99ce10fab8..24fed6d7d9 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1467,4 +1467,4 @@ Contributions specifically for the multi-byte features by: Taro Muraoka Yasuhiro Matsumoto - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index b4a72ff641..c23ae65d0e 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -866,4 +866,4 @@ The |g<| command can be used to see the last page of previous command output. This is especially useful if you accidentally typed at the hit-enter prompt. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index 3d590e0e06..4d85bbd43d 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -210,4 +210,4 @@ a message adapt to language preferences of the user, > :endif < - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 2c0fd55304..b2105206b7 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1341,4 +1341,4 @@ L To line [count] from bottom of window (default: Last position is in a status line, that window is made the active window and the cursor is not moved. {not in Vi} - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index 25fba4d5a2..61e58c245d 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1007,4 +1007,4 @@ Expert tab MIME Type property. NetBeans is MIME oriented and the External Editor will only open MIME types specified in this property. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 3351b92ca6..10885fb280 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -9379,4 +9379,4 @@ A jump table for the options with a short description can be found at |Q_op|. screen. When non-zero, characters are sent to the terminal one by one. For MS-DOS pcterm this does not work. For debugging purposes. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt index 5b4b9f7a6f..ab88cc6710 100644 --- a/runtime/doc/os_390.txt +++ b/runtime/doc/os_390.txt @@ -131,4 +131,4 @@ Also look at: ------------------------------------------------------------------------------ - vim:tw=78:fo=tcq2:ts=8:ft=help:norl: + vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_amiga.txt b/runtime/doc/os_amiga.txt index ad083b58a8..26aec5fe98 100644 --- a/runtime/doc/os_amiga.txt +++ b/runtime/doc/os_amiga.txt @@ -144,4 +144,4 @@ Installation ~ ;End VIM - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_beos.txt b/runtime/doc/os_beos.txt index 148f5fe0e7..1356a6b71e 100644 --- a/runtime/doc/os_beos.txt +++ b/runtime/doc/os_beos.txt @@ -317,4 +317,4 @@ it is about 1191K. http://polder.ubc.kun.nl/~rhialto/be - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_dos.txt b/runtime/doc/os_dos.txt index b950953022..d24efdf076 100644 --- a/runtime/doc/os_dos.txt +++ b/runtime/doc/os_dos.txt @@ -295,4 +295,4 @@ When starting up, Vim checks for the presence of "sh" anywhere in the 'shell' option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be set as described above. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index 1bb94ab1bf..e02a83cd93 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -183,4 +183,4 @@ the system clipboard, the darwin feature should be disabled to prevent Vim from hanging at runtime. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_mint.txt b/runtime/doc/os_mint.txt index 96e139d3e7..ed33491bbe 100644 --- a/runtime/doc/os_mint.txt +++ b/runtime/doc/os_mint.txt @@ -36,4 +36,4 @@ Send bug reports to Jens M. Felderhoff, e-mail: - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt index 50fb4e899d..d5be05f3ae 100644 --- a/runtime/doc/os_msdos.txt +++ b/runtime/doc/os_msdos.txt @@ -12,4 +12,4 @@ work, there is not enough memory. The DOS32 version (using DJGPP) might still work on older systems. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_os2.txt b/runtime/doc/os_os2.txt index 7891756612..2f094cfa22 100644 --- a/runtime/doc/os_os2.txt +++ b/runtime/doc/os_os2.txt @@ -10,4 +10,4 @@ This file used to contain the particularities for the OS/2 version of Vim. The OS/2 support was removed in patch 7.4.1008. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_qnx.txt b/runtime/doc/os_qnx.txt index 466699fcf6..4cbc7ead05 100644 --- a/runtime/doc/os_qnx.txt +++ b/runtime/doc/os_qnx.txt @@ -135,4 +135,4 @@ Todo: - Replace usage of fork() with spawn() when launching external programs. - vim:tw=78:sw=4:ts=8:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ts=8:ft=help:norl: diff --git a/runtime/doc/os_risc.txt b/runtime/doc/os_risc.txt index 095d5a9856..d951b8e8dd 100644 --- a/runtime/doc/os_risc.txt +++ b/runtime/doc/os_risc.txt @@ -9,4 +9,4 @@ The RISC OS support has been removed from Vim with patch 7.3.187. If you would like to use Vim on RISC OS get the files from before that patch. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_unix.txt b/runtime/doc/os_unix.txt index 4b69af5aa8..5067b1e44b 100644 --- a/runtime/doc/os_unix.txt +++ b/runtime/doc/os_unix.txt @@ -57,4 +57,4 @@ For real color terminals the ":highlight" command can be used. The file "tools/vim132" is a shell script that can be used to put Vim in 132 column mode on a vt100 and lookalikes. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index 3e723b6770..fc6da61750 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -952,4 +952,4 @@ of OS_VMS.TXT: Bruce Hunsaker Sandor Kopanyi - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index e9953339a1..9a5f748af6 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -303,4 +303,4 @@ A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of 'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico. - vim:tw=78:fo=tcq2:ts=8:ft=help:norl: + vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 09b4c2c1a2..e7e510f3a7 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1417,4 +1417,4 @@ Finally, these constructs are unique to Perl: ":2match" for another plugin. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_getscript.txt b/runtime/doc/pi_getscript.txt index 4190706829..ae38a3b1bf 100644 --- a/runtime/doc/pi_getscript.txt +++ b/runtime/doc/pi_getscript.txt @@ -479,4 +479,4 @@ v2 May 14, 2003 : extracts name of item to be obtained from the and they became numbers. Fixes comparison. ============================================================================== -vim:tw=78:ts=8:ft=help:fdm=marker +vim:tw=78:ts=8:noet:ft=help:fdm=marker diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index 21b6520ee1..6017efa899 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -40,4 +40,4 @@ compression. Thus editing the patchmode file will not give you the automatic decompression. You have to rename the file if you want this. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_logipat.txt b/runtime/doc/pi_logipat.txt index f8d666234f..8d33a565ac 100644 --- a/runtime/doc/pi_logipat.txt +++ b/runtime/doc/pi_logipat.txt @@ -118,4 +118,4 @@ Copyright: (c) 2004-2015 by Charles E. Campbell *logiPat-copyright* ============================================================================== -vim:tw=78:ts=8:ft=help +vim:tw=78:ts=8:noet:ft=help diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index b4f2f2693e..478338ed42 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -4267,4 +4267,4 @@ netrw: ============================================================================== Modelines: {{{1 - vim:tw=78:ts=8:ft=help:norl:fdm=marker + vim:tw=78:ts=8:noet:ft=help:norl:fdm=marker diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index d4ab4a08c8..8c4f04a1b5 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -57,4 +57,4 @@ comments. This is unrelated to the matchparen highlighting, they use a different mechanism. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_spec.txt b/runtime/doc/pi_spec.txt index abe5f1159a..aaede1e972 100644 --- a/runtime/doc/pi_spec.txt +++ b/runtime/doc/pi_spec.txt @@ -108,4 +108,4 @@ If you don't like the release updating feature and don't want to answer Good luck!! -vim:tw=78:ts=8:ft=help:norl: +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index 7a6faf167d..f39e0c475b 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -148,4 +148,4 @@ Copyright 2005-2012: *tar-copyright* v1 (original) * Michael Toren (see http://michael.toren.net/code/) ============================================================================== -vim:tw=78:ts=8:ft=help +vim:tw=78:ts=8:noet:ft=help diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt index 563b12a966..fec16a4d83 100644 --- a/runtime/doc/pi_vimball.txt +++ b/runtime/doc/pi_vimball.txt @@ -273,4 +273,4 @@ WINDOWS *vimball-windows* ============================================================================== -vim:tw=78:ts=8:ft=help:fdm=marker +vim:tw=78:ts=8:noet:ft=help:fdm=marker diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index c5fa391bfc..3517735733 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -149,4 +149,4 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing ============================================================================== -vim:tw=78:ts=8:ft=help:fdm=marker +vim:tw=78:ts=8:noet:ft=help:fdm=marker diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index b93a2305fa..07a95031e8 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -752,4 +752,4 @@ to adjust the number of lines before a formfeed character to prevent accidental blank pages. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 2955edac92..95bcfa06d8 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1794,4 +1794,4 @@ start of the file about how to use it. (This script is deprecated, see - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index a8886e814d..5512b1ba7c 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1455,4 +1455,4 @@ Context-sensitive completion on the command-line: |zN| zN fold normal set 'foldenable' |zi| zi invert 'foldenable' - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 063a3148b7..04e2aec2d6 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -272,4 +272,4 @@ In summary: |____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia) ` - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 89703fdded..c4007db936 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -234,4 +234,4 @@ Note that after recovery the key of the swap file will be used for the text file. Thus if you write the text file, you need to use that new key. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index 6ede0da6ed..3e73ead030 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -224,4 +224,4 @@ across a network). Note: Client mode always works, but server mode only works when the GUI is started. - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index ff1d68d38e..55aed248b1 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1010,4 +1010,4 @@ mind there are various things that may clobber the results: - The "self" time is wrong when a function is used recursively. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt index 17bfdba7ba..f5ec8e8762 100644 --- a/runtime/doc/rileft.txt +++ b/runtime/doc/rileft.txt @@ -121,4 +121,4 @@ o When both 'rightleft' and 'revins' are on: 'textwidth' does not work. o There is no full bidirectionality (bidi) support. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt index cf64873194..fae8690df1 100644 --- a/runtime/doc/russian.txt +++ b/runtime/doc/russian.txt @@ -71,4 +71,4 @@ In order to use the Russian documentation, make sure you have set the releases of gettext. =============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 971fec8e98..1415e2f91e 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -332,4 +332,4 @@ Add these mappings to your vimrc file: > :map [65~ :map! [65~ < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index dab63b1e48..bd63ea9ade 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -202,4 +202,4 @@ JUMPING TO A SIGN *:sign-jump* *E157* have a name. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 6f42eb398a..2b096e3bec 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1646,4 +1646,4 @@ WORDCHARS (Hunspell) *spell-WORDCHARS* is no need to separate words before checking them (using a trie instead of a hashtable). - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index 6e42d157df..50148e1c96 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -213,4 +213,4 @@ is done. But a receipt is possible. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 154969ec2c..e851caa7b7 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1688,4 +1688,4 @@ most of the information will be restored). Use ! to abandon a modified buffer. |abandon| {not when compiled with tiny or small features} - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1fec336588..3c63585d1c 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2876,17 +2876,17 @@ This covers syntax highlighting for the older Unix (Bourne) sh, and newer shells such as bash, dash, posix, and the Korn shells. Vim attempts to determine which shell type is in use by specifying that -various filenames are of specific types: > +various filenames are of specific types, e.g.: > ksh : .kshrc* *.ksh bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash < -If none of these cases pertain, then the first line of the file is examined -(ex. looking for /bin/sh /bin/ksh /bin/bash). If the first line specifies a -shelltype, then that shelltype is used. However some files (ex. .profile) are -known to be shell files but the type is not apparent. Furthermore, on many -systems sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" -(Posix). +See $VIMRUNTIME/filetype.vim for the full list of patterns. If none of these +cases pertain, then the first line of the file is examined (ex. looking for +/bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype, then +that shelltype is used. However some files (ex. .profile) are known to be +shell files but the type is not apparent. Furthermore, on many systems sh is +symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix). One may specify a global default by instantiating one of the following variables in your <.vimrc>: @@ -5478,4 +5478,4 @@ literal text specify the size of that text (in bytes): "<\@1<=span" Matches the same, but only tries one byte before "span". - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 31fcc43564..a80d7c3b43 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -472,4 +472,4 @@ If you want to show something specific for a tab page, you might want to use a tab page local variable. |t:var| - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tags b/runtime/doc/tags index 57d6c6462e..d9a80b15b6 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4675,6 +4675,7 @@ E953 eval.txt /*E953* E954 options.txt /*E954* E955 eval.txt /*E955* E956 pattern.txt /*E956* +E957 eval.txt /*E957* E96 diff.txt /*E96* E97 diff.txt /*E97* E98 diff.txt /*E98* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index 555beb509a..d3ceac662b 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -854,4 +854,4 @@ Common arguments for the commands above: < For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern is used as a literal string, not as a search pattern. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index dbf7e6483a..77cd933b42 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -977,4 +977,4 @@ To swap the meaning of the left and right mouse buttons: > :noremap! :noremap! < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index cd2c664f54..f9fc0ee5ee 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -909,4 +909,4 @@ for when the terminal can't be resized by Vim). - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt index 619c95506d..bbe341cf2a 100644 --- a/runtime/doc/tips.txt +++ b/runtime/doc/tips.txt @@ -530,4 +530,4 @@ A slightly more advanced version is used in the |matchparen| plugin. autocmd InsertEnter * match none < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 9b08aef8dc..69294172d3 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -50,14 +50,15 @@ Terminal debugger: initializing mzscheme avoid the problem, thus it's not some #ifdef. Terminal emulator window: +- When the job in the terminal doesn't use mouse events, let the scroll wheel + scroll the scrollback, like a terminal does at the shell prompt. #2490 + And use modeless selection. #2962 - With a vertical split only one window is updated. (Linwei, 2018 Jun 2, #2977) - When pasting should call vterm_keyboard_start_paste(), e.g. when using K_MIDDLEMOUSE, calling insert_reg(). - Users expect parsing the :term argument like a shell does, also support single quotes. E.g. with: :term grep 'alice says "hello"' (#1999) -- How to access selection in Terminal running a shell? (damnskippy, 2018 May - 27, #29620 When terminal doesn't use the mouse, use modeless selection. - Win32: Redirecting input does not work, half of Test_terminal_redir_file() is disabled. - Win32: Redirecting output works but includes escape sequences. @@ -78,6 +79,7 @@ Does not build with MinGW out of the box: - WINVER conflict, should use 0x0600 by default? Patches for Python: #3162, #3263 (Ozaki Kiichi) + Needs update. Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May 13, #2910) Can't reproduce? @@ -88,41 +90,65 @@ On Win32 when not in the console and t_Co >= 256, allow using 'tgc'. Errors found with random data: heap-buffer-overflow in alist_add (#2472) -Patch to fix that +packages is always in output of :version. -(thinca, #3198) reported by Takuya Fujiwara +Improve fallback for menu translations, to avoid having to create lots of +files that source the actual file. E.g. menu_da_de -> menu_da +Include part of #3242? + +Inlcude Chinese-Taiwan translations. (bystar, #3261) + +Using mouse for inputlist() doesn't work after patch 8.0.1756. (Dominique +Pelle, 2018 Jul 22, #3239) Also see 8.0.0722. Check both console and GUI. More warnings from static analysis: https://lgtm.com/projects/g/vim/vim/alerts/?mode=list -Patch for Perl 5.28 on Windows. (#3196) +When handle_drop() is called while the updating_screen is true, it fails +completely. Should store the file list and use it when updating_screen is set +to false in reset_updating_screen(). Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17) Related to bracketed paste. I cannot reproduce it. -Patch replacing imp with importlib. (#3163) - -Patch to make CTRL-S in mswin.vim work better. (#3211) -But use "gi" instead of "a". - Using ":file" in quickfix window during an autocommand doesn't work. (Jason Franklin, 2018 May 23) Allow for using it when there is no argument. Patch in pull request #2967: Allow white space in sign text. (Ben Jackson) +Test fails in AppVeyor. Removing flags from 'cpoptions' breaks the Winbar buttons in termdebug. (Dominique Pelle, 2018 Jul 16) -Whenever the file name is "~" then expand('%:p') returns $HOME. (Aidan -Shafran, 2018 Jun 23, #3072) Proposed patch by Aidan, 2018 Jun 24. - -Patch to set w_set_curswant when setting the cursor in language interfaces. -(David Hotham, 2018 Jun 22, #3060) - Problem with two buffers with the same name a/b, if it didn't exist before and is created outside of Vim. (dskloetg, 2018 Jul 16, #3219) -Patch to make CTRL-W work properly in a quickfix window. (Jason Franklin, -2018 May 30) +Memory leak in test_assert: +==19127== by 0x2640D7: alloc (misc2.c:874) +==19127== by 0x2646D6: vim_strsave (misc2.c:1315) +==19127== by 0x1B68D2: f_getcwd (evalfunc.c:4950) +And: +==19127== by 0x2640D7: alloc (misc2.c:874) +==19127== by 0x1A9477: set_var (eval.c:7601) +==19127== by 0x19F96F: set_var_lval (eval.c:2233) +==19127== by 0x19EA3A: ex_let_one (eval.c:1810) +==19127== by 0x19D737: ex_let_vars (eval.c:1294) +==19127== by 0x19D6B4: ex_let (eval.c:1259) +Memory leaks in test_channel? (or is it because of fork()) +Using uninitialized value in test_crypt. +Memory leaks in test_escaped_glob +==20651== by 0x2640D7: alloc (misc2.c:874) +==20651== by 0x2646D6: vim_strsave (misc2.c:1315) +==20651== by 0x3741EA: get_function_args (userfunc.c:131) +==20651== by 0x378779: ex_function (userfunc.c:2036) +Memory leak in test_terminal: +==23530== by 0x2640D7: alloc (misc2.c:874) +==23530== by 0x2646D6: vim_strsave (misc2.c:1315) +==23530== by 0x25841D: FullName_save (misc1.c:5443) +==23530== by 0x17CB4F: fix_fname (buffer.c:4794) +==23530== by 0x17CB9A: fname_expand (buffer.c:4838) +==23530== by 0x1759AB: buflist_new (buffer.c:1889) +==23530== by 0x35C923: term_start (terminal.c:421) +==23530== by 0x2AFF30: mch_call_shell_terminal (os_unix.c:4377) +==23530== by 0x2B16BE: mch_call_shell (os_unix.c:5383) gethostbyname() is old, use getaddrinfo() if available. (#3227) @@ -152,12 +178,20 @@ Compiler warnings (geeknik, 2017 Oct 26): - signed integer overflow in getdecchrs() (#2254) - undefined left shift in get_string_tv() (#2250) +Win32 console: and typed in Insert mode don't result in normal +characters. (#3246) + Patch for more quickfix refactoring. (Yegappan Lakshmanan, #2950) Tests failing for "make testgui" with GTK: - Test_setbufvar_options() - Test_exit_callback_interval() +When using CTRL-W CR in the quickfix window, the jumplist in the opened window +is cleared, to avoid going back to the list of errors buffer (would have two +windows with it). Can we just remove the jump list entries for the quickfix +buffer? + Patch to stack and pop the window title and icon. (IWAMOTO Kouichi, 2018 Jun 22, #3059) 8 For xterm need to open a connection to the X server to get the window @@ -446,10 +480,6 @@ The ":move" command does not honor closed folds. (Ryan Lue, #2351) Patch to fix increment/decrement not working properly when 'virtualedit' is set. (Hirohito Higashi, 2016 Aug 1, #923) -Memory leaks in test_channel? (or is it because of fork()) -Using uninitialized value in test_crypt. -Memory leaks in test_escaped_glob - Patch to make gM move to middle of line. (Yasuhiro Matsumoto, Sep 8, #2070) Cannot copy modeless selection when cursor is inside it. (lkintact, #2300) diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 64e617f70d..45c4e7ad88 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -464,7 +464,7 @@ N *+viminfo* |'viminfo'| N *+virtualedit* |'virtualedit'| S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. N *+visualextra* extra Visual mode commands |blockwise-operators| -N *+vreplace* |gR| and |gr| +T *+vreplace* |gR| and |gr| *+vtp* on MS-Windows console: support for 'termguicolors' N *+wildignore* |'wildignore'| N *+wildmenu* |'wildmenu'| diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 541f613ac9..46bf5673ad 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1462,7 +1462,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts -au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc*,*.ksh call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index ea3f9ac6c9..dc03211916 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: man " Maintainer: SungHyun Nam -" Last Change: 2018 May 2 +" Last Change: 2018 Jul 25 " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. @@ -14,32 +14,47 @@ if &filetype == "man" finish endif let b:did_ftplugin = 1 +endif +let s:cpo_save = &cpo +set cpo-=C + +if &filetype == "man" " allow dot and dash in manual page name. setlocal iskeyword+=\.,- + let b:undo_ftplugin = "setlocal iskeyword<" " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_man_maps") if !hasmapto('ManBS') nmap h ManBS + let b:undo_ftplugin = b:undo_ftplugin + \ . '|silent! nunmap h' endif nnoremap ManBS :%s/.\b//g:setl nomod'' nnoremap :call PreGetPage(v:count) nnoremap :call PopPage() nnoremap q :q + + " Add undo commands for the maps + let b:undo_ftplugin = b:undo_ftplugin + \ . '|silent! nunmap ManBS' + \ . '|silent! nunmap ' + \ . '|silent! nunmap ' + \ . '|silent! nunmap q' endif if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1) setlocal foldmethod=indent foldnestmax=1 foldenable + let b:undo_ftplugin = b:undo_ftplugin + \ . '|silent! setl fdm< fdn< fen<' endif - let b:undo_ftplugin = "setlocal iskeyword<" - endif if exists(":Man") != 2 - com -nargs=+ -complete=shellcmd Man call s:GetPage() + com -nargs=+ -complete=shellcmd Man call s:GetPage(, ) nmap K :call PreGetPage(0) nmap ManPreGetPage :call PreGetPage(0) endif @@ -100,7 +115,7 @@ func FindPage(sect, page) return 1 endfunc -func GetPage(...) +func GetPage(cmdmods, ...) if a:0 >= 2 let sect = a:1 let page = a:2 @@ -154,7 +169,11 @@ func GetPage(...) new endif else - new + if a:cmdmods != '' + exe a:cmdmods . ' new' + else + new + endif endif setl nonu fdc=0 endif @@ -218,4 +237,7 @@ endfunc endif +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: set sw=2 ts=8 noet: diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index e61213e7a5..9d737cde44 100644 --- a/runtime/ftplugin/rst.vim +++ b/runtime/ftplugin/rst.vim @@ -1,10 +1,12 @@ -" Vim filetype plugin file -" Language: reStructuredText documentation format -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" reStructuredText filetype plugin file +" Language: reStructuredText documentation format +" Maintainer: Marshall Ward +" Original Maintainer: Nikolai Weibull +" Website: https://github.com/marshallward/vim-restructuredtext +" Latest Revision: 2018-01-07 if exists("b:did_ftplugin") - finish + finish endif let b:did_ftplugin = 1 @@ -16,5 +18,25 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=fb:.. commentstring=..\ %s expandtab setlocal formatoptions+=tcroql +" reStructuredText standard recommends that tabs be expanded to 8 spaces +" The choice of 3-space indentation is to provide slightly better support for +" directives (..) and ordered lists (1.), although it can cause problems for +" many other cases. +" +" More sophisticated indentation rules should be revisted in the future. + +if !exists("g:rst_style") || g:rst_style != 0 + setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8 +endif + +if has('patch-7.3.867') " Introduced the TextChanged event. + setlocal foldmethod=expr + setlocal foldexpr=RstFold#GetRstFold() + setlocal foldtext=RstFold#GetRstFoldText() + augroup RstFold + autocmd TextChanged,InsertLeave unlet! b:RstFoldCache + augroup END +endif + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index fb398cafb0..32bc9f35bb 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -7,6 +7,7 @@ " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: +" 20180724 - make check for zsh syntax more rigid (needs word-boundaries) " 20180326 - better support for line continuation " 20180325 - better detection of function definitions " 20180127 - better support for zsh complex commands @@ -70,7 +71,7 @@ function! GetShIndent() " Check contents of previous lines if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>' || - \ (&ft is# 'zsh' && line =~ '\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>') + \ (&ft is# 'zsh' && line =~ '\<\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>') if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim index 87ffb329b5..dcafb467a6 100644 --- a/runtime/indent/xml.vim +++ b/runtime/indent/xml.vim @@ -1,6 +1,8 @@ " Language: xml -" Maintainer: Johannes Zellner -" Last Change: 2017 Jun 13 +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Maintainer: Christian Brabandt +" Previous Maintainer: Johannes Zellner +" Last Change: 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) " 2) will be confused by unbalanced tags in comments " or CDATA sections. @@ -55,9 +57,6 @@ fun! XmlIndentSynCheck(lnum) if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml' " don't indent pure non-xml code return 0 - elseif syn1 =~ '^xmlComment' && syn2 =~ '^xmlComment' - " indent comments specially - return -1 endif endif return 1 diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index ec55cf676a..9f4c26a0ee 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -877,7 +877,7 @@ func s:HandleNewBreakpoint(msg) return endif - let nr = substitute(a:msg, '.*number="\([0-9]\)*\".*', '\1', '') + 0 + let nr = substitute(a:msg, '.*number="\([0-9]*\)".*', '\1', '') + 0 if nr == 0 return endif diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 89320597f1..c9bb5dc2d4 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Java " Maintainer: Claudio Fleiner -" URL: http://www.fleiner.com/vim/syntax/java.vim -" Last Change: 2015 March 01 +" URL: https://github.com/fleiner/vim/blob/master/runtime/syntax/java.vim +" Last Change: 2018 July 26 " Please check :help java.vim for comments on some of the options available. @@ -29,8 +29,6 @@ syn match javaOK "\.\.\." syn match javaError2 "#\|=<" hi def link javaError2 javaError - - " keyword definitions syn keyword javaExternal native package syn match javaExternal "\\(\s\+static\>\)\?" @@ -40,7 +38,7 @@ syn keyword javaRepeat while for do syn keyword javaBoolean true false syn keyword javaConstant null syn keyword javaTypedef this super -syn keyword javaOperator new instanceof +syn keyword javaOperator var new instanceof syn keyword javaType boolean char byte short int long float double syn keyword javaType void syn keyword javaStatement return @@ -54,17 +52,25 @@ syn match javaTypedef "\.\s*\"ms=s+1 syn keyword javaClassDecl enum syn match javaClassDecl "^class\>" syn match javaClassDecl "[^.]\s*\"ms=s+1 -syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>\(([^)]*)\)\=" contains=javaString +syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>" contains=javaString syn match javaClassDecl "@interface\>" syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite syn match javaUserLabelRef "\k\+" contained syn match javaVarArg "\.\.\." syn keyword javaScopeDecl public protected private abstract +" Java Modules(Since Java 9, for "module-info.java" file) +if fnamemodify(bufname("%"), ":t") == "module-info.java" + syn keyword javaModuleStorageClass module transitive + syn keyword javaModuleStmt open requires exports opens uses provides + syn keyword javaModuleExternal to with + syn cluster javaTop add=javaModuleStorageClass,javaModuleStmt,javaModuleExternal +endif + if exists("java_highlight_java_lang_ids") let java_highlight_all=1 endif -if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") +if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") " java.lang.* syn match javaLangClass "\" syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException @@ -296,6 +302,7 @@ hi def link javaStorageClass StorageClass hi def link javaMethodDecl javaStorageClass hi def link javaClassDecl javaStorageClass hi def link javaScopeDecl javaStorageClass + hi def link javaBoolean Boolean hi def link javaSpecial Special hi def link javaSpecialError Error @@ -329,6 +336,12 @@ hi def link htmlComment Special hi def link htmlCommentPart Special hi def link javaSpaceError Error +if fnamemodify(bufname("%"), ":t") == "module-info.java" + hi def link javaModuleStorageClass StorageClass + hi def link javaModuleStmt Statement + hi def link javaModuleExternal Include +endif + let b:current_syntax = "java" if main_syntax == 'java' diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index a95ecacb09..78714d0170 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -7,7 +7,7 @@ " (ss) repaired several quoting and grouping glitches " (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) additional factoring of keywords, globals, and members -" Last Change: 2012 Oct 05 +" Last Change: 2018 Jul 28 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) " 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder) @@ -35,10 +35,13 @@ syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,java syn match javaScriptSpecial "\\\d\d\d\|\\." syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc + +syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbededExpr syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" -syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline +syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline syn keyword javaScriptConditional if else switch syn keyword javaScriptRepeat while for do in @@ -57,6 +60,8 @@ syn keyword javaScriptMember document event location syn keyword javaScriptDeprecated escape unescape syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile +syn cluster javaScriptEmbededExpr contains=javaScriptBoolean,javaScriptNull,javaScriptIdentifier,javaScriptStringD,javaScriptStringS,javaScriptStringT + if exists("javaScript_fold") syn match javaScriptFunction "\" syn region javaScriptFunctionFold start="\.*[^};]$" end="^\z1}.*$" transparent fold keepend @@ -87,6 +92,7 @@ hi def link javaScriptCommentTodo Todo hi def link javaScriptSpecial Special hi def link javaScriptStringS String hi def link javaScriptStringD String +hi def link javaScriptStringT String hi def link javaScriptCharacter Character hi def link javaScriptSpecialCharacter javaScriptSpecial hi def link javaScriptNumber javaScriptValue @@ -114,6 +120,8 @@ hi def link javaScriptDeprecated Exception hi def link javaScriptReserved Keyword hi def link javaScriptDebug Debug hi def link javaScriptConstant Label +hi def link javaScriptEmbed Special + let b:current_syntax = "javascript" diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim index 78472cdbfd..3831ae1149 100644 --- a/runtime/syntax/readline.vim +++ b/runtime/syntax/readline.vim @@ -2,9 +2,9 @@ " Language: readline(3) configuration file " Maintainer: Daniel Moch " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2017-12-25 -" readline_has_bash - if defined add support for bash specific -" settings/functions +" Latest Revision: 2018-07-26 +" Add new functions for Readline 7 / Bash 4.4 +" (credit: Github user bewuethr) if exists('b:current_syntax') finish @@ -111,7 +111,7 @@ syn keyword readlineKeyword contained \ nextgroup=readlineVariable \ skipwhite -syn keyword readlineVariable contained +syn keyword readlineVariable contained \ nextgroup=readlineBellStyle \ skipwhite \ bell-style @@ -120,12 +120,15 @@ syn keyword readlineVariable contained \ nextgroup=readlineBoolean \ skipwhite \ bind-tty-special-chars + \ blink-matching-paren + \ colored-completion-prefix \ colored-stats \ completion-ignore-case \ completion-map-case \ convert-meta \ disable-completion \ echo-control-characters + \ enable-bracketed-paste \ enable-keypad \ enable-meta-key \ expand-tilde @@ -269,6 +272,7 @@ syn keyword readlineFunction contained \ start-kbd-macro \ end-kbd-macro \ call-last-kbd-macro + \ print-last-kbd-macro \ \ re-read-init-file \ abort @@ -339,6 +343,8 @@ syn keyword readlineFunction contained if exists("readline_has_bash") syn keyword readlineFunction contained + \ shell-forward-word + \ shell-backward-word \ shell-expand-line \ history-expand-line \ magic-space @@ -347,6 +353,8 @@ if exists("readline_has_bash") \ insert-last-argument \ operate-and-get-next \ forward-backward-delete-char + \ shell-kill-word + \ shell-backward-kill-word \ delete-char-or-list \ complete-filename \ possible-filename-completions @@ -359,6 +367,7 @@ if exists("readline_has_bash") \ complete-command \ possible-command-completions \ dynamic-complete-history + \ dabbrev-expand \ complete-into-braces \ glob-expand-word \ glob-list-expansions diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim index 232d2a7de3..d620d91f4a 100644 --- a/runtime/syntax/rst.vim +++ b/runtime/syntax/rst.vim @@ -3,7 +3,7 @@ " Maintainer: Marshall Ward " Previous Maintainer: Nikolai Weibull " Website: https://github.com/marshallward/vim-restructuredtext -" Latest Revision: 2016-08-18 +" Latest Revision: 2018-07-23 if exists("b:current_syntax") finish @@ -50,7 +50,10 @@ syn cluster rstDirectives contains=rstFootnote,rstCitation, syn match rstExplicitMarkup '^\s*\.\.\_s' \ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition -let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*' +" "Simple reference names are single words consisting of alphanumerics plus +" isolated (no two adjacent) internal hyphens, underscores, periods, colons +" and plus signs." +let s:ReferenceName = '[[:alnum:]]\%([-_.:+]\?[[:alnum:]]\+\)*' syn keyword rstTodo contained FIXME TODO XXX NOTE @@ -83,7 +86,7 @@ execute 'syn region rstExDirective contained matchgroup=rstDirective' . \ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock' execute 'syn match rstSubstitutionDefinition contained' . - \ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives' + \ ' /|.*|\_s\+/ nextgroup=@rstDirectives' function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right) execute 'syn region rst' . a:name . @@ -107,10 +110,10 @@ function! s:DefineInlineMarkup(name, start, middle, end) call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’') " TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters - call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|\%ua0\|[/:]\)', '') execute 'syn match rst' . a:name . - \ ' +\%(^\|\s\|[''"([{/:.,;!?\\-]\)+' @@ -124,14 +127,31 @@ call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') -syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" +" Sections are identified through their titles, which are marked up with +" adornment: "underlines" below the title text, or underlines and matching +" "overlines" above the title. An underline/overline is a single repeated +" punctuation character that begins in column 1 and forms a line extending at +" least as far as the right edge of the title text. +" +" It is difficult to count characters in a regex, but we at least special-case +" the case where the title has at least three characters to require the +" adornment to have at least three characters as well, in order to handle +" properly the case of a literal block: +" +" this is the end of a paragraph +" :: +" this is a literal block +syn match rstSections "\v^%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+$" + \ contains=@Spell +syn match rstSections "\v^%(([=`:.'"~^_*+#-])\1{2,}\n)?.{3,}\n([=`:.'"~^_*+#-])\2{2,}$" + \ contains=@Spell " TODO: Can’t remember why these two can’t be defined like the ones above. execute 'syn match rstFootnoteReference contains=@NoSpell' . - \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' + \ ' +\%(\s\|^\)\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' execute 'syn match rstCitationReference contains=@NoSpell' . - \ ' +\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' + \ ' +\%(\s\|^\)\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' execute 'syn match rstHyperlinkReference' . \ ' /\<' . s:ReferenceName . '__\=\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)/' @@ -140,28 +160,69 @@ syn match rstStandaloneHyperlink contains=@NoSpell \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]" syn region rstCodeBlock contained matchgroup=rstDirective - \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+ + \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+.*\_s*\n\ze\z(\s\+\)+ \ skip=+^$+ \ end=+^\z1\@!+ \ contains=@NoSpell syn cluster rstDirectives add=rstCodeBlock if !exists('g:rst_syntax_code_list') - let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', - \ 'python', 'perl', 'sh'] + " A mapping from a Vim filetype to a list of alias patterns (pattern + " branches to be specific, see ':help /pattern'). E.g. given: + " + " let g:rst_syntax_code_list = { + " \ 'cpp': ['cpp', 'c++'], + " \ } + " + " then the respective contents of the following two rST directives: + " + " .. code:: cpp + " + " auto i = 42; + " + " .. code:: C++ + " + " auto i = 42; + " + " will both be highlighted as C++ code. As shown by the latter block + " pattern matching will be case-insensitive. + let g:rst_syntax_code_list = { + \ 'vim': ['vim'], + \ 'java': ['java'], + \ 'cpp': ['cpp', 'c++'], + \ 'lisp': ['lisp'], + \ 'php': ['php'], + \ 'python': ['python'], + \ 'perl': ['perl'], + \ 'sh': ['sh'], + \ } +elseif type(g:rst_syntax_code_list) == type([]) + " backward compatibility with former list format + let s:old_spec = g:rst_syntax_code_list + let g:rst_syntax_code_list = {} + for s:elem in s:old_spec + let g:rst_syntax_code_list[s:elem] = [s:elem] + endfor endif -for code in g:rst_syntax_code_list +for s:filetype in keys(g:rst_syntax_code_list) unlet! b:current_syntax " guard against setting 'isk' option which might cause problems (issue #108) let prior_isk = &l:iskeyword - exe 'syn include @rst'.code.' syntax/'.code.'.vim' - exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold' - \.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#' + let s:alias_pattern = '' + \.'\%(' + \.join(g:rst_syntax_code_list[s:filetype], '\|') + \.'\)' + + exe 'syn include @rst'.s:filetype.' syntax/'.s:filetype.'.vim' + exe 'syn region rstDirective'.s:filetype + \.' matchgroup=rstDirective fold' + \.' start="\c\%(sourcecode\|code\%(-block\)\=\)::\s\+'.s:alias_pattern.'\_s*\n\ze\z(\s\+\)"' \.' skip=#^$#' \.' end=#^\z1\@!#' - \.' contains=@NoSpell,@rst'.code - exe 'syn cluster rstDirectives add=rstDirective'.code + \.' contains=@NoSpell,@rst'.s:filetype + exe 'syn cluster rstDirectives add=rstDirective'.s:filetype + " reset 'isk' setting, if it has been changed if &l:iskeyword !=# prior_isk let &l:iskeyword = prior_isk @@ -169,6 +230,9 @@ for code in g:rst_syntax_code_list unlet! prior_isk endfor +" Enable top level spell checking +syntax spell toplevel + " TODO: Use better syncing. syn sync minlines=50 linebreaks=2 @@ -189,8 +253,6 @@ hi def link rstHyperlinkTarget String hi def link rstExDirective String hi def link rstSubstitutionDefinition rstDirective hi def link rstDelimiter Delimiter -hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic -hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold hi def link rstInterpretedTextOrHyperlinkReference Identifier hi def link rstInlineLiteral String hi def link rstSubstitutionReference PreProc @@ -200,6 +262,14 @@ hi def link rstCitationReference Identifier hi def link rstHyperLinkReference Identifier hi def link rstStandaloneHyperlink Identifier hi def link rstCodeBlock String +if exists('g:rst_use_emphasis_colors') + " TODO: Less arbitrary color selection + hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic + hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold +else + hi def rstEmphasis term=italic cterm=italic gui=italic + hi def rstStrongEmphasis term=bold cterm=bold gui=bold +endif let b:current_syntax = "rst" diff --git a/src/auto/configure b/src/auto/configure index 914c6c4c54..5b9055439b 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -4464,6 +4464,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5 $as_echo "$fail_if_missing" >&6; } +with_x_arg="$with_x" + if test -z "$CFLAGS"; then CFLAGS="-O" test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" @@ -9087,6 +9089,10 @@ $as_echo "$ac_cv_small_wchar_t" >&6; } fi fi +if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then + as_fn_error $? "could not configure X" "$LINENO" 5 +fi + test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5 diff --git a/src/configure.ac b/src/configure.ac index cce215a76e..ed2feb8f64 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -72,6 +72,9 @@ AC_ARG_ENABLE(fail_if_missing, [fail_if_missing="no"]) AC_MSG_RESULT($fail_if_missing) +dnl Keep original value to check later. +with_x_arg="$with_x" + dnl Set default value for CFLAGS if none is defined or it's empty if test -z "$CFLAGS"; then CFLAGS="-O" @@ -2347,6 +2350,11 @@ else fi fi +dnl Check if --with-x was given but it doesn't work. +if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then + AC_MSG_ERROR([could not configure X]) +fi + test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no AC_MSG_CHECKING(--enable-gui argument) diff --git a/src/edit.c b/src/edit.c index 7683ad0141..9c11a68497 100644 --- a/src/edit.c +++ b/src/edit.c @@ -463,7 +463,6 @@ edit( { ResetRedobuff(); AppendNumberToRedobuff(count); -#ifdef FEAT_VREPLACE if (cmdchar == 'V' || cmdchar == 'v') { /* "gR" or "gr" command */ @@ -471,7 +470,6 @@ edit( AppendCharToRedobuff((cmdchar == 'v') ? 'r' : 'R'); } else -#endif { if (cmdchar == K_PS) AppendCharToRedobuff('a'); @@ -497,7 +495,6 @@ edit( #endif State = REPLACE; } -#ifdef FEAT_VREPLACE else if (cmdchar == 'V' || cmdchar == 'v') { State = VREPLACE; @@ -505,7 +502,6 @@ edit( orig_line_count = curbuf->b_ml.ml_line_count; vr_lines_changed = 1; } -#endif else State = INSERT; @@ -2052,7 +2048,6 @@ change_indent( int save_p_list; int start_col; colnr_T vc; -#ifdef FEAT_VREPLACE colnr_T orig_col = 0; /* init for GCC */ char_u *new_line, *orig_line = NULL; /* init for GCC */ @@ -2062,7 +2057,6 @@ change_indent( orig_line = vim_strsave(ml_get_curline()); /* Deal with NULL below */ orig_col = curwin->w_cursor.col; } -#endif /* for the following tricks we don't want list mode */ save_p_list = curwin->w_p_list; @@ -2101,17 +2095,13 @@ change_indent( (void)set_indent(amount, call_changed_bytes ? SIN_CHANGED : 0); else { -#ifdef FEAT_VREPLACE int save_State = State; /* Avoid being called recursively. */ if (State & VREPLACE_FLAG) State = INSERT; -#endif shift_line(type == INDENT_DEC, round, 1, call_changed_bytes); -#ifdef FEAT_VREPLACE State = save_State; -#endif } insstart_less -= curwin->w_cursor.col; @@ -2243,7 +2233,6 @@ change_indent( } } -#ifdef FEAT_VREPLACE /* * For VREPLACE mode, we also have to fix the replace stack. In this case * it is always possible because we backspace over the whole line and then @@ -2276,7 +2265,6 @@ change_indent( vim_free(new_line); } -#endif } /* @@ -2298,8 +2286,6 @@ truncate_spaces(char_u *line) line[i + 1] = NUL; } -#if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \ - || defined(FEAT_COMMENTS) || defined(PROTO) /* * Backspace the cursor until the given column. Handles REPLACE and VREPLACE * modes correctly. May also be used when not in insert mode at all. @@ -2318,7 +2304,6 @@ backspace_until_column(int col) break; } } -#endif /* * Like del_char(), but make sure not to go before column "limit_col". @@ -6239,9 +6224,7 @@ insertchar( && (force_format || (!VIM_ISWHITE(c) && !((State & REPLACE_FLAG) -#ifdef FEAT_VREPLACE && !(State & VREPLACE_FLAG) -#endif && *ml_get_cursor() != NUL) && (curwin->w_cursor.lnum != Insstart.lnum || ((!has_format_option(FO_INS_LONG) @@ -6486,11 +6469,7 @@ internal_format( * When 'ai' is off we don't want a space under the cursor to be * deleted. Replace it with an 'x' temporarily. */ - if (!curbuf->b_p_ai -#ifdef FEAT_VREPLACE - && !(State & VREPLACE_FLAG) -#endif - ) + if (!curbuf->b_p_ai && !(State & VREPLACE_FLAG)) { cc = gchar_cursor(); if (VIM_ISWHITE(cc)) @@ -6511,10 +6490,8 @@ internal_format( int end_foundcol = 0; /* column for start of word */ colnr_T len; colnr_T virtcol; -#ifdef FEAT_VREPLACE int orig_col = 0; char_u *saved_text = NULL; -#endif colnr_T col; colnr_T end_col; @@ -6684,11 +6661,9 @@ internal_format( * stack functions. VREPLACE does not use this, and backspaces * over the text instead. */ -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) orig_col = startcol; /* Will start backspacing from here */ else -#endif replace_offset = startcol - end_foundcol; /* @@ -6703,7 +6678,6 @@ internal_format( if (startcol < 0) startcol = 0; -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { /* @@ -6721,7 +6695,6 @@ internal_format( backspace_until_column(foundcol); } else -#endif { /* put cursor after pos. to break line */ if (!fo_white_par) @@ -6759,12 +6732,10 @@ internal_format( get_number_indent(curwin->w_cursor.lnum - 1); if (second_indent >= 0) { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) change_indent(INDENT_SET, second_indent, FALSE, NUL, TRUE); else -#endif #ifdef FEAT_COMMENTS if (leader_len > 0 && second_indent - leader_len > 0) { @@ -6793,7 +6764,6 @@ internal_format( first_line = FALSE; } -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { /* @@ -6804,7 +6774,6 @@ internal_format( vim_free(saved_text); } else -#endif { /* * Check if cursor is not past the NUL off the line, cindent @@ -7155,13 +7124,11 @@ stop_arrow(void) } ai_col = 0; -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { orig_line_count = curbuf->b_ml.ml_line_count; vr_lines_changed = 1; } -#endif ResetRedobuff(); AppendToRedobuff((char_u *)"1i"); /* pretend we start an insertion */ new_insert_skip = 2; @@ -7998,7 +7965,6 @@ replace_flush(void) replace_do_bs(int limit_col) { int cc; -#ifdef FEAT_VREPLACE int orig_len = 0; int ins_len; int orig_vcols = 0; @@ -8006,12 +7972,10 @@ replace_do_bs(int limit_col) char_u *p; int i; int vcol; -#endif cc = replace_pop(); if (cc > 0) { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { /* Get the number of screen cells used by the character we are @@ -8019,29 +7983,23 @@ replace_do_bs(int limit_col) getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL); orig_vcols = chartabsize(ml_get_cursor(), start_vcol); } -#endif #ifdef FEAT_MBYTE if (has_mbyte) { (void)del_char_after_col(limit_col); -# ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) orig_len = (int)STRLEN(ml_get_cursor()); -# endif replace_push(cc); } else #endif { pchar_cursor(cc); -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) orig_len = (int)STRLEN(ml_get_cursor()) - 1; -#endif } replace_pop_ins(); -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { /* Get the number of screen cells used by the inserted characters */ @@ -8067,7 +8025,6 @@ replace_do_bs(int limit_col) } curwin->w_cursor.col -= ins_len; } -#endif /* mark the buffer as changed and prepare for displaying */ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); @@ -8981,11 +8938,9 @@ ins_insert(int replaceState) # ifdef FEAT_EVAL set_vim_var_string(VV_INSERTMODE, - (char_u *)((State & REPLACE_FLAG) ? "i" : -# ifdef FEAT_VREPLACE - replaceState == VREPLACE ? "v" : -# endif - "r"), 1); + (char_u *)((State & REPLACE_FLAG) ? "i" + : replaceState == VREPLACE ? "v" + : "r"), 1); # endif apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf); if (State & REPLACE_FLAG) @@ -9005,11 +8960,9 @@ ins_insert(int replaceState) static void ins_ctrl_o(void) { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) restart_edit = 'V'; else -#endif if (State & REPLACE_FLAG) restart_edit = 'R'; else @@ -9082,14 +9035,12 @@ ins_del(void) else { curwin->w_cursor.col = temp; -#ifdef FEAT_VREPLACE /* Adjust orig_line_count in case more lines have been deleted than * have been added. That makes sure, that open_line() later * can access all buffer lines correctly */ if (State & VREPLACE_FLAG && orig_line_count > curbuf->b_ml.ml_line_count) orig_line_count = curbuf->b_ml.ml_line_count; -#endif } } else if (del_char(FALSE) == FAIL) /* delete char under cursor */ @@ -9244,10 +9195,8 @@ ins_bs( } else { -#ifdef FEAT_VREPLACE if (!(State & VREPLACE_FLAG) || curwin->w_cursor.lnum > orig_line_count) -#endif { temp = gchar_cursor(); /* remember current char */ --curwin->w_cursor.lnum; @@ -9271,10 +9220,8 @@ ins_bs( if (temp == NUL && gchar_cursor() != NUL) inc_cursor(); } -#ifdef FEAT_VREPLACE else dec_cursor(); -#endif /* * In REPLACE mode we have to put back the text that was replaced @@ -9401,11 +9348,9 @@ ins_bs( && curwin->w_cursor.col < Insstart_orig.col) Insstart_orig.col = curwin->w_cursor.col; -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) ins_char(' '); else -#endif { ins_str((char_u *)" "); if ((State & REPLACE_FLAG)) @@ -9719,22 +9664,31 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap) int ret_char = -1; int save_allow_keys = allow_keys; int save_paste = p_paste; - int save_ai = curbuf->b_p_ai; /* If the end code is too long we can't detect it, read everything. */ if (STRLEN(end) >= NUMBUFLEN) end = NULL; ++no_mapping; allow_keys = 0; - p_paste = TRUE; - curbuf->b_p_ai = FALSE; + if (!p_paste) + // Also have the side effects of setting 'paste' to make it work much + // faster. + set_option_value((char_u *)"paste", TRUE, NULL, 0); for (;;) { - /* When the end is not defined read everything. */ + // When the end is not defined read everything there is. if (end == NULL && vpeekc() == NUL) break; - c = plain_vgetc(); + do + { + c = vgetc(); + } while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR); + if (c == NUL || got_int) + // When CTRL-C was encountered the typeahead will be flushed and we + // won't get the end sequence. + break; + #ifdef FEAT_MBYTE if (has_mbyte) idx += (*mb_char2bytes)(c, buf + idx); @@ -9797,8 +9751,8 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap) --no_mapping; allow_keys = save_allow_keys; - p_paste = save_paste; - curbuf->b_p_ai = save_ai; + if (!save_paste) + set_option_value((char_u *)"paste", FALSE, NULL, 0); return ret_char; } @@ -10256,11 +10210,9 @@ ins_tab(void) ins_char(' '); while (--temp > 0) { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) ins_char(' '); else -#endif { ins_str((char_u *)" "); if (State & REPLACE_FLAG) /* no char replaced */ @@ -10280,10 +10232,8 @@ ins_tab(void) #endif { char_u *ptr; -#ifdef FEAT_VREPLACE char_u *saved_line = NULL; /* init for GCC */ pos_T pos; -#endif pos_T fpos; pos_T *cursor; colnr_T want_vcol, vcol; @@ -10294,7 +10244,6 @@ ins_tab(void) * Get the current line. For VREPLACE mode, don't make real changes * yet, just work on a copy of the line. */ -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { pos = curwin->w_cursor; @@ -10305,7 +10254,6 @@ ins_tab(void) ptr = saved_line + pos.col; } else -#endif { ptr = ml_get_cursor(); cursor = &curwin->w_cursor; @@ -10385,11 +10333,7 @@ ins_tab(void) { STRMOVE(ptr, ptr + i); /* correct replace stack. */ - if ((State & REPLACE_FLAG) -#ifdef FEAT_VREPLACE - && !(State & VREPLACE_FLAG) -#endif - ) + if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG)) for (temp = i; --temp >= 0; ) replace_join(repl_off); } @@ -10403,7 +10347,6 @@ ins_tab(void) #endif cursor->col -= i; -#ifdef FEAT_VREPLACE /* * In VREPLACE mode, we haven't changed anything yet. Do it now by * backspacing over the changed spacing and then inserting the new @@ -10419,13 +10362,10 @@ ins_tab(void) ins_bytes_len(saved_line + change_col, cursor->col - change_col); } -#endif } -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) vim_free(saved_line); -#endif curwin->w_p_list = save_list; } @@ -10452,11 +10392,7 @@ ins_eol(int c) * character under the cursor. Only push a NUL on the replace stack, * nothing to put back when the NL is deleted. */ - if ((State & REPLACE_FLAG) -#ifdef FEAT_VREPLACE - && !(State & VREPLACE_FLAG) -#endif - ) + if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG)) replace_push(NUL); /* @@ -10725,11 +10661,9 @@ ins_try_si(int c) curwin->w_cursor = *pos; i = get_indent(); curwin->w_cursor = old_pos; -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) change_indent(INDENT_SET, i, FALSE, NUL, TRUE); else -#endif (void)set_indent(i, SIN_CHANGED); } else if (curwin->w_cursor.col > 0) diff --git a/src/evalfunc.c b/src/evalfunc.c index d8b89aa821..94ccd4c9a1 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -6053,6 +6053,9 @@ f_has(typval_T *argvars, typval_T *rettv) "arabic", #endif "autocmd", +#ifdef FEAT_AUTOCHDIR + "autochdir", +#endif #ifdef FEAT_AUTOSERVERNAME "autoservername", #endif @@ -6467,9 +6470,7 @@ f_has(typval_T *argvars, typval_T *rettv) #ifdef FEAT_VISUALEXTRA "visualextra", #endif -#ifdef FEAT_VREPLACE "vreplace", -#endif #ifdef FEAT_VTP "vtp", #endif @@ -8005,6 +8006,36 @@ f_match(typval_T *argvars, typval_T *rettv) find_some_match(argvars, rettv, MATCH_MATCH); } +#ifdef FEAT_SEARCH_EXTRA + static int +matchadd_dict_arg(typval_T *tv, char_u **conceal_char, win_T **win) +{ + dictitem_T *di; + + if (tv->v_type != VAR_DICT) + { + EMSG(_(e_dictreq)); + return FAIL; + } + + if (dict_find(tv->vval.v_dict, (char_u *)"conceal", -1) != NULL) + *conceal_char = get_dict_string(tv->vval.v_dict, + (char_u *)"conceal", FALSE); + + if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL) + { + *win = find_win_by_nr(&di->di_tv, NULL); + if (*win == NULL) + { + EMSG(_("E957: Invalid window number")); + return FAIL; + } + } + + return OK; +} +#endif + /* * "matchadd()" function */ @@ -8019,6 +8050,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED) int id = -1; int error = FALSE; char_u *conceal_char = NULL; + win_T *win = curwin; rettv->vval.v_number = -1; @@ -8030,18 +8062,9 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED) if (argvars[3].v_type != VAR_UNKNOWN) { id = (int)get_tv_number_chk(&argvars[3], &error); - if (argvars[4].v_type != VAR_UNKNOWN) - { - if (argvars[4].v_type != VAR_DICT) - { - EMSG(_(e_dictreq)); - return; - } - if (dict_find(argvars[4].vval.v_dict, - (char_u *)"conceal", -1) != NULL) - conceal_char = get_dict_string(argvars[4].vval.v_dict, - (char_u *)"conceal", FALSE); - } + if (argvars[4].v_type != VAR_UNKNOWN + && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL) + return; } } if (error == TRUE) @@ -8052,7 +8075,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED) return; } - rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL, + rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL, conceal_char); #endif } @@ -8071,6 +8094,7 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED) int error = FALSE; list_T *l; char_u *conceal_char = NULL; + win_T *win = curwin; rettv->vval.v_number = -1; @@ -8093,18 +8117,10 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED) if (argvars[3].v_type != VAR_UNKNOWN) { id = (int)get_tv_number_chk(&argvars[3], &error); - if (argvars[4].v_type != VAR_UNKNOWN) - { - if (argvars[4].v_type != VAR_DICT) - { - EMSG(_(e_dictreq)); - return; - } - if (dict_find(argvars[4].vval.v_dict, - (char_u *)"conceal", -1) != NULL) - conceal_char = get_dict_string(argvars[4].vval.v_dict, - (char_u *)"conceal", FALSE); - } + + if (argvars[4].v_type != VAR_UNKNOWN + && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL) + return; } } if (error == TRUE) @@ -8117,7 +8133,7 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED) return; } - rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l, + rettv->vval.v_number = match_add(win, group, NULL, prio, id, l, conceal_char); #endif } @@ -8368,10 +8384,9 @@ f_mkdir(typval_T *argvars, typval_T *rettv) static void f_mode(typval_T *argvars, typval_T *rettv) { - char_u buf[3]; + char_u buf[4]; - buf[1] = NUL; - buf[2] = NUL; + vim_memset(buf, 0, sizeof(buf)); if (time_for_testing == 93784) { @@ -8403,14 +8418,12 @@ f_mode(typval_T *argvars, typval_T *rettv) buf[0] = '!'; else if (State & INSERT) { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { buf[0] = 'R'; buf[1] = 'v'; } else -#endif { if (State & REPLACE_FLAG) buf[0] = 'R'; @@ -8437,6 +8450,12 @@ f_mode(typval_T *argvars, typval_T *rettv) buf[0] = 'n'; if (finish_op) buf[1] = 'o'; + else if (restart_edit == 'I' || restart_edit == 'R' + || restart_edit == 'V') + { + buf[1] = 'i'; + buf[2] = restart_edit; + } } /* Clear out the minor mode when the argument is not a non-zero number or diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 29321a5064..f516106238 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -7875,58 +7875,37 @@ ex_shell(exarg_T *eap UNUSED) do_shell(NULL, 0); } -#if defined(HAVE_DROP_FILE) \ - || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \ - || defined(FEAT_GUI_MSWIN) \ - || defined(FEAT_GUI_MAC) \ - || defined(PROTO) \ - || defined(FEAT_GUI_MACVIM) +#if defined(HAVE_DROP_FILE) || defined(PROTO) -/* - * Handle a file drop. The code is here because a drop is *nearly* like an - * :args command, but not quite (we have a list of exact filenames, so we - * don't want to (a) parse a command line, or (b) expand wildcards. So the - * code is very similar to :args and hence needs access to a lot of the static - * functions in this file. - * - * The list should be allocated using alloc(), as should each item in the - * list. This function takes over responsibility for freeing the list. - * - * XXX The list is made into the argument list. This is freed using - * FreeWild(), which does a series of vim_free() calls. - */ - void -handle_drop( - int filec, /* the number of files dropped */ - char_u **filev, /* the list of files dropped */ - int split) /* force splitting the window */ +static int drop_busy = FALSE; +static int drop_filec; +static char_u **drop_filev = NULL; +static int drop_split; +static void (*drop_callback)(void *); +static void *drop_cookie; + + static void +handle_drop_internal(void) { exarg_T ea; int save_msg_scroll = msg_scroll; - /* Postpone this while editing the command line. */ - if (text_locked()) - return; - if (curbuf_locked()) - return; - - /* When the screen is being updated we should not change buffers and - * windows structures, it may cause freed memory to be used. */ - if (updating_screen) - return; + // Setting the argument list may cause screen updates and being called + // recursively. Avoid that by setting drop_busy. + drop_busy = TRUE; /* Check whether the current buffer is changed. If so, we will need * to split the current window or data could be lost. * We don't need to check if the 'hidden' option is set, as in this * case the buffer won't be lost. */ - if (!buf_hide(curbuf) && !split) + if (!buf_hide(curbuf) && !drop_split) { ++emsg_off; - split = check_changed(curbuf, CCGD_AW); + drop_split = check_changed(curbuf, CCGD_AW); --emsg_off; } - if (split) + if (drop_split) { if (win_split(0, 0) == FAIL) return; @@ -7941,7 +7920,7 @@ handle_drop( /* * Set up the new argument list. */ - alist_set(ALIST(curwin), filec, filev, FALSE, NULL, 0); + alist_set(ALIST(curwin), drop_filec, drop_filev, FALSE, NULL, 0); /* * Move to the first file. @@ -7959,6 +7938,78 @@ handle_drop( * unexpectedly. The screen will be redrawn by the caller, thus * msg_scroll being set by displaying a message is irrelevant. */ msg_scroll = save_msg_scroll; + + if (drop_callback != NULL) + drop_callback(drop_cookie); + + drop_filev = NULL; + drop_busy = FALSE; +} + +/* + * Handle a file drop. The code is here because a drop is *nearly* like an + * :args command, but not quite (we have a list of exact filenames, so we + * don't want to (a) parse a command line, or (b) expand wildcards. So the + * code is very similar to :args and hence needs access to a lot of the static + * functions in this file. + * + * The "filev" list must have been allocated using alloc(), as should each item + * in the list. This function takes over responsibility for freeing the "filev" + * list. + */ + void +handle_drop( + int filec, // the number of files dropped + char_u **filev, // the list of files dropped + int split, // force splitting the window + void (*callback)(void *), // to be called after setting the argument + // list + void *cookie) // argument for "callback" (allocated) +{ + // Cannot handle recursive drops, finish the pending one. + if (drop_busy) + { + FreeWild(filec, filev); + vim_free(cookie); + return; + } + + // When calling handle_drop() more than once in a row we only use the last + // one. + if (drop_filev != NULL) + { + FreeWild(drop_filec, drop_filev); + vim_free(drop_cookie); + } + + drop_filec = filec; + drop_filev = filev; + drop_split = split; + drop_callback = callback; + drop_cookie = cookie; + + // Postpone this when: + // - editing the command line + // - not possible to change the current buffer + // - updating the screen + // As it may change buffers and window structures that are in use and cause + // freed memory to be used. + if (text_locked() || curbuf_locked() || updating_screen) + return; + + handle_drop_internal(); +} + +/* + * To be called when text is unlocked, curbuf is unlocked or updating_screen is + * reset: Handle a postponed drop. + */ + void +handle_any_postponed_drop(void) +{ + if (!drop_busy && drop_filev != NULL + && !text_locked() && !curbuf_locked() && !updating_screen) + handle_drop_internal(); } #endif @@ -10681,9 +10732,9 @@ eval_vars( int resultlen; buf_T *buf; int valid = VALID_HEAD + VALID_PATH; /* assume valid result */ - int tilde_file = FALSE; int spec_idx; #ifdef FEAT_MODIFY_FNAME + int tilde_file = FALSE; int skip_mod = FALSE; #endif char_u strbuf[30]; @@ -10750,7 +10801,9 @@ eval_vars( else { result = curbuf->b_fname; +#ifdef FEAT_MODIFY_FNAME tilde_file = STRCMP(result, "~") == 0; +#endif } break; @@ -10817,7 +10870,9 @@ eval_vars( else { result = buf->b_fname; +#ifdef FEAT_MODIFY_FNAME tilde_file = STRCMP(result, "~") == 0; +#endif } } break; @@ -10977,7 +11032,7 @@ arg_all(void) #ifndef BACKSLASH_IN_FILENAME || *p == '\\' #endif - ) + || *p == '`') { /* insert a backslash */ if (retval != NULL) diff --git a/src/ex_getln.c b/src/ex_getln.c index b228ce88c5..886b0e107c 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5208,16 +5208,6 @@ expand_shellcmd( hash_init(&found_ht); for (s = path; ; s = e) { - if (*s == NUL) - { - if (did_curdir) - break; - /* Find directories in the current directory, path is empty. */ - did_curdir = TRUE; - } - else if (*s == '.') - did_curdir = TRUE; - #if defined(MSWIN) e = vim_strchr(s, ';'); #else @@ -5226,6 +5216,23 @@ expand_shellcmd( if (e == NULL) e = s + STRLEN(s); + if (*s == NUL) + { + if (did_curdir) + break; + // Find directories in the current directory, path is empty. + did_curdir = TRUE; + flags |= EW_DIR; + } + else if (STRNCMP(s, ".", (int)(e - s)) == 0) + { + did_curdir = TRUE; + flags |= EW_DIR; + } + else + // Do not match directories inside a $PATH item. + flags &= ~EW_DIR; + l = e - s; if (l > MAXPATHL - 5) break; @@ -5281,8 +5288,6 @@ expand_shellcmd( # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) -static void * call_user_expand_func(void *(*user_expand_func)(char_u *, int, typval_T *, int), expand_T *xp, int *num_file, char_u ***file); - /* * Call "user_expand_func()" to invoke a user defined Vim script function and * return the result (either a string or a List). diff --git a/src/feature.h b/src/feature.h index 022226f918..ed24fca9c7 100644 --- a/src/feature.h +++ b/src/feature.h @@ -206,13 +206,6 @@ # define FEAT_VIRTUALEDIT #endif -/* - * +vreplace "gR" and "gr" commands. - */ -#ifdef FEAT_NORMAL -# define FEAT_VREPLACE -#endif - /* * +cmdline_info 'showcmd' and 'ruler' options. */ diff --git a/src/getchar.c b/src/getchar.c index ad43543aff..8e39fabefd 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1710,18 +1710,18 @@ vgetc(void) * its ASCII equivalent */ switch (c) { - case K_KPLUS: c = '+'; break; - case K_KMINUS: c = '-'; break; - case K_KDIVIDE: c = '/'; break; + case K_KPLUS: c = '+'; break; + case K_KMINUS: c = '-'; break; + case K_KDIVIDE: c = '/'; break; case K_KMULTIPLY: c = '*'; break; - case K_KENTER: c = CAR; break; + case K_KENTER: c = CAR; break; case K_KPOINT: #ifdef WIN32 - /* Can be either '.' or a ',', * - * depending on the type of keypad. */ - c = MapVirtualKey(VK_DECIMAL, 2); break; + // Can be either '.' or a ',', + // depending on the type of keypad. + c = MapVirtualKey(VK_DECIMAL, 2); break; #else - c = '.'; break; + c = '.'; break; #endif case K_K0: c = '0'; break; case K_K1: c = '1'; break; diff --git a/src/globals.h b/src/globals.h index f87bf296fe..be645317d5 100644 --- a/src/globals.h +++ b/src/globals.h @@ -778,13 +778,11 @@ EXTERN pos_T Insstart; /* This is where the latest * op_insert(), to detect correctly where inserting by the user started. */ EXTERN pos_T Insstart_orig; -#ifdef FEAT_VREPLACE /* * Stuff for VREPLACE mode. */ EXTERN int orig_line_count INIT(= 0); /* Line count when "gR" started */ EXTERN int vr_lines_changed INIT(= 0); /* #Lines changed by "gR" so far */ -#endif #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) /* argument to SETJMP() for handling X IO errors */ diff --git a/src/gui.c b/src/gui.c index 14262ab7ee..323dd6e362 100644 --- a/src/gui.c +++ b/src/gui.c @@ -3211,10 +3211,8 @@ button_set: case SELECTMODE: checkfor = MOUSE_VISUAL; break; case REPLACE: case REPLACE+LANGMAP: -# ifdef FEAT_VREPLACE case VREPLACE: case VREPLACE+LANGMAP: -# endif case INSERT: case INSERT+LANGMAP: checkfor = MOUSE_INSERT; break; case ASKMORE: @@ -5433,11 +5431,7 @@ gui_do_findrepl( #endif -#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \ - || defined(FEAT_GUI_MSWIN) \ - || defined(FEAT_GUI_MAC) \ - || defined(PROTO) \ - || defined(FEAT_GUI_MACVIM) +#if defined(HAVE_DROP_FILE) || defined(PROTO) static void gui_wingoto_xy(int x, int y); @@ -5459,6 +5453,42 @@ gui_wingoto_xy(int x, int y) } } +/* + * Function passed to handle_drop() for the actions to be done after the + * argument list has been updated. + */ + static void +drop_callback(void *cookie) +{ + char_u *p = cookie; + + /* If Shift held down, change to first file's directory. If the first + * item is a directory, change to that directory (and let the explorer + * plugin show the contents). */ + if (p != NULL) + { + if (mch_isdir(p)) + { + if (mch_chdir((char *)p) == 0) + shorten_fnames(TRUE); + } + else if (vim_chdirfile(p, "drop") == OK) + shorten_fnames(TRUE); + vim_free(p); + } + + /* Update the screen display */ + update_screen(NOT_VALID); +# ifdef FEAT_MENU + gui_update_menus(0); +# endif +#ifdef FEAT_TITLE + maketitle(); +#endif + setcursor(); + out_flush_cursor(FALSE, FALSE); +} + /* * Process file drop. Mouse cursor position, key modifiers, name of files * and count of files are given. Argument "fnames[count]" has full pathnames @@ -5539,33 +5569,8 @@ gui_handle_drop( vim_free(fnames); } else - handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0); - - /* If Shift held down, change to first file's directory. If the first - * item is a directory, change to that directory (and let the explorer - * plugin show the contents). */ - if (p != NULL) - { - if (mch_isdir(p)) - { - if (mch_chdir((char *)p) == 0) - shorten_fnames(TRUE); - } - else if (vim_chdirfile(p, "drop") == OK) - shorten_fnames(TRUE); - vim_free(p); - } - - /* Update the screen display */ - update_screen(NOT_VALID); -# ifdef FEAT_MENU - gui_update_menus(0); -# endif -#ifdef FEAT_TITLE - maketitle(); -#endif - setcursor(); - out_flush_cursor(FALSE, FALSE); + handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0, + drop_callback, (void *)p); } entered = FALSE; diff --git a/src/gui.h b/src/gui.h index fbdfd156cf..f76c39a0d1 100644 --- a/src/gui.h +++ b/src/gui.h @@ -66,8 +66,10 @@ /* * GUIs that support dropping files on a running Vim. */ -#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \ - || defined(FEAT_GUI_GTK) +#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \ + || defined(FEAT_GUI_MSWIN) \ + || defined(FEAT_GUI_MAC) \ + || defined(FEAT_GUI_MACVIM) # define HAVE_DROP_FILE #endif diff --git a/src/gui_mac.c b/src/gui_mac.c index 6927246879..bea9615cbe 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -1007,6 +1007,55 @@ struct SelectionRange /* for handling kCoreClassEvent:kOpenDocuments:keyAEPositi long theDate; // modification date/time }; +static long drop_numFiles; +static short drop_gotPosition; +static SelectionRange drop_thePosition; + + static void +drop_callback(void *cookie UNUSED) +{ + /* TODO: Handle the goto/select line more cleanly */ + if ((drop_numFiles == 1) & (drop_gotPosition)) + { + if (drop_thePosition.lineNum >= 0) + { + lnum = drop_thePosition.lineNum + 1; + /* oap->motion_type = MLINE; + setpcmark();*/ + if (lnum < 1L) + lnum = 1L; + else if (lnum > curbuf->b_ml.ml_line_count) + lnum = curbuf->b_ml.ml_line_count; + curwin->w_cursor.lnum = lnum; + curwin->w_cursor.col = 0; + /* beginline(BL_SOL | BL_FIX);*/ + } + else + goto_byte(drop_thePosition.startRange + 1); + } + + /* Update the screen display */ + update_screen(NOT_VALID); + + /* Select the text if possible */ + if (drop_gotPosition) + { + VIsual_active = TRUE; + VIsual_select = FALSE; + VIsual = curwin->w_cursor; + if (drop_thePosition.lineNum < 0) + { + VIsual_mode = 'v'; + goto_byte(drop_thePosition.endRange); + } + else + { + VIsual_mode = 'V'; + VIsual.col = 0; + } + } +} + /* The IDE uses the optional keyAEPosition parameter to tell the ed- itor the selection range. If lineNum is zero or greater, scroll the text to the specified line. If lineNum is less than zero, use the values in @@ -1113,48 +1162,10 @@ HandleODocAE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon) } /* Handle the drop, :edit to get to the file */ - handle_drop(numFiles, fnames, FALSE); - - /* TODO: Handle the goto/select line more cleanly */ - if ((numFiles == 1) & (gotPosition)) - { - if (thePosition.lineNum >= 0) - { - lnum = thePosition.lineNum + 1; - /* oap->motion_type = MLINE; - setpcmark();*/ - if (lnum < 1L) - lnum = 1L; - else if (lnum > curbuf->b_ml.ml_line_count) - lnum = curbuf->b_ml.ml_line_count; - curwin->w_cursor.lnum = lnum; - curwin->w_cursor.col = 0; - /* beginline(BL_SOL | BL_FIX);*/ - } - else - goto_byte(thePosition.startRange + 1); - } - - /* Update the screen display */ - update_screen(NOT_VALID); - - /* Select the text if possible */ - if (gotPosition) - { - VIsual_active = TRUE; - VIsual_select = FALSE; - VIsual = curwin->w_cursor; - if (thePosition.lineNum < 0) - { - VIsual_mode = 'v'; - goto_byte(thePosition.endRange); - } - else - { - VIsual_mode = 'V'; - VIsual.col = 0; - } - } + drop_numFiles = numFiles; + drop_gotPosition = gotPosition; + drop_thePosition = thePosition; + handle_drop(numFiles, fnames, FALSE, drop_callback, NULL); setcursor(); out_flush(); diff --git a/src/if_ruby.c b/src/if_ruby.c index 4b9af318d2..2e1f8d75ae 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -1085,8 +1085,10 @@ static VALUE vim_to_ruby(typval_T *tv) } else if (tv->v_type == VAR_SPECIAL) { - if (tv->vval.v_number <= VVAL_TRUE) - result = INT2NUM(tv->vval.v_number); + if (tv->vval.v_number == VVAL_TRUE) + result = Qtrue; + else if (tv->vval.v_number == VVAL_FALSE) + result = Qfalse; } /* else return Qnil; */ return result; diff --git a/src/installman.sh b/src/installman.sh index a2f09ad35e..23fc32568b 100755 --- a/src/installman.sh +++ b/src/installman.sh @@ -48,41 +48,49 @@ fi if test $what = "install"; then # vim.1 - echo installing $destdir/$exename.1 - LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ - -e s+$vimloc/doc+$helpsubloc+ \ - -e s+$vimloc/print+$printsubloc+ \ - -e s+$vimloc/syntax+$synsubloc+ \ - -e s+$vimloc/tutor+$tutorsubloc+ \ - -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \ - -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \ - -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \ - -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \ - -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \ - -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \ - -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \ - -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \ - $helpsource/vim$langadd.1 > $destdir/$exename.1 - chmod $manmod $destdir/$exename.1 + if test -r $helpsource/vim$langadd.1; then + echo installing $destdir/$exename.1 + LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/doc+$helpsubloc+ \ + -e s+$vimloc/print+$printsubloc+ \ + -e s+$vimloc/syntax+$synsubloc+ \ + -e s+$vimloc/tutor+$tutorsubloc+ \ + -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \ + -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \ + -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \ + -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \ + -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \ + -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \ + -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \ + -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \ + $helpsource/vim$langadd.1 > $destdir/$exename.1 + chmod $manmod $destdir/$exename.1 + fi # vimtutor.1 - echo installing $destdir/$exename""tutor.1 - LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ - -e s+$vimloc/tutor+$tutorsubloc+ \ - $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 - chmod $manmod $destdir/$exename""tutor.1 + if test -r $helpsource/vimtutor$langadd.1; then + echo installing $destdir/$exename""tutor.1 + LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/tutor+$tutorsubloc+ \ + $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 + chmod $manmod $destdir/$exename""tutor.1 + fi # vimdiff.1 - echo installing $destdir/$vimdiffname.1 - cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1 - chmod $manmod $destdir/$vimdiffname.1 + if test -r $helpsource/vimdiff$langadd.1; then + echo installing $destdir/$vimdiffname.1 + cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1 + chmod $manmod $destdir/$vimdiffname.1 + fi # evim.1 - echo installing $destdir/$evimname.1 - LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ - -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ - $helpsource/evim$langadd.1 > $destdir/$evimname.1 - chmod $manmod $destdir/$evimname.1 + if test -r $helpsource/evim$langadd.1; then + echo installing $destdir/$evimname.1 + LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ + $helpsource/evim$langadd.1 > $destdir/$evimname.1 + chmod $manmod $destdir/$evimname.1 + fi fi if test $what = "uninstall"; then @@ -105,7 +113,7 @@ if test $what = "uninstall"; then fi fi -if test $what = "xxd"; then +if test $what = "xxd" -a -r "$helpsource/xxd${langadd}.1"; then echo installing $destdir/xxd.1 cp $helpsource/xxd$langadd.1 $destdir/xxd.1 chmod $manmod $destdir/xxd.1 diff --git a/src/macros.h b/src/macros.h index c91b4b6205..1654e3e558 100644 --- a/src/macros.h +++ b/src/macros.h @@ -235,11 +235,7 @@ # define TIME_MSG(s) do { /**/ } while (0) #endif -#ifdef FEAT_VREPLACE -# define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG)) -#else -# define REPLACE_NORMAL(s) ((s) & REPLACE_FLAG) -#endif +#define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG)) #ifdef FEAT_ARABIC # define UTF_COMPOSINGLIKE(p1, p2) utf_composinglike((p1), (p2)) diff --git a/src/main.c b/src/main.c index 9406046369..e3e4df909b 100644 --- a/src/main.c +++ b/src/main.c @@ -971,7 +971,7 @@ vim_main2(void) /* * Call the main command loop. This never returns. - */ + */ main_loop(FALSE, FALSE); #ifdef FEAT_GUI_MACVIM @@ -1224,9 +1224,15 @@ main_loop( else if (do_redraw || stuff_empty()) { #ifdef FEAT_GUI - /* If ui_breakcheck() was used a resize may have been postponed. */ + // If ui_breakcheck() was used a resize may have been postponed. gui_may_resize_shell(); #endif +#ifdef HAVE_DROP_FILE + // If files were dropped while text was locked or the curbuf was + // locked, this would be a good time to handle the drop. + handle_any_postponed_drop(); +#endif + /* Trigger CursorMoved if the cursor moved. */ if (!finish_op && ( has_cursormoved() diff --git a/src/misc1.c b/src/misc1.c index 52a560afee..f5dd978d29 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -784,10 +784,7 @@ open_line( char_u *leader = NULL; /* copy of comment leader */ #endif char_u *allocated = NULL; /* allocated memory */ -#if defined(FEAT_SMARTINDENT) || defined(FEAT_VREPLACE) || defined(FEAT_LISP) \ - || defined(FEAT_CINDENT) || defined(FEAT_COMMENTS) char_u *p; -#endif int saved_char = NUL; /* init for GCC */ #if defined(FEAT_SMARTINDENT) || defined(FEAT_COMMENTS) pos_T *pos; @@ -804,7 +801,7 @@ open_line( int no_si = FALSE; /* reset did_si afterwards */ int first_char = NUL; /* init for GCC */ #endif -#if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) +#if defined(FEAT_LISP) || defined(FEAT_CINDENT) int vreplace_mode; #endif int did_append; /* appended a new line */ @@ -817,7 +814,6 @@ open_line( if (saved_line == NULL) /* out of memory! */ return FALSE; -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { /* @@ -857,13 +853,8 @@ open_line( } saved_line[curwin->w_cursor.col] = NUL; } -#endif - if ((State & INSERT) -#ifdef FEAT_VREPLACE - && !(State & VREPLACE_FLAG) -#endif - ) + if ((State & INSERT) && !(State & VREPLACE_FLAG)) { p_extra = saved_line + curwin->w_cursor.col; #ifdef FEAT_SMARTINDENT @@ -1601,9 +1592,7 @@ open_line( old_cursor = curwin->w_cursor; if (dir == BACKWARD) --curwin->w_cursor.lnum; -#ifdef FEAT_VREPLACE if (!(State & VREPLACE_FLAG) || old_cursor.lnum >= orig_line_count) -#endif { if (ml_append(curwin->w_cursor.lnum, p_extra, (colnr_T)0, FALSE) == FAIL) @@ -1620,7 +1609,6 @@ open_line( mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L); did_append = TRUE; } -#ifdef FEAT_VREPLACE else { /* @@ -1640,7 +1628,6 @@ open_line( curwin->w_cursor.lnum--; did_append = FALSE; } -#endif if (newindent #ifdef FEAT_SMARTINDENT @@ -1744,7 +1731,7 @@ open_line( curwin->w_cursor.coladd = 0; #endif -#if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) +#if defined(FEAT_LISP) || defined(FEAT_CINDENT) /* * In VREPLACE mode, we are handling the replace stack ourselves, so stop * fixthisline() from doing it (via change_indent()) by telling it we're in @@ -1791,12 +1778,11 @@ open_line( ai_col = (colnr_T)getwhitecols_curline(); } #endif -#if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) +#if defined(FEAT_LISP) || defined(FEAT_CINDENT) if (vreplace_mode != 0) State = vreplace_mode; #endif -#ifdef FEAT_VREPLACE /* * Finally, VREPLACE gets the stuff on the new line, then puts back the * original line, and inserts the new stuff char by char, pushing old stuff @@ -1821,7 +1807,6 @@ open_line( vim_free(p_extra); next_line = NULL; } -#endif retval = OK; /* success! */ theend: @@ -2307,7 +2292,6 @@ plines_m_win(win_T *wp, linenr_T first, linenr_T last) return (count); } -#if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) || defined(PROTO) /* * Insert string "p" at the cursor position. Stops at a NUL byte. * Handles Replace mode and multi-byte characters. @@ -2317,10 +2301,7 @@ ins_bytes(char_u *p) { ins_bytes_len(p, (int)STRLEN(p)); } -#endif -#if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \ - || defined(FEAT_COMMENTS) || defined(FEAT_MBYTE) || defined(PROTO) /* * Insert string "p" with length "len" at the cursor position. * Handles Replace mode and multi-byte characters. @@ -2329,7 +2310,7 @@ ins_bytes(char_u *p) ins_bytes_len(char_u *p, int len) { int i; -# ifdef FEAT_MBYTE +#ifdef FEAT_MBYTE int n; if (has_mbyte) @@ -2343,11 +2324,10 @@ ins_bytes_len(char_u *p, int len) ins_char_bytes(p + i, n); } else -# endif +#endif for (i = 0; i < len; ++i) ins_char(p[i]); } -#endif /* * Insert or replace a single character at the cursor position. @@ -2406,7 +2386,6 @@ ins_char_bytes(char_u *buf, int charlen) if (State & REPLACE_FLAG) { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) { colnr_T new_vcol = 0; /* init for GCC */ @@ -2456,7 +2435,6 @@ ins_char_bytes(char_u *buf, int charlen) curwin->w_p_list = old_list; } else -#endif if (oldp[col] != NUL) { /* normal replace */ diff --git a/src/misc2.c b/src/misc2.c index 70c86b811c..50b5f609b5 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -3773,10 +3773,8 @@ get_shape_idx(int mouse) #endif if (!mouse && State == SHOWMATCH) return SHAPE_IDX_SM; -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) return SHAPE_IDX_R; -#endif if (State & REPLACE_FLAG) return SHAPE_IDX_R; if (State & INSERT) diff --git a/src/normal.c b/src/normal.c index 653b7b50ec..5af730335c 100644 --- a/src/normal.c +++ b/src/normal.c @@ -111,9 +111,7 @@ static void nv_findpar(cmdarg_T *cap); static void nv_undo(cmdarg_T *cap); static void nv_kundo(cmdarg_T *cap); static void nv_Replace(cmdarg_T *cap); -#ifdef FEAT_VREPLACE static void nv_vreplace(cmdarg_T *cap); -#endif static void v_swap_corners(int cmdchar); static void nv_replace(cmdarg_T *cap); static void n_swapchar(cmdarg_T *cap); @@ -7333,7 +7331,6 @@ nv_Replace(cmdarg_T *cap) } } -#ifdef FEAT_VREPLACE /* * "gr". */ @@ -7356,15 +7353,14 @@ nv_vreplace(cmdarg_T *cap) cap->extra_char = get_literal(); stuffcharReadbuff(cap->extra_char); stuffcharReadbuff(ESC); -# ifdef FEAT_VIRTUALEDIT +#ifdef FEAT_VIRTUALEDIT if (virtual_active()) coladvance(getviscol()); -# endif +#endif invoke_edit(cap, TRUE, 'v', FALSE); } } } -#endif /* * Swap case for "~" command, when it does not work like an operator. @@ -7977,7 +7973,6 @@ nv_g_cmd(cmdarg_T *cap) clearopbeep(oap); break; -#ifdef FEAT_VREPLACE /* * "gR": Enter virtual replace mode. */ @@ -7989,7 +7984,6 @@ nv_g_cmd(cmdarg_T *cap) case 'r': nv_vreplace(cap); break; -#endif case '&': do_cmdline_cmd((char_u *)"%s//~/&"); diff --git a/src/ops.c b/src/ops.c index 26e15f753e..50ebf44495 100644 --- a/src/ops.c +++ b/src/ops.c @@ -376,11 +376,9 @@ shift_line( } /* Set new indent */ -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) change_indent(INDENT_SET, count, FALSE, NUL, call_changed_bytes); else -#endif (void)set_indent(count, call_changed_bytes ? SIN_CHANGED : 0); } diff --git a/src/po/Make_all.mak b/src/po/Make_all.mak index eabab38282..e16b9acf2b 100644 --- a/src/po/Make_all.mak +++ b/src/po/Make_all.mak @@ -21,6 +21,7 @@ LANGUAGES = \ ja.sjis \ ko \ ko.UTF-8 \ + lv \ nb \ nl \ no \ @@ -42,7 +43,6 @@ LANGUAGES = \ zh_CN.cp936 \ zh_TW \ zh_TW.UTF-8 \ - lv \ MOFILES = \ @@ -61,6 +61,7 @@ MOFILES = \ ja.mo \ ko.UTF-8.mo \ ko.mo \ + lv.mo \ nb.mo \ nl.mo \ no.mo \ @@ -76,7 +77,6 @@ MOFILES = \ zh_CN.mo \ zh_TW.UTF-8.mo \ zh_TW.mo \ - lv.mo \ MOCONVERTED = \ diff --git a/src/po/ja.euc-jp.po b/src/po/ja.euc-jp.po index f902a99af1..477a817b03 100644 --- a/src/po/ja.euc-jp.po +++ b/src/po/ja.euc-jp.po @@ -4,7 +4,7 @@ # Do ":help credits" in Vim to see a list of people who contributed. # # Copyright (C) 2001-2018 MURAOKA Taro , -# vim-jp (http://vim-jp.org/) +# vim-jp # # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. # @@ -14,14 +14,14 @@ msgid "" msgstr "" "Project-Id-Version: Vim 8.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-01 10:46+0900\n" +"POT-Creation-Date: 2018-07-18 00:43+0900\n" "PO-Revision-Date: 2017-05-18 00:45+0900\n" "Last-Translator: MURAOKA Taro \n" -"Language-Team: vim-jp (https://github.com/vim-jp/lang-ja)\n" -"Language: Japanese\n" +"Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=euc-jp\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "E831: bf_key_init() called with empty password" @@ -204,6 +204,9 @@ msgstr "" msgid "E382: Cannot write, 'buftype' option is set" msgstr "E382: 'buftype' ¥ª¥×¥·¥ç¥ó¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¤Î¤Ç½ñ¹þ¤á¤Þ¤»¤ó" +msgid "[Prompt]" +msgstr "[¥×¥í¥ó¥×¥È]" + msgid "[Scratch]" msgstr "[²¼½ñ¤­]" @@ -258,10 +261,10 @@ msgstr "E917: %s() msgid "E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel" msgstr "" -"E912: raw ¤ä nl ¥â¡¼¥É¤Î¥Á¥ã¥ó¥Í¥ë¤Ë ch_evalexpr()/ch_sendexpr() ¤Ï»È¤¨¤Þ¤»¤ó" +"E912: raw ¤ä nl ¥â¡¼¥É¤Î¥Á¥ã¥Í¥ë¤Ë ch_evalexpr()/ch_sendexpr() ¤Ï»È¤¨¤Þ¤»¤ó" msgid "E906: not an open channel" -msgstr "E906: ³«¤¤¤Æ¤¤¤Ê¤¤¥Á¥ã¥ó¥Í¥ë¤Ç¤¹" +msgstr "E906: ³«¤¤¤Æ¤¤¤Ê¤¤¥Á¥ã¥Í¥ë¤Ç¤¹" msgid "E920: _io file requires _name to be set" msgstr "E920: _io ¥Õ¥¡¥¤¥ë¤Ï _name ¤ÎÀßÄ꤬ɬÍפǤ¹" @@ -521,7 +524,6 @@ msgstr "E710: msgid "E711: List value has not enough items" msgstr "E711: ¥ê¥¹¥È·¿ÊÑ¿ô¤Ë½½Ê¬¤Ê¿ô¤ÎÍ×ÁǤ¬¤¢¤ê¤Þ¤»¤ó" -# msgid "E690: Missing \"in\" after :for" msgstr "E690: :for ¤Î¸å¤Ë \"in\" ¤¬¤¢¤ê¤Þ¤»¤ó" @@ -590,7 +592,7 @@ msgid "E910: Using a Job as a Number" msgstr "E910: ¥¸¥ç¥Ö¤ò¿ôÃͤȤ·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" msgid "E913: Using a Channel as a Number" -msgstr "E913: ¥Á¥ã¥ó¥Í¥ë¤ò¿ôÃͤȤ·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" +msgstr "E913: ¥Á¥ã¥Í¥ë¤ò¿ôÃͤȤ·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" msgid "E891: Using a Funcref as a Float" msgstr "E891: ´Ø¿ô»²¾È·¿¤òÉâÆ°¾®¿ôÅÀ¿ô¤È¤·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" @@ -611,7 +613,7 @@ msgid "E911: Using a Job as a Float" msgstr "E911: ¥¸¥ç¥Ö¤òÉâÆ°¾®¿ôÅÀ¿ô¤È¤·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" msgid "E914: Using a Channel as a Float" -msgstr "E914: ¥Á¥ã¥ó¥Í¥ë¤òÉâÆ°¾®¿ôÅÀ¿ô¤È¤·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" +msgstr "E914: ¥Á¥ã¥Í¥ë¤òÉâÆ°¾®¿ôÅÀ¿ô¤È¤·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" msgid "E729: using Funcref as a String" msgstr "E729: ´Ø¿ô»²¾È·¿¤òʸ»úÎó¤È¤·¤Æ°·¤Ã¤Æ¤¤¤Þ¤¹" @@ -1424,6 +1426,9 @@ msgstr "E784: msgid "Already only one tab page" msgstr "´û¤Ë¥¿¥Ö¥Ú¡¼¥¸¤Ï1¤Ä¤·¤«¤¢¤ê¤Þ¤»¤ó" +msgid "Edit File in new tab page" +msgstr "¿·¤·¤¤¥¿¥Ö¥Ú¡¼¥¸¤Ç¥Õ¥¡¥¤¥ë¤òÊÔ½¸¤·¤Þ¤¹" + msgid "Edit File in new window" msgstr "¿·¤·¤¤¥¦¥£¥ó¥É¥¦¤Ç¥Õ¥¡¥¤¥ë¤òÊÔ½¸¤·¤Þ¤¹" @@ -2284,10 +2289,10 @@ msgstr " msgid "Open tab..." msgstr "¥¿¥Ö¥Ú¡¼¥¸¤ò³«¤¯" -msgid "Find string (use '\\\\' to find a '\\')" +msgid "Find string (use '\\\\' to find a '\\')" msgstr "¸¡º÷ʸ»úÎó ('\\' ¤ò¸¡º÷¤¹¤ë¤Ë¤Ï '\\\\')" -msgid "Find & Replace (use '\\\\' to find a '\\')" +msgid "Find & Replace (use '\\\\' to find a '\\')" msgstr "¸¡º÷¡¦ÃÖ´¹ ('\\' ¤ò¸¡º÷¤¹¤ë¤Ë¤Ï '\\\\')" msgid "Not Used" @@ -2705,6 +2710,19 @@ msgstr " msgid "not allowed in the Vim sandbox" msgstr "¥µ¥ó¥É¥Ü¥Ã¥¯¥¹¤Ç¤Ïµö¤µ¤ì¤Þ¤»¤ó" +#, c-format +msgid "E370: Could not load library %s" +msgstr "E370: ¥é¥¤¥Ö¥é¥ê %s ¤ò¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿" + +msgid "Sorry, this command is disabled: the Perl library could not be loaded." +msgstr "" +"¤³¤Î¥³¥Þ¥ó¥É¤Ï̵¸ú¤Ç¤¹¡¢¤´¤á¤ó¤Ê¤µ¤¤: Perl¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿." + +msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" +msgstr "" +"E299: ¥µ¥ó¥É¥Ü¥Ã¥¯¥¹¤Ç¤Ï Safe ¥â¥¸¥å¡¼¥ë¤ò»ÈÍѤ·¤Ê¤¤Perl¥¹¥¯¥ê¥×¥È¤Ï¶Ø¤¸¤é¤ì" +"¤Æ¤¤¤Þ¤¹" + msgid "E836: This Vim cannot execute :python after using :py3" msgstr "E836: ¤³¤ÎVim¤Ç¤Ï :py3 ¤ò»È¤Ã¤¿¸å¤Ë :python ¤ò»È¤¨¤Þ¤»¤ó" @@ -4703,7 +4721,6 @@ msgstr "E777: ʸ msgid "E369: invalid item in %s%%[]" msgstr "E369: ̵¸ú¤Ê¹àÌܤǤ¹: %s%%[]" -# #, c-format msgid "E769: Missing ] after %s[" msgstr "E769: %s[ ¤Î¸å¤Ë ] ¤¬¤¢¤ê¤Þ¤»¤ó" @@ -4726,15 +4743,12 @@ msgstr "E54: %s( msgid "E55: Unmatched %s)" msgstr "E55: %s) ¤¬Äà¤ê¹ç¤Ã¤Æ¤¤¤Þ¤»¤ó" -# msgid "E66: \\z( not allowed here" msgstr "E66: \\z( ¤Ï¥³¥³¤Ç¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -# msgid "E67: \\z1 - \\z9 not allowed here" -msgstr "E67: \\z1 ¤½¤Î¾¤Ï¥³¥³¤Ç¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" +msgstr "E67: \\z1 - \\z9 ¤Ï¥³¥³¤Ç¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -# #, c-format msgid "E69: Missing ] after %s%%[" msgstr "E69: %s%%[ ¤Î¸å¤Ë ] ¤¬¤¢¤ê¤Þ¤»¤ó" @@ -4743,7 +4757,9 @@ msgstr "E69: %s%%[ msgid "E70: Empty %s%%[]" msgstr "E70: %s%%[] ¤¬¶õ¤Ç¤¹" -# +msgid "E956: Cannot use pattern recursively" +msgstr "E956: ¥Ñ¥¿¡¼¥ó¤òºÆµ¢Åª¤Ë»È¤¦¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó" + msgid "E65: Illegal back reference" msgstr "E65: ÉÔÀµ¤Ê¸åÊý»²¾È¤Ç¤¹" @@ -4776,7 +4792,6 @@ msgstr "E61:%s* msgid "E62: Nested %s%c" msgstr "E62:%s%c ¤¬Æþ¤ì»Ò¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹" -# msgid "E63: invalid use of \\_" msgstr "E63: \\_ ¤Î̵¸ú¤Ê»ÈÍÑÊýË¡¤Ç¤¹" @@ -4784,16 +4799,13 @@ msgstr "E63: \\_ msgid "E64: %s%c follows nothing" msgstr "E64:%s%c ¤Î¸å¤Ë¤Ê¤Ë¤â¤¢¤ê¤Þ¤»¤ó" -# msgid "E68: Invalid character after \\z" msgstr "E68: \\z ¤Î¸å¤ËÉÔÀµ¤Êʸ»ú¤¬¤¢¤ê¤Þ¤·¤¿" -# #, c-format msgid "E678: Invalid character after %s%%[dxouU]" msgstr "E678: %s%%[dxouU] ¤Î¸å¤ËÉÔÀµ¤Êʸ»ú¤¬¤¢¤ê¤Þ¤·¤¿" -# #, c-format msgid "E71: Invalid character after %s%%" msgstr "E71: %s%% ¤Î¸å¤ËÉÔÀµ¤Êʸ»ú¤¬¤¢¤ê¤Þ¤·¤¿" @@ -4826,7 +4838,6 @@ msgstr "E865: (NFA) msgid "E866: (NFA regexp) Misplaced %c" msgstr "E866: (NFA Àµµ¬É½¸½) °ÌÃÖ¤¬¸í¤Ã¤Æ¤¤¤Þ¤¹: %c" -# #, c-format msgid "E877: (NFA regexp) Invalid character class: %ld" msgstr "E877: (NFA Àµµ¬É½¸½) ̵¸ú¤Êʸ»ú¥¯¥é¥¹: %ld" @@ -4864,6 +4875,11 @@ msgstr "E879: (NFA msgid "E873: (NFA regexp) proper termination error" msgstr "E873: (NFA Àµµ¬É½¸½) ½ªÃ¼µ­¹æ¤¬¤¢¤ê¤Þ¤»¤ó" +msgid "Could not open temporary log file for writing, displaying on stderr... " +msgstr "" +"NFAÀµµ¬É½¸½¥¨¥ó¥¸¥óÍÑ¤Î¥í¥°¥Õ¥¡¥¤¥ë¤ò½ñ¹þÍѤȤ·¤Æ³«¤±¤Þ¤»¤ó¡£¥í¥°¤Ïɸ½à¥¨¥é¡¼" +"½ÐÎϤ˽ÐÎϤ·¤Þ¤¹¡£" + msgid "E874: (NFA) Could not pop the stack!" msgstr "E874: (NFA) ¥¹¥¿¥Ã¥¯¤ò¥Ý¥Ã¥×¤Ç¤­¤Þ¤»¤ó!" @@ -4880,19 +4896,6 @@ msgstr "E876: (NFA msgid "E878: (NFA) Could not allocate memory for branch traversal!" msgstr "E878: (NFA) ¸½ºß²£ÃÇÃæ¤Î¥Ö¥é¥ó¥Á¤Ë½½Ê¬¤Ê¥á¥â¥ê¤ò³ä¤êÅö¤Æ¤é¤ì¤Þ¤»¤ó!" -msgid "" -"Could not open temporary log file for writing, displaying on stderr... " -msgstr "" -"NFAÀµµ¬É½¸½¥¨¥ó¥¸¥óÍÑ¤Î¥í¥°¥Õ¥¡¥¤¥ë¤ò½ñ¹þÍѤȤ·¤Æ³«¤±¤Þ¤»¤ó¡£¥í¥°¤Ïɸ½à½ÐÎϤË" -"½ÐÎϤ·¤Þ¤¹¡£" - -#, c-format -msgid "(NFA) COULD NOT OPEN %s !" -msgstr "(NFA) ¥í¥°¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó!" - -msgid "Could not open temporary log file for writing " -msgstr "NFAÀµµ¬É½¸½¥¨¥ó¥¸¥óÍÑ¤Î¥í¥°¥Õ¥¡¥¤¥ë¤ò½ñ¹þÍѤȤ·¤Æ³«¤±¤Þ¤»¤ó¡£" - msgid " VREPLACE" msgstr " ²¾ÁÛÃÖ´¹" @@ -4983,7 +4986,7 @@ msgstr " #, c-format msgid "Searching included file %s" -msgstr "¥¤¥ó¥¯¥ë¡¼¥É¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò¥¹¥­¥ã¥óÃæ %s" +msgstr "¥¤¥ó¥¯¥ë¡¼¥É¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò¸¡º÷Ãæ %s" msgid "E387: Match is on current line" msgstr "E387: ¸½ºß¹Ô¤Ë³ºÅö¤¬¤¢¤ê¤Þ¤¹" @@ -5251,7 +5254,7 @@ msgstr " #, c-format msgid "Reading dictionary file %s..." -msgstr "¼­½ñ¥Õ¥¡¥¤¥ë %s ¤ò¥¹¥­¥ã¥óÃæ..." +msgstr "¼­½ñ¥Õ¥¡¥¤¥ë %s ¤òÆÉ¹þ¤ßÃæ..." #, c-format msgid "E760: No word count in %s" @@ -5279,7 +5282,7 @@ msgstr " #, c-format msgid "Reading word file %s..." -msgstr "ɸ½àÆþÎϤ«¤éÆÉ¹þ¤ßÃæ %s..." +msgstr "ñ¸ì¥Õ¥¡¥¤¥ë %s ¤òÆÉ¹þ¤ßÃæ..." #, c-format msgid "Duplicate /encoding= line ignored in %s line %d: %s" @@ -6030,6 +6033,10 @@ msgstr "E133: msgid "E107: Missing parentheses: %s" msgstr "E107: ¥«¥Ã¥³ '(' ¤¬¤¢¤ê¤Þ¤»¤ó: %s" +#, c-format +msgid "%s (%s, compiled %s)" +msgstr "%s (%s, compiled %s)" + msgid "" "\n" "MS-Windows 64-bit GUI version" @@ -6353,19 +6360,6 @@ msgstr "E802: ̵ msgid "E803: ID not found: %ld" msgstr "E803: ID ¤Ï¤¢¤ê¤Þ¤»¤ó: %ld" -#, c-format -msgid "E370: Could not load library %s" -msgstr "E370: ¥é¥¤¥Ö¥é¥ê %s ¤ò¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿" - -msgid "Sorry, this command is disabled: the Perl library could not be loaded." -msgstr "" -"¤³¤Î¥³¥Þ¥ó¥É¤Ï̵¸ú¤Ç¤¹¡¢¤´¤á¤ó¤Ê¤µ¤¤: Perl¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿." - -msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" -msgstr "" -"E299: ¥µ¥ó¥É¥Ü¥Ã¥¯¥¹¤Ç¤Ï Safe ¥â¥¸¥å¡¼¥ë¤ò»ÈÍѤ·¤Ê¤¤Perl¥¹¥¯¥ê¥×¥È¤Ï¶Ø¤¸¤é¤ì" -"¤Æ¤¤¤Þ¤¹" - msgid "Edit with &multiple Vims" msgstr "Ê£¿ô¤ÎVim¤ÇÊÔ½¸¤¹¤ë (&M)" diff --git a/src/po/ja.po b/src/po/ja.po index 874ee84c81..2dfad1c45b 100644 --- a/src/po/ja.po +++ b/src/po/ja.po @@ -4,7 +4,7 @@ # Do ":help credits" in Vim to see a list of people who contributed. # # Copyright (C) 2001-2018 MURAOKA Taro , -# vim-jp (http://vim-jp.org/) +# vim-jp # # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. # @@ -14,14 +14,14 @@ msgid "" msgstr "" "Project-Id-Version: Vim 8.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-01 10:46+0900\n" +"POT-Creation-Date: 2018-07-18 00:43+0900\n" "PO-Revision-Date: 2017-05-18 00:45+0900\n" "Last-Translator: MURAOKA Taro \n" -"Language-Team: vim-jp (https://github.com/vim-jp/lang-ja)\n" -"Language: Japanese\n" +"Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "E831: bf_key_init() called with empty password" @@ -204,6 +204,9 @@ msgstr "" msgid "E382: Cannot write, 'buftype' option is set" msgstr "E382: 'buftype' オプションãŒè¨­å®šã•れã¦ã„ã‚‹ã®ã§æ›¸è¾¼ã‚ã¾ã›ã‚“" +msgid "[Prompt]" +msgstr "[プロンプト]" + msgid "[Scratch]" msgstr "[下書ã]" @@ -258,10 +261,10 @@ msgstr "E917: %s() ã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã¯ä½¿ãˆã¾ã›ã‚“" msgid "E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel" msgstr "" -"E912: raw ã‚„ nl モードã®ãƒãƒ£ãƒ³ãƒãƒ«ã« ch_evalexpr()/ch_sendexpr() ã¯ä½¿ãˆã¾ã›ã‚“" +"E912: raw ã‚„ nl モードã®ãƒãƒ£ãƒãƒ«ã« ch_evalexpr()/ch_sendexpr() ã¯ä½¿ãˆã¾ã›ã‚“" msgid "E906: not an open channel" -msgstr "E906: é–‹ã„ã¦ã„ãªã„ãƒãƒ£ãƒ³ãƒãƒ«ã§ã™" +msgstr "E906: é–‹ã„ã¦ã„ãªã„ãƒãƒ£ãƒãƒ«ã§ã™" msgid "E920: _io file requires _name to be set" msgstr "E920: _io ファイル㯠_name ã®è¨­å®šãŒå¿…è¦ã§ã™" @@ -521,7 +524,6 @@ msgstr "E710: リスト型変数ã«ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚ˆã‚Šã‚‚多ã„è¦ç´ ãŒã‚り msgid "E711: List value has not enough items" msgstr "E711: リスト型変数ã«ååˆ†ãªæ•°ã®è¦ç´ ãŒã‚りã¾ã›ã‚“" -# msgid "E690: Missing \"in\" after :for" msgstr "E690: :for ã®å¾Œã« \"in\" ãŒã‚りã¾ã›ã‚“" @@ -590,7 +592,7 @@ msgid "E910: Using a Job as a Number" msgstr "E910: ジョブを数値ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" msgid "E913: Using a Channel as a Number" -msgstr "E913: ãƒãƒ£ãƒ³ãƒãƒ«ã‚’数値ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" +msgstr "E913: ãƒãƒ£ãƒãƒ«ã‚’数値ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" msgid "E891: Using a Funcref as a Float" msgstr "E891: 関数å‚ç…§åž‹ã‚’æµ®å‹•å°æ•°ç‚¹æ•°ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" @@ -611,7 +613,7 @@ msgid "E911: Using a Job as a Float" msgstr "E911: ã‚¸ãƒ§ãƒ–ã‚’æµ®å‹•å°æ•°ç‚¹æ•°ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" msgid "E914: Using a Channel as a Float" -msgstr "E914: ãƒãƒ£ãƒ³ãƒãƒ«ã‚’æµ®å‹•å°æ•°ç‚¹æ•°ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" +msgstr "E914: ãƒãƒ£ãƒãƒ«ã‚’æµ®å‹•å°æ•°ç‚¹æ•°ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" msgid "E729: using Funcref as a String" msgstr "E729: 関数å‚照型を文字列ã¨ã—ã¦æ‰±ã£ã¦ã„ã¾ã™" @@ -1424,6 +1426,9 @@ msgstr "E784: 最後ã®ã‚¿ãƒ–ページを閉ã˜ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“" msgid "Already only one tab page" msgstr "æ—¢ã«ã‚¿ãƒ–ページã¯1ã¤ã—ã‹ã‚りã¾ã›ã‚“" +msgid "Edit File in new tab page" +msgstr "æ–°ã—ã„タブページã§ãƒ•ァイルを編集ã—ã¾ã™" + msgid "Edit File in new window" msgstr "æ–°ã—ã„ウィンドウã§ãƒ•ァイルを編集ã—ã¾ã™" @@ -2284,10 +2289,10 @@ msgstr "アンドゥ(&U)" msgid "Open tab..." msgstr "タブページを開ã" -msgid "Find string (use '\\\\' to find a '\\')" +msgid "Find string (use '\\\\' to find a '\\')" msgstr "検索文字列 ('\\' を検索ã™ã‚‹ã«ã¯ '\\\\')" -msgid "Find & Replace (use '\\\\' to find a '\\')" +msgid "Find & Replace (use '\\\\' to find a '\\')" msgstr "æ¤œç´¢ãƒ»ç½®æ› ('\\' を検索ã™ã‚‹ã«ã¯ '\\\\')" msgid "Not Used" @@ -2705,6 +2710,19 @@ msgstr "範囲外ã®è¡Œç•ªå·ã§ã™" msgid "not allowed in the Vim sandbox" msgstr "サンドボックスã§ã¯è¨±ã•れã¾ã›ã‚“" +#, c-format +msgid "E370: Could not load library %s" +msgstr "E370: ライブラリ %s をロードã§ãã¾ã›ã‚“ã§ã—ãŸ" + +msgid "Sorry, this command is disabled: the Perl library could not be loaded." +msgstr "" +"ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ç„¡åйã§ã™ã€ã”ã‚ã‚“ãªã•ã„: Perlライブラリをロードã§ãã¾ã›ã‚“ã§ã—ãŸ." + +msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" +msgstr "" +"E299: サンドボックスã§ã¯ Safe モジュールを使用ã—ãªã„Perlスクリプトã¯ç¦ã˜ã‚‰ã‚Œ" +"ã¦ã„ã¾ã™" + msgid "E836: This Vim cannot execute :python after using :py3" msgstr "E836: ã“ã®Vimã§ã¯ :py3 を使ã£ãŸå¾Œã« :python を使ãˆã¾ã›ã‚“" @@ -4703,7 +4721,6 @@ msgstr "E777: 文字列ã‹ãƒªã‚¹ãƒˆãŒå¿…è¦ã§ã™" msgid "E369: invalid item in %s%%[]" msgstr "E369: 無効ãªé …ç›®ã§ã™: %s%%[]" -# #, c-format msgid "E769: Missing ] after %s[" msgstr "E769: %s[ ã®å¾Œã« ] ãŒã‚りã¾ã›ã‚“" @@ -4726,15 +4743,12 @@ msgstr "E54: %s( ãŒé‡£ã‚Šåˆã£ã¦ã„ã¾ã›ã‚“" msgid "E55: Unmatched %s)" msgstr "E55: %s) ãŒé‡£ã‚Šåˆã£ã¦ã„ã¾ã›ã‚“" -# msgid "E66: \\z( not allowed here" msgstr "E66: \\z( ã¯ã‚³ã‚³ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -# msgid "E67: \\z1 - \\z9 not allowed here" -msgstr "E67: \\z1 ãã®ä»–ã¯ã‚³ã‚³ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" +msgstr "E67: \\z1 - \\z9 ã¯ã‚³ã‚³ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“" -# #, c-format msgid "E69: Missing ] after %s%%[" msgstr "E69: %s%%[ ã®å¾Œã« ] ãŒã‚りã¾ã›ã‚“" @@ -4743,7 +4757,9 @@ msgstr "E69: %s%%[ ã®å¾Œã« ] ãŒã‚りã¾ã›ã‚“" msgid "E70: Empty %s%%[]" msgstr "E70: %s%%[] ãŒç©ºã§ã™" -# +msgid "E956: Cannot use pattern recursively" +msgstr "E956: パターンをå†å¸°çš„ã«ä½¿ã†ã“ã¨ã¯ã§ãã¾ã›ã‚“" + msgid "E65: Illegal back reference" msgstr "E65: 䏿­£ãªå¾Œæ–¹å‚ç…§ã§ã™" @@ -4776,7 +4792,6 @@ msgstr "E61:%s* ãŒå…¥ã‚Œå­ã«ãªã£ã¦ã„ã¾ã™" msgid "E62: Nested %s%c" msgstr "E62:%s%c ãŒå…¥ã‚Œå­ã«ãªã£ã¦ã„ã¾ã™" -# msgid "E63: invalid use of \\_" msgstr "E63: \\_ ã®ç„¡åйãªä½¿ç”¨æ–¹æ³•ã§ã™" @@ -4784,16 +4799,13 @@ msgstr "E63: \\_ ã®ç„¡åйãªä½¿ç”¨æ–¹æ³•ã§ã™" msgid "E64: %s%c follows nothing" msgstr "E64:%s%c ã®å¾Œã«ãªã«ã‚‚ã‚りã¾ã›ã‚“" -# msgid "E68: Invalid character after \\z" msgstr "E68: \\z ã®å¾Œã«ä¸æ­£ãªæ–‡å­—ãŒã‚りã¾ã—ãŸ" -# #, c-format msgid "E678: Invalid character after %s%%[dxouU]" msgstr "E678: %s%%[dxouU] ã®å¾Œã«ä¸æ­£ãªæ–‡å­—ãŒã‚りã¾ã—ãŸ" -# #, c-format msgid "E71: Invalid character after %s%%" msgstr "E71: %s%% ã®å¾Œã«ä¸æ­£ãªæ–‡å­—ãŒã‚りã¾ã—ãŸ" @@ -4826,7 +4838,6 @@ msgstr "E865: (NFA) æœŸå¾…ã‚ˆã‚Šæ—©ãæ­£è¦è¡¨ç¾ã®çµ‚端ã«åˆ°é”ã—ã¾ã—㟠msgid "E866: (NFA regexp) Misplaced %c" msgstr "E866: (NFA æ­£è¦è¡¨ç¾) ä½ç½®ãŒèª¤ã£ã¦ã„ã¾ã™: %c" -# #, c-format msgid "E877: (NFA regexp) Invalid character class: %ld" msgstr "E877: (NFA æ­£è¦è¡¨ç¾) ç„¡åŠ¹ãªæ–‡å­—クラス: %ld" @@ -4864,6 +4875,11 @@ msgstr "E879: (NFA æ­£è¦è¡¨ç¾) \\z( ãŒå¤šéŽãŽã¾ã™" msgid "E873: (NFA regexp) proper termination error" msgstr "E873: (NFA æ­£è¦è¡¨ç¾) 終端記å·ãŒã‚りã¾ã›ã‚“" +msgid "Could not open temporary log file for writing, displaying on stderr... " +msgstr "" +"NFAæ­£è¦è¡¨ç¾ã‚¨ãƒ³ã‚¸ãƒ³ç”¨ã®ãƒ­ã‚°ãƒ•ァイルを書込用ã¨ã—ã¦é–‹ã‘ã¾ã›ã‚“ã€‚ãƒ­ã‚°ã¯æ¨™æº–エラー" +"出力ã«å‡ºåŠ›ã—ã¾ã™ã€‚" + msgid "E874: (NFA) Could not pop the stack!" msgstr "E874: (NFA) スタックをãƒãƒƒãƒ—ã§ãã¾ã›ã‚“!" @@ -4880,19 +4896,6 @@ msgstr "E876: (NFA æ­£è¦è¡¨ç¾) NFA全体をä¿å­˜ã™ã‚‹ã«ã¯ç©ºãスペー msgid "E878: (NFA) Could not allocate memory for branch traversal!" msgstr "E878: (NFA) ç¾åœ¨æ¨ªæ–­ä¸­ã®ãƒ–ランãƒã«å分ãªãƒ¡ãƒ¢ãƒªã‚’割り当ã¦ã‚‰ã‚Œã¾ã›ã‚“!" -msgid "" -"Could not open temporary log file for writing, displaying on stderr... " -msgstr "" -"NFAæ­£è¦è¡¨ç¾ã‚¨ãƒ³ã‚¸ãƒ³ç”¨ã®ãƒ­ã‚°ãƒ•ァイルを書込用ã¨ã—ã¦é–‹ã‘ã¾ã›ã‚“ã€‚ãƒ­ã‚°ã¯æ¨™æº–出力ã«" -"出力ã—ã¾ã™ã€‚" - -#, c-format -msgid "(NFA) COULD NOT OPEN %s !" -msgstr "(NFA) ログファイル %s ã‚’é–‹ã‘ã¾ã›ã‚“!" - -msgid "Could not open temporary log file for writing " -msgstr "NFAæ­£è¦è¡¨ç¾ã‚¨ãƒ³ã‚¸ãƒ³ç”¨ã®ãƒ­ã‚°ãƒ•ァイルを書込用ã¨ã—ã¦é–‹ã‘ã¾ã›ã‚“。" - msgid " VREPLACE" msgstr " 仮想置æ›" @@ -4983,7 +4986,7 @@ msgstr "インクルードã•れãŸãƒ•ァイルをスキャン中: %s" #, c-format msgid "Searching included file %s" -msgstr "インクルードã•れãŸãƒ•ァイルをスキャン中 %s" +msgstr "インクルードã•れãŸãƒ•ァイルを検索中 %s" msgid "E387: Match is on current line" msgstr "E387: ç¾åœ¨è¡Œã«è©²å½“ãŒã‚りã¾ã™" @@ -5251,7 +5254,7 @@ msgstr "値 %s ã¯ä»–ã® .aff ファイルã§ä½¿ç”¨ã•れãŸã®ã¨ç•°ãªã‚Šã¾ #, c-format msgid "Reading dictionary file %s..." -msgstr "辞書ファイル %s をスキャン中..." +msgstr "辞書ファイル %s を読込ã¿ä¸­..." #, c-format msgid "E760: No word count in %s" @@ -5279,7 +5282,7 @@ msgstr "éžASCII文字をå«ã‚€ %d 個ã®å˜èªžã‚’無視ã—ã¾ã—㟠(%s 内)" #, c-format msgid "Reading word file %s..." -msgstr "標準入力ã‹ã‚‰èª­è¾¼ã¿ä¸­ %s..." +msgstr "å˜èªžãƒ•ァイル %s を読込ã¿ä¸­..." #, c-format msgid "Duplicate /encoding= line ignored in %s line %d: %s" @@ -6030,6 +6033,10 @@ msgstr "E133: 関数外㫠:return ãŒã‚りã¾ã—ãŸ" msgid "E107: Missing parentheses: %s" msgstr "E107: カッコ '(' ãŒã‚りã¾ã›ã‚“: %s" +#, c-format +msgid "%s (%s, compiled %s)" +msgstr "%s (%s, compiled %s)" + msgid "" "\n" "MS-Windows 64-bit GUI version" @@ -6353,19 +6360,6 @@ msgstr "E802: 無効㪠ID: %ld (1 以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“)" msgid "E803: ID not found: %ld" msgstr "E803: ID ã¯ã‚りã¾ã›ã‚“: %ld" -#, c-format -msgid "E370: Could not load library %s" -msgstr "E370: ライブラリ %s をロードã§ãã¾ã›ã‚“ã§ã—ãŸ" - -msgid "Sorry, this command is disabled: the Perl library could not be loaded." -msgstr "" -"ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ç„¡åйã§ã™ã€ã”ã‚ã‚“ãªã•ã„: Perlライブラリをロードã§ãã¾ã›ã‚“ã§ã—ãŸ." - -msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" -msgstr "" -"E299: サンドボックスã§ã¯ Safe モジュールを使用ã—ãªã„Perlスクリプトã¯ç¦ã˜ã‚‰ã‚Œ" -"ã¦ã„ã¾ã™" - msgid "Edit with &multiple Vims" msgstr "複数ã®Vimã§ç·¨é›†ã™ã‚‹ (&M)" diff --git a/src/po/ja.sjis.po b/src/po/ja.sjis.po index 840dcda47e..538db72493 100644 --- a/src/po/ja.sjis.po +++ b/src/po/ja.sjis.po @@ -4,7 +4,7 @@ # Do ":help credits" in Vim to see a list of people who contributed. # # Copyright (C) 2001-2018 MURAOKA Taro , -# vim-jp (http://vim-jp.org/) +# vim-jp # # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. # @@ -14,14 +14,14 @@ msgid "" msgstr "" "Project-Id-Version: Vim 8.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-01 10:46+0900\n" +"POT-Creation-Date: 2018-07-18 00:43+0900\n" "PO-Revision-Date: 2017-05-18 00:45+0900\n" "Last-Translator: MURAOKA Taro \n" -"Language-Team: vim-jp (https://github.com/vim-jp/lang-ja)\n" -"Language: Japanese\n" +"Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=cp932\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "E831: bf_key_init() called with empty password" @@ -204,6 +204,9 @@ msgstr "" msgid "E382: Cannot write, 'buftype' option is set" msgstr "E382: 'buftype' ƒIƒvƒVƒ‡ƒ“‚ªÝ’肳‚ê‚Ä‚¢‚é‚̂őž‚߂܂¹‚ñ" +msgid "[Prompt]" +msgstr "[ƒvƒƒ“ƒvƒg]" + msgid "[Scratch]" msgstr "[‰º‘‚«]" @@ -258,10 +261,10 @@ msgstr "E917: %s() msgid "E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel" msgstr "" -"E912: raw ‚â nl ƒ‚[ƒh‚̃`ƒƒƒ“ƒlƒ‹‚É ch_evalexpr()/ch_sendexpr() ‚ÍŽg‚¦‚Ü‚¹‚ñ" +"E912: raw ‚â nl ƒ‚[ƒh‚̃`ƒƒƒlƒ‹‚É ch_evalexpr()/ch_sendexpr() ‚ÍŽg‚¦‚Ü‚¹‚ñ" msgid "E906: not an open channel" -msgstr "E906: ŠJ‚¢‚Ä‚¢‚È‚¢ƒ`ƒƒƒ“ƒlƒ‹‚Å‚·" +msgstr "E906: ŠJ‚¢‚Ä‚¢‚È‚¢ƒ`ƒƒƒlƒ‹‚Å‚·" msgid "E920: _io file requires _name to be set" msgstr "E920: _io ƒtƒ@ƒCƒ‹‚Í _name ‚Ìݒ肪•K—v‚Å‚·" @@ -521,7 +524,6 @@ msgstr "E710: msgid "E711: List value has not enough items" msgstr "E711: ƒŠƒXƒgŒ^•Ï”‚É\\•ª‚È”‚Ì—v‘f‚ª‚ ‚è‚Ü‚¹‚ñ" -# msgid "E690: Missing \"in\" after :for" msgstr "E690: :for ‚ÌŒã‚É \"in\" ‚ª‚ ‚è‚Ü‚¹‚ñ" @@ -590,7 +592,7 @@ msgid "E910: Using a Job as a Number" msgstr "E910: ƒWƒ‡ƒu‚ð”’l‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" msgid "E913: Using a Channel as a Number" -msgstr "E913: ƒ`ƒƒƒ“ƒlƒ‹‚ð”’l‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" +msgstr "E913: ƒ`ƒƒƒlƒ‹‚ð”’l‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" msgid "E891: Using a Funcref as a Float" msgstr "E891: ŠÖ”ŽQÆŒ^‚ð•‚“®¬”“_”‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" @@ -611,7 +613,7 @@ msgid "E911: Using a Job as a Float" msgstr "E911: ƒWƒ‡ƒu‚ð•‚“®¬”“_”‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" msgid "E914: Using a Channel as a Float" -msgstr "E914: ƒ`ƒƒƒ“ƒlƒ‹‚ð•‚“®¬”“_”‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" +msgstr "E914: ƒ`ƒƒƒlƒ‹‚ð•‚“®¬”“_”‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" msgid "E729: using Funcref as a String" msgstr "E729: ŠÖ”ŽQÆŒ^‚ð•¶Žš—ñ‚Æ‚µ‚Ĉµ‚Á‚Ä‚¢‚Ü‚·" @@ -1424,6 +1426,9 @@ msgstr "E784: msgid "Already only one tab page" msgstr "Šù‚Ƀ^ƒuƒy[ƒW‚Í1‚‚µ‚©‚ ‚è‚Ü‚¹‚ñ" +msgid "Edit File in new tab page" +msgstr "V‚µ‚¢ƒ^ƒuƒy[ƒW‚Ńtƒ@ƒCƒ‹‚ð•ÒW‚µ‚Ü‚·" + msgid "Edit File in new window" msgstr "V‚µ‚¢ƒEƒBƒ“ƒhƒE‚Ńtƒ@ƒCƒ‹‚ð•ÒW‚µ‚Ü‚·" @@ -2284,10 +2289,10 @@ msgstr " msgid "Open tab..." msgstr "ƒ^ƒuƒy[ƒW‚ðŠJ‚­" -msgid "Find string (use '\\\\' to find a '\\')" +msgid "Find string (use '\\\\' to find a '\\')" msgstr "ŒŸõ•¶Žš—ñ ('\\' ‚ðŒŸõ‚·‚é‚É‚Í '\\\\')" -msgid "Find & Replace (use '\\\\' to find a '\\')" +msgid "Find & Replace (use '\\\\' to find a '\\')" msgstr "ŒŸõE’uŠ· ('\\' ‚ðŒŸõ‚·‚é‚É‚Í '\\\\')" msgid "Not Used" @@ -2705,6 +2710,19 @@ msgstr " msgid "not allowed in the Vim sandbox" msgstr "ƒTƒ“ƒhƒ{ƒbƒNƒX‚ł͋–‚³‚ê‚Ü‚¹‚ñ" +#, c-format +msgid "E370: Could not load library %s" +msgstr "E370: ƒ‰ƒCƒuƒ‰ƒŠ %s ‚ðƒ[ƒh‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½" + +msgid "Sorry, this command is disabled: the Perl library could not be loaded." +msgstr "" +"‚±‚̃Rƒ}ƒ“ƒh‚Í–³Œø‚Å‚·A‚²‚ß‚ñ‚È‚³‚¢: Perlƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒh‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½." + +msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" +msgstr "" +"E299: ƒTƒ“ƒhƒ{ƒbƒNƒX‚Å‚Í Safe ƒ‚ƒWƒ…[ƒ‹‚ðŽg—p‚µ‚È‚¢PerlƒXƒNƒŠƒvƒg‚͋ւ¶‚ç‚ê" +"‚Ä‚¢‚Ü‚·" + msgid "E836: This Vim cannot execute :python after using :py3" msgstr "E836: ‚±‚ÌVim‚Å‚Í :py3 ‚ðŽg‚Á‚½Œã‚É :python ‚ðŽg‚¦‚Ü‚¹‚ñ" @@ -4703,7 +4721,6 @@ msgstr "E777: msgid "E369: invalid item in %s%%[]" msgstr "E369: –³Œø‚È€–Ú‚Å‚·: %s%%[]" -# #, c-format msgid "E769: Missing ] after %s[" msgstr "E769: %s[ ‚ÌŒã‚É ] ‚ª‚ ‚è‚Ü‚¹‚ñ" @@ -4726,15 +4743,12 @@ msgstr "E54: %s( msgid "E55: Unmatched %s)" msgstr "E55: %s) ‚ª’ނ臂Á‚Ä‚¢‚Ü‚¹‚ñ" -# msgid "E66: \\z( not allowed here" msgstr "E66: \\z( ‚̓RƒR‚ł͋–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ" -# msgid "E67: \\z1 - \\z9 not allowed here" -msgstr "E67: \\z1 ‚»‚Ì‘¼‚̓RƒR‚ł͋–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ" +msgstr "E67: \\z1 - \\z9 ‚̓RƒR‚ł͋–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ" -# #, c-format msgid "E69: Missing ] after %s%%[" msgstr "E69: %s%%[ ‚ÌŒã‚É ] ‚ª‚ ‚è‚Ü‚¹‚ñ" @@ -4743,7 +4757,9 @@ msgstr "E69: %s%%[ msgid "E70: Empty %s%%[]" msgstr "E70: %s%%[] ‚ª‹ó‚Å‚·" -# +msgid "E956: Cannot use pattern recursively" +msgstr "E956: ƒpƒ^[ƒ“‚ðÄ‹A“I‚ÉŽg‚¤‚±‚Ƃ͂ł«‚Ü‚¹‚ñ" + msgid "E65: Illegal back reference" msgstr "E65: •s³‚ÈŒã•ûŽQƂł·" @@ -4776,7 +4792,6 @@ msgstr "E61:%s* msgid "E62: Nested %s%c" msgstr "E62:%s%c ‚ª“ü‚êŽq‚ɂȂÁ‚Ä‚¢‚Ü‚·" -# msgid "E63: invalid use of \\_" msgstr "E63: \\_ ‚Ì–³Œø‚ÈŽg—p•û–@‚Å‚·" @@ -4784,16 +4799,13 @@ msgstr "E63: \\_ msgid "E64: %s%c follows nothing" msgstr "E64:%s%c ‚ÌŒã‚É‚È‚É‚à‚ ‚è‚Ü‚¹‚ñ" -# msgid "E68: Invalid character after \\z" msgstr "E68: \\z ‚ÌŒã‚É•s³‚È•¶Žš‚ª‚ ‚è‚Ü‚µ‚½" -# #, c-format msgid "E678: Invalid character after %s%%[dxouU]" msgstr "E678: %s%%[dxouU] ‚ÌŒã‚É•s³‚È•¶Žš‚ª‚ ‚è‚Ü‚µ‚½" -# #, c-format msgid "E71: Invalid character after %s%%" msgstr "E71: %s%% ‚ÌŒã‚É•s³‚È•¶Žš‚ª‚ ‚è‚Ü‚µ‚½" @@ -4826,7 +4838,6 @@ msgstr "E865: (NFA) msgid "E866: (NFA regexp) Misplaced %c" msgstr "E866: (NFA ³‹K•\\Œ») ˆÊ’u‚ªŒë‚Á‚Ä‚¢‚Ü‚·: %c" -# #, c-format msgid "E877: (NFA regexp) Invalid character class: %ld" msgstr "E877: (NFA ³‹K•\\Œ») –³Œø‚È•¶ŽšƒNƒ‰ƒX: %ld" @@ -4853,7 +4864,7 @@ msgid "E870: (NFA regexp) Error reading repetition limits" msgstr "E870: (NFA ³‹K•\\Œ») ŒJ‚è•Ô‚µ‚̧ŒÀ‰ñ”‚ð“Çž’†‚ɃGƒ‰[" msgid "E871: (NFA regexp) Can't have a multi follow a multi" -msgstr "E871: (NFA ³‹K•\\Œ») ŒJ‚è•Ô‚µ ‚ÌŒã‚É ŒJ‚è•Ô‚µ ‚͂ł«‚Ü‚¹‚ñ!" +msgstr "E871: (NFA ³‹K•\\Œ») ŒJ‚è•Ô‚µ ‚ÌŒã‚É ŒJ‚è•Ô‚µ ‚͂ł«‚Ü‚¹‚ñ" msgid "E872: (NFA regexp) Too many '('" msgstr "E872: (NFA ³‹K•\\Œ») '(' ‚ª‘½‰ß‚¬‚Ü‚·" @@ -4864,6 +4875,11 @@ msgstr "E879: (NFA msgid "E873: (NFA regexp) proper termination error" msgstr "E873: (NFA ³‹K•\\Œ») I’[‹L†‚ª‚ ‚è‚Ü‚¹‚ñ" +msgid "Could not open temporary log file for writing, displaying on stderr... " +msgstr "" +"NFA³‹K•\\Œ»ƒGƒ“ƒWƒ“—p‚̃ƒOƒtƒ@ƒCƒ‹‚𑞗p‚Æ‚µ‚ÄŠJ‚¯‚Ü‚¹‚ñBƒƒO‚Í•W€ƒGƒ‰[" +"o—Í‚Éo—Í‚µ‚Ü‚·B" + msgid "E874: (NFA) Could not pop the stack!" msgstr "E874: (NFA) ƒXƒ^ƒbƒN‚ðƒ|ƒbƒv‚Å‚«‚Ü‚¹‚ñ!" @@ -4880,19 +4896,6 @@ msgstr "E876: (NFA msgid "E878: (NFA) Could not allocate memory for branch traversal!" msgstr "E878: (NFA) Œ»Ý‰¡’f’†‚̃uƒ‰ƒ“ƒ`‚É\\•ª‚ȃƒ‚ƒŠ‚ðŠ„‚è“–‚Ä‚ç‚ê‚Ü‚¹‚ñ!" -msgid "" -"Could not open temporary log file for writing, displaying on stderr... " -msgstr "" -"NFA³‹K•\\Œ»ƒGƒ“ƒWƒ“—p‚̃ƒOƒtƒ@ƒCƒ‹‚𑞗p‚Æ‚µ‚ÄŠJ‚¯‚Ü‚¹‚ñBƒƒO‚Í•W€o—Í‚É" -"o—Í‚µ‚Ü‚·B" - -#, c-format -msgid "(NFA) COULD NOT OPEN %s !" -msgstr "(NFA) ƒƒOƒtƒ@ƒCƒ‹ %s ‚ðŠJ‚¯‚Ü‚¹‚ñ!" - -msgid "Could not open temporary log file for writing " -msgstr "NFA³‹K•\\Œ»ƒGƒ“ƒWƒ“—p‚̃ƒOƒtƒ@ƒCƒ‹‚𑞗p‚Æ‚µ‚ÄŠJ‚¯‚Ü‚¹‚ñB" - msgid " VREPLACE" msgstr " ‰¼‘z’uŠ·" @@ -4983,7 +4986,7 @@ msgstr " #, c-format msgid "Searching included file %s" -msgstr "ƒCƒ“ƒNƒ‹[ƒh‚³‚ꂽƒtƒ@ƒCƒ‹‚ðƒXƒLƒƒƒ“’† %s" +msgstr "ƒCƒ“ƒNƒ‹[ƒh‚³‚ꂽƒtƒ@ƒCƒ‹‚ðŒŸõ’† %s" msgid "E387: Match is on current line" msgstr "E387: Œ»Ýs‚ÉŠY“–‚ª‚ ‚è‚Ü‚·" @@ -5251,7 +5254,7 @@ msgstr " #, c-format msgid "Reading dictionary file %s..." -msgstr "Ž«‘ƒtƒ@ƒCƒ‹ %s ‚ðƒXƒLƒƒƒ“’†..." +msgstr "Ž«‘ƒtƒ@ƒCƒ‹ %s ‚ð“Çž‚Ý’†..." #, c-format msgid "E760: No word count in %s" @@ -5279,7 +5282,7 @@ msgstr " #, c-format msgid "Reading word file %s..." -msgstr "•W€“ü—Í‚©‚ç“Çž‚Ý’† %s..." +msgstr "’PŒêƒtƒ@ƒCƒ‹ %s ‚ð“Çž‚Ý’†..." #, c-format msgid "Duplicate /encoding= line ignored in %s line %d: %s" @@ -6030,6 +6033,10 @@ msgstr "E133: msgid "E107: Missing parentheses: %s" msgstr "E107: ƒJƒbƒR '(' ‚ª‚ ‚è‚Ü‚¹‚ñ: %s" +#, c-format +msgid "%s (%s, compiled %s)" +msgstr "%s (%s, compiled %s)" + msgid "" "\n" "MS-Windows 64-bit GUI version" @@ -6353,19 +6360,6 @@ msgstr "E802: msgid "E803: ID not found: %ld" msgstr "E803: ID ‚Í‚ ‚è‚Ü‚¹‚ñ: %ld" -#, c-format -msgid "E370: Could not load library %s" -msgstr "E370: ƒ‰ƒCƒuƒ‰ƒŠ %s ‚ðƒ[ƒh‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½" - -msgid "Sorry, this command is disabled: the Perl library could not be loaded." -msgstr "" -"‚±‚̃Rƒ}ƒ“ƒh‚Í–³Œø‚Å‚·A‚²‚ß‚ñ‚È‚³‚¢: Perlƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒh‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½." - -msgid "E299: Perl evaluation forbidden in sandbox without the Safe module" -msgstr "" -"E299: ƒTƒ“ƒhƒ{ƒbƒNƒX‚Å‚Í Safe ƒ‚ƒWƒ…[ƒ‹‚ðŽg—p‚µ‚È‚¢PerlƒXƒNƒŠƒvƒg‚͋ւ¶‚ç‚ê" -"‚Ä‚¢‚Ü‚·" - msgid "Edit with &multiple Vims" msgstr "•¡”‚ÌVim‚Å•ÒW‚·‚é (&M)" diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro index 3a0a9c6b9b..ada1a9a4ed 100644 --- a/src/proto/ex_docmd.pro +++ b/src/proto/ex_docmd.pro @@ -31,7 +31,8 @@ void not_exiting(void); void tabpage_close(int forceit); void tabpage_close_other(tabpage_T *tp, int forceit); void ex_all(exarg_T *eap); -void handle_drop(int filec, char_u **filev, int split); +void handle_drop(int filec, char_u **filev, int split, void (*callback)(void *), void *cookie); +void handle_any_postponed_drop(void); void alist_clear(alist_T *al); void alist_init(alist_T *al); void alist_unlink(alist_T *al); diff --git a/src/screen.c b/src/screen.c index ae16796264..ecb3bf54d2 100644 --- a/src/screen.c +++ b/src/screen.c @@ -530,6 +530,12 @@ reset_updating_screen(int may_resize_shell UNUSED) #ifdef FEAT_TERMINAL term_check_channel_closed_recently(); #endif + +#ifdef HAVE_DROP_FILE + // If handle_drop() was called while updating_screen was TRUE need to + // handle the drop now. + handle_any_postponed_drop(); +#endif } /* @@ -10425,12 +10431,9 @@ showmode(void) else #endif { -#ifdef FEAT_VREPLACE if (State & VREPLACE_FLAG) MSG_PUTS_ATTR(_(" VREPLACE"), attr); - else -#endif - if (State & REPLACE_FLAG) + else if (State & REPLACE_FLAG) MSG_PUTS_ATTR(_(" REPLACE"), attr); else if (State & INSERT) { diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 26d33d8384..f42d228e29 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -231,7 +231,7 @@ func Test_getcompletion() call assert_equal([], l) let l = getcompletion('.', 'shellcmd') - call assert_equal(['./', '../'], l[0:1]) + call assert_equal(['./', '../'], filter(l, 'v:val =~ "\\./"')) call assert_equal(-1, match(l[2:], '^\.\.\?/$')) let root = has('win32') ? 'C:\\' : '/' let l = getcompletion(root, 'shellcmd') @@ -290,6 +290,29 @@ func Test_getcompletion() call assert_fails('call getcompletion("", "burp")', 'E475:') endfunc +func Test_shellcmd_completion() + let save_path = $PATH + + call mkdir('Xpathdir/Xpathsubdir', 'p') + call writefile([''], 'Xpathdir/Xfile.exe') + call setfperm('Xpathdir/Xfile.exe', 'rwx------') + + " Set PATH to example directory without trailing slash. + let $PATH = getcwd() . '/Xpathdir' + + " Test for the ":!" case. Previously, this would include subdirs of + " dirs in the PATH, even though they won't be executed. We check that only + " subdirs of the PWD and executables from the PATH are included in the + " suggestions. + let actual = getcompletion('X', 'shellcmd') + let expected = map(filter(glob('*', 0, 1), 'isdirectory(v:val) && v:val[0] == "X"'), 'v:val . "/"') + call insert(expected, 'Xfile.exe') + call assert_equal(expected, actual) + + call delete('Xpathdir', 'rf') + let $PATH = save_path +endfunc + func Test_expand_star_star() call mkdir('a/b', 'p') call writefile(['asdfasdf'], 'a/b/fileXname') diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim index 78f7797280..fdc2237ecd 100644 --- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -1375,6 +1375,14 @@ func Test_edit_complete_very_long_name() set swapfile& endfunc +func Test_edit_backtick() + next a\`b c + call assert_equal('a`b', expand('%')) + next + call assert_equal('c', expand('%')) + call assert_equal('a\`b c', expand('##')) +endfunc + func Test_edit_quit() edit foo.txt split diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 14181fb0a4..41996bd451 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -464,6 +464,18 @@ func Test_mode() call assert_equal('n', mode(0)) call assert_equal('n', mode(1)) + " i_CTRL-O + exe "normal i\:call Save_mode()\\" + call assert_equal("n-niI", g:current_modes) + + " R_CTRL-O + exe "normal R\:call Save_mode()\\" + call assert_equal("n-niR", g:current_modes) + + " gR_CTRL-O + exe "normal gR\:call Save_mode()\\" + call assert_equal("n-niV", g:current_modes) + " How to test operator-pending mode? call feedkeys("v", 'xt') diff --git a/src/testdir/test_match.vim b/src/testdir/test_match.vim index 28dd97c923..70f049099f 100644 --- a/src/testdir/test_match.vim +++ b/src/testdir/test_match.vim @@ -192,6 +192,28 @@ func Test_matchaddpos() set hlsearch& endfunc +func Test_matchaddpos_otherwin() + syntax on + new + call setline(1, ['12345', 'NP']) + let winid = win_getid() + + wincmd w + call matchadd('Search', '4', 10, -1, {'window': winid}) + call matchaddpos('Error', [[1,2], [2,2]], 10, -1, {'window': winid}) + redraw! + call assert_notequal(screenattr(1,2), 0) + call assert_notequal(screenattr(1,4), 0) + call assert_notequal(screenattr(2,2), 0) + call assert_equal(screenattr(1,2), screenattr(2,2)) + call assert_notequal(screenattr(1,2), screenattr(1,4)) + + wincmd w + bwipe! + call clearmatches() + syntax off +endfunc + func Test_matchaddpos_using_negative_priority() set hlsearch diff --git a/src/testdir/test_ruby.vim b/src/testdir/test_ruby.vim index ae27b39cd3..8d7943e176 100644 --- a/src/testdir/test_ruby.vim +++ b/src/testdir/test_ruby.vim @@ -4,6 +4,13 @@ if !has('ruby') finish end +" Helper function as there is no builtin rubyeval() function similar +" to perleval, luaevel() or pyeval(). +func RubyEval(ruby_expr) + let s = split(execute('ruby print ' . a:ruby_expr), "\n") + return (len(s) == 0) ? '' : s[-1] +endfunc + func Test_ruby_change_buffer() call setline(line('$'), ['1 line 1']) ruby Vim.command("normal /^1\n") @@ -11,28 +18,6 @@ func Test_ruby_change_buffer() call assert_equal('1 changed line 1', getline('$')) endfunc -func Test_ruby_evaluate_list() - call setline(line('$'), ['2 line 2']) - ruby Vim.command("normal /^2\n") - let l = ["abc", "def"] - ruby << EOF - curline = $curbuf.line_number - l = Vim.evaluate("l"); - $curbuf.append(curline, l.join("\n")) -EOF - normal j - .rubydo $_ = $_.gsub(/\n/, '/') - call assert_equal('abc/def', getline('$')) -endfunc - -func Test_ruby_evaluate_dict() - let d = {'a': 'foo', 'b': 123} - redir => l:out - ruby d = Vim.evaluate("d"); print d - redir END - call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) -endfunc - func Test_rubydo() " Check deleting lines does not trigger ml_get error. new @@ -46,8 +31,7 @@ func Test_rubydo() call setline(1, ['one', 'two', 'three']) rubydo Vim.command("new") call assert_equal(wincount + 1, winnr('$')) - bwipe! - bwipe! + %bwipe! endfunc func Test_rubyfile() @@ -65,8 +49,318 @@ func Test_set_cursor() normal gg rubydo $curwin.cursor = [1, 5] call assert_equal([1, 6], [line('.'), col('.')]) + call assert_equal('[1, 5]', RubyEval('$curwin.cursor')) " Check that movement after setting cursor position keeps current column. normal j call assert_equal([2, 6], [line('.'), col('.')]) + call assert_equal('[2, 5]', RubyEval('$curwin.cursor')) + + call assert_fails('ruby $curwin.cursor = [1]', + \ 'ArgumentError: array length must be 2') + bwipe! +endfunc + +" Test buffer.count and buffer.length (number of lines in buffer) +func Test_buffer_count() + new + call setline(1, ['one', 'two', 'three']) + call assert_equal('3', RubyEval('$curbuf.count')) + call assert_equal('3', RubyEval('$curbuf.length')) + bwipe! +endfunc + +" Test buffer.name (buffer name) +func Test_buffer_name() + new Xfoo + call assert_equal(expand('%:p'), RubyEval('$curbuf.name')) + bwipe + call assert_equal('', RubyEval('$curbuf.name')) +endfunc + +" Test buffer.number (number of the buffer). +func Test_buffer_number() + new + call assert_equal(string(bufnr('%')), RubyEval('$curbuf.number')) + new + call assert_equal(string(bufnr('%')), RubyEval('$curbuf.number')) + + %bwipe +endfunc + +" Test buffer.delete({n}) (delete line {n}) +func Test_buffer_delete() + new + call setline(1, ['one', 'two', 'three']) + ruby $curbuf.delete(2) + call assert_equal(['one', 'three'], getline(1, '$')) + + call assert_fails('ruby $curbuf.delete(0)', 'IndexError: line number 0 out of range') + call assert_fails('ruby $curbuf.delete(3)', 'IndexError: line number 3 out of range') + + bwipe! +endfunc + +" Test buffer.append({str}, str) (append line {str} after line {n}) +func Test_buffer_append() + new + ruby $curbuf.append(0, 'one') + ruby $curbuf.append(1, 'three') + ruby $curbuf.append(1, 'two') + ruby $curbuf.append(4, 'four') + + call assert_equal(['one', 'two', 'three', '', 'four'], getline(1, '$')) + + call assert_fails('ruby $curbuf.append(-1, "x")', + \ 'IndexError: line number -1 out of range') + call assert_fails('ruby $curbuf.append(6, "x")', + \ 'IndexError: line number 6 out of range') + + bwipe! +endfunc + +" Test buffer.line (get or set the current line) +func Test_buffer_line() + new + call setline(1, ['one', 'two', 'three']) + 2 + call assert_equal('two', RubyEval('$curbuf.line')) + + ruby $curbuf.line = 'TWO' + call assert_equal(['one', 'TWO', 'three'], getline(1, '$')) + + bwipe! +endfunc + +" Test buffer.line_number (get current line number) +func Test_buffer_line_number() + new + call setline(1, ['one', 'two', 'three']) + 2 + call assert_equal('2', RubyEval('$curbuf.line_number')) + + bwipe! +endfunc + +func Test_buffer_get() + new + call setline(1, ['one', 'two']) + call assert_equal('one', RubyEval('$curbuf[1]')) + call assert_equal('two', RubyEval('$curbuf[2]')) + + call assert_fails('ruby $curbuf[0]', + \ 'IndexError: line number 0 out of range') + call assert_fails('ruby $curbuf[3]', + \ 'IndexError: line number 3 out of range') + + bwipe! +endfunc + +func Test_buffer_set() + new + call setline(1, ['one', 'two']) + ruby $curbuf[2] = 'TWO' + ruby $curbuf[1] = 'ONE' + + call assert_fails('ruby $curbuf[0] = "ZERO"', + \ 'IndexError: line number 0 out of range') + call assert_fails('ruby $curbuf[3] = "THREE"', + \ 'IndexError: line number 3 out of range') + bwipe! +endfunc + +" Test window.width (get or set window height). +func Test_window_height() + new + + " Test setting window height + ruby $curwin.height = 2 + call assert_equal(2, winheight(0)) + + " Test getting window height + call assert_equal('2', RubyEval('$curwin.height')) + + bwipe +endfunc + +" Test window.width (get or set window width). +func Test_window_width() + vnew + + " Test setting window width + ruby $curwin.width = 2 + call assert_equal(2, winwidth(0)) + + " Test getting window width + call assert_equal('2', RubyEval('$curwin.width')) + + bwipe +endfunc + +" Test window.buffer (get buffer object of a window object). +func Test_window_buffer() + new Xfoo1 + new Xfoo2 + ruby $b2 = $curwin.buffer + ruby $w2 = $curwin + wincmd j + ruby $b1 = $curwin.buffer + ruby $w1 = $curwin + + call assert_equal(RubyEval('$b1'), RubyEval('$w1.buffer')) + call assert_equal(RubyEval('$b2'), RubyEval('$w2.buffer')) + call assert_equal(string(bufnr('Xfoo1')), RubyEval('$w1.buffer.number')) + call assert_equal(string(bufnr('Xfoo2')), RubyEval('$w2.buffer.number')) + + ruby $b1, $w1, $b2, $w2 = nil + %bwipe +endfunc + +" Test Vim::Window.current (get current window object) +func Test_Vim_window_current() + let cw = RubyEval('$curwin') + call assert_equal(cw, RubyEval('Vim::Window.current')) + call assert_match('^#$', cw) +endfunc + +" Test Vim::Window.count (number of windows) +func Test_Vim_window_count() + new Xfoo1 + new Xfoo2 + split + call assert_equal('4', RubyEval('Vim::Window.count')) + %bwipe + call assert_equal('1', RubyEval('Vim::Window.count')) +endfunc + +" Test Vim::Window[n] (get window object of window n) +func Test_Vim_window_get() + new Xfoo1 + new Xfoo2 + call assert_match('Xfoo2$', RubyEval('Vim::Window[0].buffer.name')) + wincmd j + call assert_match('Xfoo1$', RubyEval('Vim::Window[1].buffer.name')) + wincmd j + call assert_equal('', RubyEval('Vim::Window[2].buffer.name')) + %bwipe +endfunc + +" Test Vim::Buffer.current (return the buffer object of current buffer) +func Test_Vim_buffer_current() + let cb = RubyEval('$curbuf') + call assert_equal(cb, RubyEval('Vim::Buffer.current')) + call assert_match('^#$', cb) +endfunc + +" Test Vim::Buffer:.count (return the number of buffers) +func Test_Vim_buffer_count() + new Xfoo1 + new Xfoo2 + call assert_equal('3', RubyEval('Vim::Buffer.count')) + %bwipe + call assert_equal('1', RubyEval('Vim::Buffer.count')) +endfunc + +" Test Vim::buffer[n] (return the buffer object of buffer number n) +func Test_Vim_buffer_get() + new Xfoo1 + new Xfoo2 + + " Index of Vim::Buffer[n] goes from 0 to the number of buffers. + call assert_equal('', RubyEval('Vim::Buffer[0].name')) + call assert_match('Xfoo1$', RubyEval('Vim::Buffer[1].name')) + call assert_match('Xfoo2$', RubyEval('Vim::Buffer[2].name')) + call assert_fails('ruby print Vim::Buffer[3].name', + \ "NoMethodError: undefined method `name' for nil:NilClass") + %bwipe +endfunc + +" Test Vim::command({cmd}) (execute a Ex command)) +" Test Vim::command({cmd}) +func Test_Vim_command() + new + call setline(1, ['one', 'two', 'three', 'four']) + ruby Vim::command('2,3d') + call assert_equal(['one', 'four'], getline(1, '$')) + bwipe! +endfunc + +" Test Vim::set_option (set a vim option) +func Test_Vim_set_option() + call assert_equal(0, &number) + ruby Vim::set_option('number') + call assert_equal(1, &number) + ruby Vim::set_option('nonumber') + call assert_equal(0, &number) +endfunc + +func Test_Vim_evaluate() + call assert_equal('123', RubyEval('Vim::evaluate("123")')) + " Vim::evaluate("123").class gives Integer or Fixnum depending + " on versions of Ruby. + call assert_match('^Integer\|Fixnum$', RubyEval('Vim::evaluate("123").class')) + + call assert_equal('1.23', RubyEval('Vim::evaluate("1.23")')) + call assert_equal('Float', RubyEval('Vim::evaluate("1.23").class')) + + call assert_equal('foo', RubyEval('Vim::evaluate("\"foo\"")')) + call assert_equal('String', RubyEval('Vim::evaluate("\"foo\"").class')) + + call assert_equal('[1, 2]', RubyEval('Vim::evaluate("[1, 2]")')) + call assert_equal('Array', RubyEval('Vim::evaluate("[1, 2]").class')) + + call assert_equal('{"1"=>2}', RubyEval('Vim::evaluate("{1:2}")')) + call assert_equal('Hash', RubyEval('Vim::evaluate("{1:2}").class')) + + call assert_equal('', RubyEval('Vim::evaluate("v:null")')) + call assert_equal('NilClass', RubyEval('Vim::evaluate("v:null").class')) + + call assert_equal('', RubyEval('Vim::evaluate("v:none")')) + call assert_equal('NilClass', RubyEval('Vim::evaluate("v:none").class')) + + call assert_equal('true', RubyEval('Vim::evaluate("v:true")')) + call assert_equal('TrueClass', RubyEval('Vim::evaluate("v:true").class')) + call assert_equal('false', RubyEval('Vim::evaluate("v:false")')) + call assert_equal('FalseClass',RubyEval('Vim::evaluate("v:false").class')) +endfunc + +func Test_Vim_evaluate_list() + call setline(line('$'), ['2 line 2']) + ruby Vim.command("normal /^2\n") + let l = ["abc", "def"] + ruby << EOF + curline = $curbuf.line_number + l = Vim.evaluate("l"); + $curbuf.append(curline, l.join("\n")) +EOF + normal j + .rubydo $_ = $_.gsub(/\n/, '/') + call assert_equal('abc/def', getline('$')) +endfunc + +func Test_Vim_evaluate_dict() + let d = {'a': 'foo', 'b': 123} + redir => l:out + ruby d = Vim.evaluate("d"); print d + redir END + call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) +endfunc + +" Test Vim::message({msg}) (display message {msg}) +func Test_Vim_message() + ruby Vim::message('A message') + let messages = split(execute('message'), "\n") + call assert_equal('A message', messages[-1]) +endfunc + +func Test_print() + ruby print "Hello World!" + let messages = split(execute('message'), "\n") + call assert_equal('Hello World!', messages[-1]) +endfunc + +func Test_p() + ruby p 'Just a test' + let messages = split(execute('message'), "\n") + call assert_equal('"Just a test"', messages[-1]) endfunc diff --git a/src/userfunc.c b/src/userfunc.c index 80a603b16e..a8ea303a95 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -1102,6 +1102,21 @@ func_remove(ufunc_T *fp) return FALSE; } + static void +func_clear_items(ufunc_T *fp) +{ + ga_clear_strings(&(fp->uf_args)); + ga_clear_strings(&(fp->uf_lines)); +#ifdef FEAT_PROFILE + vim_free(fp->uf_tml_count); + fp->uf_tml_count = NULL; + vim_free(fp->uf_tml_total); + fp->uf_tml_total = NULL; + vim_free(fp->uf_tml_self); + fp->uf_tml_self = NULL; +#endif +} + /* * Free all things that a function contains. Does not free the function * itself, use func_free() for that. @@ -1115,13 +1130,7 @@ func_clear(ufunc_T *fp, int force) fp->uf_cleared = TRUE; /* clear this function */ - ga_clear_strings(&(fp->uf_args)); - ga_clear_strings(&(fp->uf_lines)); -#ifdef FEAT_PROFILE - vim_free(fp->uf_tml_count); - vim_free(fp->uf_tml_total); - vim_free(fp->uf_tml_self); -#endif + func_clear_items(fp); funccal_unref(fp->uf_scoped, fp, force); } @@ -2312,9 +2321,12 @@ ex_function(exarg_T *eap) else { /* redefine existing function */ - ga_clear_strings(&(fp->uf_args)); - ga_clear_strings(&(fp->uf_lines)); VIM_CLEAR(name); + func_clear_items(fp); +#ifdef FEAT_PROFILE + fp->uf_profiling = FALSE; + fp->uf_prof_initialized = FALSE; +#endif } } } @@ -2434,10 +2446,6 @@ ex_function(exarg_T *eap) fp->uf_scoped = NULL; #ifdef FEAT_PROFILE - fp->uf_tml_count = NULL; - fp->uf_tml_total = NULL; - fp->uf_tml_self = NULL; - fp->uf_profiling = FALSE; if (prof_def_func()) func_do_profile(fp); #endif diff --git a/src/version.c b/src/version.c index 0657b54bf7..ade3778821 100644 --- a/src/version.c +++ b/src/version.c @@ -101,6 +101,11 @@ static char *(features[]) = "-arabic", #endif "+autocmd", +#ifdef FEAT_AUTOCHDIR + "+autochdir", +#else + "-autochdir", +#endif #ifdef FEAT_AUTOSERVERNAME "+autoservername", #else @@ -724,11 +729,7 @@ static char *(features[]) = #else "-viminfo", #endif -#ifdef FEAT_VREPLACE "+vreplace", -#else - "-vreplace", -#endif #ifdef WIN3264 # ifdef FEAT_VTP "+vtp", @@ -808,6 +809,38 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 229, +/**/ + 228, +/**/ + 227, +/**/ + 226, +/**/ + 225, +/**/ + 224, +/**/ + 223, +/**/ + 222, +/**/ + 221, +/**/ + 220, +/**/ + 219, +/**/ + 218, +/**/ + 217, +/**/ + 216, +/**/ + 215, +/**/ + 214, /**/ 213, /**/ diff --git a/src/vim.h b/src/vim.h index e469b28ee4..dc5ac1485e 100644 --- a/src/vim.h +++ b/src/vim.h @@ -676,10 +676,8 @@ extern int (*dyn_libintl_putenv)(const char *envstring); #define REPLACE_FLAG 0x40 /* Replace mode flag */ #define REPLACE (REPLACE_FLAG + INSERT) -#ifdef FEAT_VREPLACE -# define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */ -# define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT) -#endif +#define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */ +#define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT) #define LREPLACE (REPLACE_FLAG + LANGMAP) #define NORMAL_BUSY (0x100 + NORMAL) /* Normal mode, busy with a command */