mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5cd759d24e | |||
| e6977ce6b1 | |||
| 5af4e395b3 | |||
| 03e13e7354 | |||
| 295471920d | |||
| 30700cd5ff | |||
| b39705238b | |||
| d6f259e6be | |||
| 7c26ef0ab9 | |||
| a3a7a5a577 | |||
| b6bc72b09d | |||
| 67754cb23f | |||
| 8fce3735aa | |||
| 55197bd4c4 | |||
| d47d52232b | |||
| 37402ed534 | |||
| 4af7259b2b | |||
| 55d4691308 | |||
| 76ab4fd619 | |||
| 446e7a3cd3 | |||
| 539328197c | |||
| 10ccaa17ec | |||
| 9a8534673a | |||
| 4087bfd96d | |||
| 20091c18c4 | |||
| 10600db772 | |||
| 88b53fd052 | |||
| 74ea88c170 | |||
| b6fc72851c | |||
| 9719568533 |
@@ -1,9 +1,9 @@
|
||||
" Vim plugin for formatting XML
|
||||
" Last Change: Thu, 22 May 2018 21:26:55 +0100
|
||||
" Version: 0.1
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" License: VIM License
|
||||
" Last Change: Thu, 07 Dec 2018
|
||||
" Version: 0.1
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" License: VIM License
|
||||
" Documentation: see :h xmlformat.txt (TODO!)
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
@@ -85,7 +85,11 @@ func! s:Trim(item)
|
||||
endfunc
|
||||
" Check if tag is a new opening tag <tag> {{{1
|
||||
func! s:StartTag(tag)
|
||||
return a:tag =~? '^\s*<[^/?]'
|
||||
let is_comment = s:IsComment(a:tag)
|
||||
return a:tag =~? '^\s*<[^/?]' && !is_comment
|
||||
endfunc
|
||||
func! s:IsComment(tag)
|
||||
return a:tag =~? '<!--'
|
||||
endfunc
|
||||
" Remove one level of indentation {{{1
|
||||
func! s:DecreaseIndent()
|
||||
|
||||
@@ -111,11 +111,14 @@ this, you will have to type <BS> e again. To avoid this don't set the
|
||||
|
||||
You may have problems using Vim with characters which have a value above 128.
|
||||
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
|
||||
mode. After leaving the Insert mode everything is fine. Note that fmt
|
||||
removes all characters with a value above 128 from the text being formatted.
|
||||
On some Unix systems this means you have to define the environment-variable
|
||||
LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
|
||||
setenv LC_CTYPE iso_8859_1
|
||||
mode. After leaving the Insert mode everything is fine. On some Unix systems
|
||||
this means you have to define the environment-variable LC_CTYPE. If you are
|
||||
using csh, then put the following line in your .cshrc: >
|
||||
setenv LC_CTYPE en_US.utf8
|
||||
(or similar for a different language or country). The value must be a valid
|
||||
locale on your system, i.e. on Unix-like systems it must be present in the
|
||||
output of >
|
||||
locale -a
|
||||
|
||||
==============================================================================
|
||||
3. Default digraphs *digraphs-default*
|
||||
|
||||
+16
-9
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.1. Last change: 2018 May 17
|
||||
*eval.txt* For Vim version 8.1. Last change: 2018 Dec 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -518,7 +518,7 @@ To loop over the values use the |values()| function: >
|
||||
:endfor
|
||||
|
||||
If you want both the key and the value use the |items()| function. It returns
|
||||
a List in which each item is a List with two items, the key and the value: >
|
||||
a List in which each item is a List with two items, the key and the value: >
|
||||
:for [key, value] in items(mydict)
|
||||
: echo key . ': ' . value
|
||||
:endfor
|
||||
@@ -1088,11 +1088,6 @@ These are INVALID:
|
||||
3. empty {M}
|
||||
1e40 missing .{M}
|
||||
|
||||
*float-pi* *float-e*
|
||||
A few useful values to copy&paste: >
|
||||
:let pi = 3.14159265359
|
||||
:let e = 2.71828182846
|
||||
|
||||
Rationale:
|
||||
Before floating point was introduced, the text "123.456" was interpreted as
|
||||
the two numbers "123" and "456", both converted to a string and concatenated,
|
||||
@@ -1101,6 +1096,15 @@ could not find it intentionally being used in Vim scripts, this backwards
|
||||
incompatibility was accepted in favor of being able to use the normal notation
|
||||
for floating point numbers.
|
||||
|
||||
*float-pi* *float-e*
|
||||
A few useful values to copy&paste: >
|
||||
:let pi = 3.14159265359
|
||||
:let e = 2.71828182846
|
||||
Or, if you don't want to write them in as floating-point literals, you can
|
||||
also use functions, like the following: >
|
||||
:let pi = acos(-1.0)
|
||||
:let e = exp(1.0)
|
||||
|
||||
*floating-point-precision*
|
||||
The precision and range of floating points numbers depends on what "double"
|
||||
means in the library Vim was compiled with. There is no way to change this at
|
||||
@@ -1438,7 +1442,9 @@ Note that this means that filetype plugins don't get a different set of script
|
||||
variables for each buffer. Use local buffer variables instead |b:var|.
|
||||
|
||||
|
||||
Predefined Vim variables: *vim-variable* *v:var* *v:*
|
||||
PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
|
||||
*E963*
|
||||
Some variables can be set by the user, but the type cannot be changed.
|
||||
|
||||
*v:beval_col* *beval_col-variable*
|
||||
v:beval_col The number of the column, over which the mouse pointer is.
|
||||
@@ -7845,7 +7851,8 @@ str2float({expr}) *str2float()*
|
||||
as when using a floating point number in an expression, see
|
||||
|floating-point-format|. But it's a bit more permissive.
|
||||
E.g., "1e40" is accepted, while in an expression you need to
|
||||
write "1.0e40".
|
||||
write "1.0e40". The hexadecimal form "0x123" is also
|
||||
accepted, but not others, like binary or octal.
|
||||
Text after the number is silently ignored.
|
||||
The decimal point is always '.', no matter what the locale is
|
||||
set to. A comma ends the number: "12,345.67" is converted to
|
||||
|
||||
+24
-12
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.1. Last change: 2018 May 13
|
||||
*map.txt* For Vim version 8.1. Last change: 2018 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1223,6 +1223,10 @@ See |:verbose-cmd| for more information.
|
||||
attributes (see below) are {attr}. If the command
|
||||
already exists, an error is reported, unless a ! is
|
||||
specified, in which case the command is redefined.
|
||||
There is one exception: When sourcing a script again,
|
||||
a command that was previously defined in that script
|
||||
will be silently replaced.
|
||||
|
||||
|
||||
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
|
||||
Delete the user-defined command {cmd}.
|
||||
@@ -1230,7 +1234,8 @@ See |:verbose-cmd| for more information.
|
||||
:comc[lear] *:comc* *:comclear*
|
||||
Delete all user-defined commands.
|
||||
|
||||
Command attributes
|
||||
|
||||
Command attributes ~
|
||||
|
||||
User-defined commands are treated by Vim just like any other Ex commands. They
|
||||
can have arguments, or have a range specified. Arguments are subject to
|
||||
@@ -1241,8 +1246,9 @@ There are a number of attributes, split into four categories: argument
|
||||
handling, completion behavior, range handling, and special cases. The
|
||||
attributes are described below, by category.
|
||||
|
||||
Argument handling *E175* *E176* *:command-nargs*
|
||||
|
||||
Argument handling ~
|
||||
*E175* *E176* *:command-nargs*
|
||||
By default, a user defined command will take no arguments (and an error is
|
||||
reported if any are supplied). However, it is possible to specify that the
|
||||
command can take arguments, using the -nargs attribute. Valid cases are:
|
||||
@@ -1271,8 +1277,10 @@ defined, not where it is invoked! Example:
|
||||
Executing script2.vim will result in "None" being echoed. Not what you
|
||||
intended! Calling a function may be an alternative.
|
||||
|
||||
Completion behavior *:command-completion* *E179*
|
||||
*E180* *E181* *:command-complete*
|
||||
|
||||
Completion behavior ~
|
||||
*:command-completion* *E179* *E180* *E181*
|
||||
*:command-complete*
|
||||
By default, the arguments of user defined commands do not undergo completion.
|
||||
However, by specifying one or the other of the following attributes, argument
|
||||
completion can be enabled:
|
||||
@@ -1317,9 +1325,9 @@ completion can be enabled:
|
||||
Note: That some completion methods might expand environment variables.
|
||||
|
||||
|
||||
Custom completion *:command-completion-custom*
|
||||
*:command-completion-customlist*
|
||||
*E467* *E468*
|
||||
Custom completion ~
|
||||
*:command-completion-custom*
|
||||
*:command-completion-customlist* *E467* *E468*
|
||||
It is possible to define customized completion schemes via the "custom,{func}"
|
||||
or the "customlist,{func}" completion argument. The {func} part should be a
|
||||
function with the following signature: >
|
||||
@@ -1364,8 +1372,8 @@ the 'path' option: >
|
||||
This example does not work for file names with spaces!
|
||||
|
||||
|
||||
Range handling *E177* *E178* *:command-range*
|
||||
*:command-count*
|
||||
Range handling ~
|
||||
*E177* *E178* *:command-range* *:command-count*
|
||||
By default, user-defined commands do not accept a line number range. However,
|
||||
it is possible to specify that the command does take a range (the -range
|
||||
attribute), or that it takes an arbitrary count value, either in the line
|
||||
@@ -1399,8 +1407,11 @@ Possible values are:
|
||||
-addr=loaded_buffers Range for loaded buffers
|
||||
-addr=windows Range for windows
|
||||
-addr=tabs Range for tab pages
|
||||
-addr=other other kind of range
|
||||
|
||||
Special cases *:command-bang* *:command-bar*
|
||||
|
||||
Special cases ~
|
||||
*:command-bang* *:command-bar*
|
||||
*:command-register* *:command-buffer*
|
||||
There are some special cases as well:
|
||||
|
||||
@@ -1418,7 +1429,8 @@ replacement text separately.
|
||||
Note that these arguments can be abbreviated, but that is a deprecated
|
||||
feature. Use the full name for new scripts.
|
||||
|
||||
Replacement text
|
||||
|
||||
Replacement text ~
|
||||
|
||||
The replacement text for a user defined command is scanned for special escape
|
||||
sequences, using <...> notation. Escape sequences are replaced with values
|
||||
|
||||
@@ -8290,7 +8290,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
separated by non-keyword characters (white space is preferred).
|
||||
Maximum line length is 510 bytes.
|
||||
|
||||
Unfortunately we currently cannot recommend a file to be used here.
|
||||
An English word list was added to this github issue:
|
||||
https://github.com/vim/vim/issues/629#issuecomment-443293282
|
||||
Unpack thesaurus_pkg.zip, put the thesaurus.txt file somewhere, e.g.
|
||||
~/.vim/thesaurus/english.txt, and the 'thesaurus' option to this file
|
||||
name.
|
||||
|
||||
To include a comma in a file name precede it with a backslash. Spaces
|
||||
after a comma are ignored, otherwise spaces are included in the file
|
||||
@@ -8607,8 +8611,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|t_RV| is set to the escape sequence to request the xterm version
|
||||
number, more intelligent detection process runs.
|
||||
The "xterm2" value will be set if the xterm version is reported to be
|
||||
from 95 to 276. The "sgr" value will be set if the xterm version is
|
||||
277 or higher and when Vim detects Mac Terminal.app or iTerm2.
|
||||
from 95 to 276. The "sgr" value will be set if Vim detects Mac
|
||||
Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or
|
||||
higher.
|
||||
If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
|
||||
automatically, set t_RV to an empty string: >
|
||||
:set t_RV=
|
||||
|
||||
@@ -110,7 +110,7 @@ sent to the job running in the terminal. For example, to make F1 switch
|
||||
to Terminal-Normal mode: >
|
||||
tnoremap <F1> <C-W>N
|
||||
You can use Esc, but you need to make sure it won't cause other keys to
|
||||
break: >
|
||||
break (cursor keys start with an Esc, so they may break): >
|
||||
tnoremap <Esc> <C-W>N
|
||||
set notimeout ttimeout timeoutlen=100
|
||||
|
||||
|
||||
+31
-31
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.1. Last change: 2018 May 17
|
||||
*todo.txt* For Vim version 8.1. Last change: 2018 Dec 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,15 +38,11 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Make ":script 40" edit the script listed with number 40. Actually use
|
||||
":scriptnames".
|
||||
|
||||
Download page: "A 64 bit version" link is wrong, use this one instead:
|
||||
https://github.com/vim/vim-win32-installer/releases/latest
|
||||
|
||||
'incsearch' with :s: (#3321)
|
||||
- :s/foo using CTRL-G moves to another line, should not happen, or use the
|
||||
correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
|
||||
- :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637)
|
||||
pass delim to do_search() ?
|
||||
- Also support range: :/foo/,/bar/delete
|
||||
- Also support for user command, e.g. Cfilter
|
||||
- :%s/foo should take the first match below the cursor line, unless there
|
||||
@@ -105,22 +101,19 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Users get used to "function!" because they reload a script file. How about
|
||||
recognizing the script is re-sourced and not giving an error for the first
|
||||
function that overwrites. Then one can leave out the exclamation mark and
|
||||
catch actual errors, overwriting a function from another script.
|
||||
":function" can now silently overwrite the function from the same script.
|
||||
Do the same for ":command" ?
|
||||
|
||||
Update for German spell files: https://github.com/chrisbra/vim/compare/5e021c990f8817a50d3264782a5...3b27c92f297540761ebbd92d04fb3
|
||||
(Christian Brabandt, 2018 Nov 4)
|
||||
|
||||
Patch for nsis/README.txt and uninstal.txt (Ken Takata, 2018 Nov 17, #3614)
|
||||
|
||||
Patch to add commandline completion tests. (Dominique, #3622)
|
||||
|
||||
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
|
||||
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
|
||||
Nov 17)
|
||||
|
||||
Patch to add configure flags to skip rtl, farsi and arabic support.
|
||||
(Diego Carrión, #1867)
|
||||
|
||||
Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9,
|
||||
#3417)
|
||||
|
||||
@@ -128,9 +121,6 @@ Does not build with MinGW out of the box:
|
||||
- _stat64 is not defined, need to use "struct stat" in vim.h
|
||||
- WINVER conflict, should use 0x0600 by default?
|
||||
|
||||
Adding a fold with a marker in a C file doesn't add the comment /* */ if the
|
||||
line contains a * somewhere. Patch with a fix (Hirohito Higashi, 2018 Nov 22)
|
||||
|
||||
Crash in terminal with long multi-byte sequence. (2018 Nov 17, #3619)
|
||||
Dominique cannot reproduce. Update Nov 18.
|
||||
Suggested solution by Yasuhiro Matsumoto, 2018 Nov 18.
|
||||
@@ -138,6 +128,14 @@ Suggested solution by Yasuhiro Matsumoto, 2018 Nov 18.
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479)
|
||||
Now included in #3501, using MUI2. Use the zip file to get the binary files:
|
||||
https://github.com/vim/vim/files/2475621/nsis-icons.zip
|
||||
Ready to include now.
|
||||
|
||||
Patch to add blob type support. (Yasuhiro Matsumoto, 2018 Nov 26, #3638)
|
||||
Not done yet.
|
||||
|
||||
Errors found with random data:
|
||||
heap-buffer-overflow in alist_add (#2472)
|
||||
|
||||
@@ -147,6 +145,9 @@ mappings no longer work. Create a new terminal for the better solution?
|
||||
Patch to fix that appending makes items to be "recognized".
|
||||
(Yegappan, 2018 Nov 23). Reported by Daniel Hahler, #3633.
|
||||
|
||||
Patch to define and manipulate signs with functions. Adds sign groups and
|
||||
priority. (Yegappan Lakshmanan, #3652)
|
||||
|
||||
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?
|
||||
@@ -175,9 +176,6 @@ C syntax: {} inside () causes following {} to be highlighted as error.
|
||||
More warnings from static analysis:
|
||||
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
|
||||
|
||||
Quickfix accessing free memory. (Dominique, 2018 Oct 13, #3538)
|
||||
Yegappan will look into it.
|
||||
|
||||
Patch for this: (Aron Widforss, 2018 Oct 13, #3539)
|
||||
missing a test.
|
||||
7 Make 'scrolloff' a global-local option, so that it can be different in the
|
||||
@@ -199,14 +197,12 @@ punctiuation is repeated. (Smylers, 2018 Nov 17, #3621)
|
||||
":mksession" cannot handle a very long 'runtimepath'. (Timothy Madden, 21 Sep
|
||||
2018, #3466) Patch from Christian, 2018 Oct 30 (with comments).
|
||||
|
||||
Patch to add functions for signs. (Yegappan Lakshmanan, 2018 Nov 24)
|
||||
obsolete: Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
|
||||
|
||||
Patch in pull request #2967: Allow white space in sign text. (Ben Jackson)
|
||||
Test fails in AppVeyor.
|
||||
|
||||
Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479)
|
||||
Now included in #3501, using MUI2. Use the zip file to get the binary files:
|
||||
https://github.com/vim/vim/files/2475621/nsis-icons.zip
|
||||
Still being worked on.
|
||||
|
||||
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
|
||||
|
||||
Patch to convert temp file name. (Yasuhiro Matsumoto, #3520)
|
||||
@@ -227,6 +223,9 @@ Patch to implement 'diffref' option. (#3535)
|
||||
|
||||
Patch to fix that bracketed paste remains after Vim exits. (2018 Oct 30, #3579)
|
||||
|
||||
Patch for lnext/lprev work in specific cases. (Yegappan Lakshmanan, 2018 Dec
|
||||
4, #3633)
|
||||
|
||||
cursorline highlighting not removed after yanking in Visual mode.
|
||||
(Matéo Zanibelli, 2018 Oct 30, #3578)
|
||||
Patch by Christian, Oct 30.
|
||||
@@ -246,6 +245,9 @@ Memory leak in test_terminal:
|
||||
|
||||
gethostbyname() is old, use getaddrinfo() if available. (#3227)
|
||||
|
||||
Patch to add match count and current index "3/44" when using "n" command.
|
||||
(Christian Brabandt, on issue #453). Only when search string was typed?
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
@@ -288,6 +290,9 @@ Further xdiff changes:
|
||||
|
||||
Difference between two regexp engines: #3373
|
||||
|
||||
Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
|
||||
What is the practical use for this?
|
||||
|
||||
When the last line wraps, selecting with the mouse below that line only
|
||||
includes the first screen line. (2018 Aug 23, #3368)
|
||||
|
||||
@@ -759,9 +764,6 @@ Is it possible to keep the complete menu open when calling complete()?
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
Patch to add configure flags to skip rtl, farsi and arabic support.
|
||||
(Diego Carrión, #1867)
|
||||
|
||||
assert_fails() can only check for the first error. Make it possible to have
|
||||
it catch multiple errors and check all of them.
|
||||
|
||||
@@ -1654,8 +1656,6 @@ Or use expand('<sid>')?
|
||||
|
||||
Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
|
||||
|
||||
Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
|
||||
|
||||
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
|
||||
|
||||
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
|
||||
|
||||
@@ -321,13 +321,13 @@ N
|
||||
.TP
|
||||
\-R
|
||||
Skrivebeskyttet tilstand.
|
||||
'readonly'-valgmuligheden sættes.
|
||||
\&'readonly'-valgmuligheden sættes.
|
||||
Du kan stadig redigere bufferen, men vil være forhindret i
|
||||
fejlagtigt at overskrive en fil.
|
||||
Hvis du vil overskrive en fil, så tilføj et
|
||||
udråbstegn til Ex-kommandoen, som i ":w!".
|
||||
\-R-tilvalget indebærer også \-n-tilvalget (se ovenfor).
|
||||
'readonly'-valgmuligheden kan slås fra med ":set noro".
|
||||
\&'readonly'-valgmuligheden kan slås fra med ":set noro".
|
||||
Se ":help 'readonly'".
|
||||
.TP
|
||||
\-r
|
||||
|
||||
@@ -321,13 +321,13 @@ Når N udelades, så åbnes én fanebladsside pr. fil.
|
||||
.TP
|
||||
\-R
|
||||
Skrivebeskyttet tilstand.
|
||||
'readonly'-valgmuligheden sættes.
|
||||
\&'readonly'-valgmuligheden sættes.
|
||||
Du kan stadig redigere bufferen, men vil være forhindret i
|
||||
fejlagtigt at overskrive en fil.
|
||||
Hvis du vil overskrive en fil, så tilføj et
|
||||
udråbstegn til Ex-kommandoen, som i ":w!".
|
||||
\-R-tilvalget indebærer også \-n-tilvalget (se ovenfor).
|
||||
'readonly'-valgmuligheden kan slås fra med ":set noro".
|
||||
\&'readonly'-valgmuligheden kan slås fra med ":set noro".
|
||||
Se ":help 'readonly'".
|
||||
.TP
|
||||
\-r
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: xml
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Last Changed: May 08th, 2018
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" Language: xml
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Last Changed: Dec 07th, 2018
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Portable Makefile for running indent tests.
|
||||
|
||||
VIM = vim
|
||||
VIMRUNTIME = ..
|
||||
|
||||
# Run the tests that didn't run yet or failed previously.
|
||||
# If a test succeeds a testdir/*.out file will be written.
|
||||
# If a test fails a testdir/*.fail file will be written.
|
||||
test:
|
||||
$(VIM) --clean --not-a-term -u testdir/runtest.vim
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/runtest.vim
|
||||
|
||||
|
||||
clean:
|
||||
$(VIM) --clean --not-a-term -u testdir/cleantest.vim
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/cleantest.vim
|
||||
|
||||
+66
-8
@@ -1,15 +1,73 @@
|
||||
" Vim indent file
|
||||
" Language: C#
|
||||
" Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Fri, 15 Mar 2002 07:53:54 CET
|
||||
" Language: C#
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainers: Aquila Deus
|
||||
" Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2018-11-21
|
||||
" Filenames: *.cs
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
"
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" C# is like indenting C
|
||||
setlocal cindent
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
let b:undo_indent = "setl cin<"
|
||||
|
||||
setlocal indentexpr=GetCSIndent(v:lnum)
|
||||
|
||||
function! s:IsCompilerDirective(line)
|
||||
return a:line =~? '^\s*#'
|
||||
endf
|
||||
|
||||
function! s:IsAttributeLine(line)
|
||||
return a:line =~? '^\s*\[[A-Za-z]' && a:line =~? '\]$'
|
||||
endf
|
||||
|
||||
function! s:FindPreviousNonCompilerDirectiveLine(start_lnum)
|
||||
for delta in range(0, a:start_lnum)
|
||||
let lnum = a:start_lnum - delta
|
||||
let line = getline(lnum)
|
||||
let is_directive = s:IsCompilerDirective(line)
|
||||
if !is_directive
|
||||
return lnum
|
||||
endif
|
||||
endfor
|
||||
return 0
|
||||
endf
|
||||
|
||||
function! GetCSIndent(lnum) abort
|
||||
" Hit the start of the file, use zero indent.
|
||||
if a:lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let this_line = getline(a:lnum)
|
||||
|
||||
" Compiler directives use zero indent if so configured.
|
||||
let is_first_col_macro = s:IsCompilerDirective(this_line) && stridx(&l:cinkeys, '0#') >= 0
|
||||
if is_first_col_macro
|
||||
return cindent(a:lnum)
|
||||
endif
|
||||
|
||||
let lnum = s:FindPreviousNonCompilerDirectiveLine(a:lnum - 1)
|
||||
let previous_code_line = getline(lnum)
|
||||
if s:IsAttributeLine(previous_code_line)
|
||||
let ind = indent(lnum)
|
||||
return ind
|
||||
else
|
||||
return cindent(a:lnum)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let b:undo_indent = 'setlocal indentexpr<'
|
||||
|
||||
let &cpoptions = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:et:sw=2:sts=2
|
||||
|
||||
@@ -216,8 +216,9 @@ endfunc "}}}
|
||||
" Add known tag pairs.
|
||||
" Self-closing tags and tags that are sometimes {{{
|
||||
" self-closing (e.g., <p>) are not here (when encountering </p> we can find
|
||||
" the matching <p>, but not the other way around). Known self-closing tags:
|
||||
" 'p', 'img', 'source'.
|
||||
" the matching <p>, but not the other way around).
|
||||
" Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track',
|
||||
" 'wbr'.
|
||||
" Old HTML tags:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
|
||||
@@ -232,11 +233,11 @@ call s:AddITags(s:indent_tags, [
|
||||
|
||||
" New HTML5 elements:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
|
||||
\ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption',
|
||||
\ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter',
|
||||
\ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section',
|
||||
\ 'summary', 'svg', 'time', 'track', 'video', 'wbr'])
|
||||
\ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data',
|
||||
\ 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure',
|
||||
\ 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output',
|
||||
\ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary',
|
||||
\ 'svg', 'time', 'video'])
|
||||
|
||||
" Tags added for web components:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
@@ -934,7 +935,7 @@ func! s:InsideTag(foundHtmlString)
|
||||
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
|
||||
endif
|
||||
if idx == -1
|
||||
" after just <tag indent one level more
|
||||
" after just "<tag" indent one level more
|
||||
let idx = match(text, '<' . s:tagname . '$')
|
||||
if idx >= 0
|
||||
call cursor(lnum, idx)
|
||||
|
||||
+38
-12
@@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: Tcl
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Language: Tcl
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Update: Chris Heithoff <chrisheithoff@gmail.com>
|
||||
" Latest Revision: 2018-12-05
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -28,6 +29,15 @@ function s:prevnonblanknoncomment(lnum)
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
function s:ends_with_backslash(lnum)
|
||||
let line = getline(a:lnum)
|
||||
if line =~ '\\\s*$'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function s:count_braces(lnum, count_open)
|
||||
let n_open = 0
|
||||
let n_close = 0
|
||||
@@ -53,23 +63,39 @@ endfunction
|
||||
|
||||
function GetTclIndent()
|
||||
let line = getline(v:lnum)
|
||||
if line =~ '^\s*\*'
|
||||
return cindent(v:lnum)
|
||||
elseif line =~ '^\s*}'
|
||||
return indent(v:lnum) - shiftwidth()
|
||||
endif
|
||||
|
||||
" Get the line number of the previous non-blank or non-comment line.
|
||||
let pnum = s:prevnonblanknoncomment(v:lnum - 1)
|
||||
if pnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
|
||||
" ..and the previous line before the previous line.
|
||||
let pnum2 = s:prevnonblanknoncomment(pnum-1)
|
||||
|
||||
let pline = getline(pnum)
|
||||
if pline =~ '}\s*$'
|
||||
let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
|
||||
" Default indentation is to preserve the previous indentation.
|
||||
let ind = indent(pnum)
|
||||
|
||||
" ...but if previous line introduces an open brace, then increase current line's indentation
|
||||
if s:count_braces(pnum, 1) > 0
|
||||
let ind += shiftwidth()
|
||||
else
|
||||
" Look for backslash line continuation on the previous two lines.
|
||||
let slash1 = s:ends_with_backslash(pnum)
|
||||
let slash2 = s:ends_with_backslash(pnum2)
|
||||
if slash1 && !slash2
|
||||
" If the previous line begins a line continuation.
|
||||
let ind += shiftwidth()
|
||||
elseif !slash1 && slash2
|
||||
" If two lines ago was the end of a line continuation group of lines.
|
||||
let ind -= shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the current line begins with a closed brace, then decrease the indentation by one.
|
||||
if line =~ '^\s*}'
|
||||
let ind -= shiftwidth()
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
" vim: set ft=html sw=4 :
|
||||
|
||||
|
||||
" START_INDENT
|
||||
<div>
|
||||
<div>
|
||||
text
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="foo bar">
|
||||
text
|
||||
</div>
|
||||
|
||||
<div class="foo bar"
|
||||
data="something">
|
||||
text
|
||||
</div>
|
||||
|
||||
<div class="foo
|
||||
bar">
|
||||
text
|
||||
</div>
|
||||
|
||||
" END_INDENT
|
||||
@@ -0,0 +1,26 @@
|
||||
" vim: set ft=html sw=4 :
|
||||
|
||||
|
||||
" START_INDENT
|
||||
<div>
|
||||
<div>
|
||||
text
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="foo bar">
|
||||
text
|
||||
</div>
|
||||
|
||||
<div class="foo bar"
|
||||
data="something">
|
||||
text
|
||||
</div>
|
||||
|
||||
<div class="foo
|
||||
bar">
|
||||
text
|
||||
</div>
|
||||
|
||||
" END_INDENT
|
||||
@@ -0,0 +1,19 @@
|
||||
# vim: set filetype=tcl shiftwidth=4 tabstop=4:
|
||||
|
||||
# START_INDENT
|
||||
proc abc {} {
|
||||
set a 5
|
||||
if {[some_cmd]==1} {
|
||||
foreach i [list {1 2 3}] {
|
||||
# Does this comment affect anything?
|
||||
puts $i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
command_with_a_long_time -arg1 "First" \
|
||||
-arg2 "Second" \
|
||||
-arg3 "Third"
|
||||
|
||||
puts "Move indent back after line continuation is complete"
|
||||
# END_INDENT
|
||||
@@ -0,0 +1,19 @@
|
||||
# vim: set filetype=tcl shiftwidth=4 tabstop=4:
|
||||
|
||||
# START_INDENT
|
||||
proc abc {} {
|
||||
set a 5
|
||||
if {[some_cmd]==1} {
|
||||
foreach i [list {1 2 3}] {
|
||||
# Does this comment affect anything?
|
||||
puts $i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
command_with_a_long_time -arg1 "First" \
|
||||
-arg2 "Second" \
|
||||
-arg3 "Third"
|
||||
|
||||
puts "Move indent back after line continuation is complete"
|
||||
# END_INDENT
|
||||
@@ -0,0 +1,32 @@
|
||||
<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
|
||||
<!-- START_INDENT -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<tag0>
|
||||
<tag1>
|
||||
<!-- comment -->
|
||||
<tag2>
|
||||
<tag3/>
|
||||
</tag2>
|
||||
<!-- text comment -->
|
||||
|
||||
<!--
|
||||
text comment
|
||||
-->
|
||||
</tag1>
|
||||
<!--
|
||||
text comment
|
||||
end coment -->
|
||||
</tag0>
|
||||
<!-- END_INDENT -->
|
||||
|
||||
<!-- START_INDENT -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<tag0>
|
||||
<tag1>
|
||||
<!-- comment -->
|
||||
<tag2>
|
||||
<tag3/>
|
||||
</tag2>
|
||||
</tag1>
|
||||
</tag0>
|
||||
<!-- END_INDENT -->
|
||||
@@ -0,0 +1,32 @@
|
||||
<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
|
||||
<!-- START_INDENT -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<tag0>
|
||||
<tag1>
|
||||
<!-- comment -->
|
||||
<tag2>
|
||||
<tag3/>
|
||||
</tag2>
|
||||
<!-- text comment -->
|
||||
|
||||
<!--
|
||||
text comment
|
||||
-->
|
||||
</tag1>
|
||||
<!--
|
||||
text comment
|
||||
end coment -->
|
||||
</tag0>
|
||||
<!-- END_INDENT -->
|
||||
|
||||
<!-- START_INDENT -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<tag0>
|
||||
<tag1>
|
||||
<!-- comment -->
|
||||
<tag2>
|
||||
<tag3/>
|
||||
</tag2>
|
||||
</tag1>
|
||||
</tag0>
|
||||
<!-- END_INDENT -->
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
" Set options and add mapping such that Vim behaves a lot like MS-Windows
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2017 Oct 28
|
||||
" Last Change: 2018 Dec 07
|
||||
|
||||
" bail out if this isn't wanted (mrsvim.vim uses this).
|
||||
" Bail out if this isn't wanted.
|
||||
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
|
||||
finish
|
||||
endif
|
||||
|
||||
+92
-48
@@ -74,10 +74,10 @@ let s:break_id = 13 " breakpoint number is added to this
|
||||
let s:stopped = 1
|
||||
|
||||
" Take a breakpoint number as used by GDB and turn it into an integer.
|
||||
" The breakpoint may contain a dot: 123.4
|
||||
func s:Breakpoint2SignNumber(nr)
|
||||
let t = split(a:nr, '\.')
|
||||
return t[0] * 1000 + (len(t) == 2 ? t[1] : 0)
|
||||
" The breakpoint may contain a dot: 123.4 -> 123004
|
||||
" The main breakpoint has a zero subid.
|
||||
func s:Breakpoint2SignNumber(id, subid)
|
||||
return s:break_id + a:id * 1000 + a:subid
|
||||
endfunction
|
||||
|
||||
func s:Highlight(init, old, new)
|
||||
@@ -362,8 +362,17 @@ func s:StartDebugCommon(dict)
|
||||
|
||||
" Contains breakpoints that have been placed, key is a string with the GDB
|
||||
" breakpoint number.
|
||||
" Each entry is a dict, containing the sub-breakpoints. Key is the subid.
|
||||
" For a breakpoint that is just a number the subid is zero.
|
||||
" For a breakpoint "123.4" the id is "123" and subid is "4".
|
||||
" Example, when breakpoint "44", "123", "123.1" and "123.2" exist:
|
||||
" {'44': {'0': entry}, '123': {'0': entry, '1': entry, '2': entry}}
|
||||
let s:breakpoints = {}
|
||||
|
||||
" Contains breakpoints by file/lnum. The key is "fname:lnum".
|
||||
" Each entry is a list of breakpoint IDs at that position.
|
||||
let s:breakpoint_locations = {}
|
||||
|
||||
augroup TermDebug
|
||||
au BufRead * call s:BufRead()
|
||||
au BufUnload * call s:BufUnloaded()
|
||||
@@ -683,10 +692,13 @@ func s:DeleteCommands()
|
||||
endif
|
||||
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
for key in keys(s:breakpoints)
|
||||
exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for subid in keys(entries)
|
||||
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
|
||||
endfor
|
||||
endfor
|
||||
unlet s:breakpoints
|
||||
unlet s:breakpoint_locations
|
||||
|
||||
sign undefine debugPC
|
||||
for val in s:BreakpointSigns
|
||||
@@ -721,15 +733,27 @@ endfunc
|
||||
func s:ClearBreakpoint()
|
||||
let fname = fnameescape(expand('%:p'))
|
||||
let lnum = line('.')
|
||||
for [key, val] in items(s:breakpoints)
|
||||
if val['fname'] == fname && val['lnum'] == lnum
|
||||
call s:SendCommand('-break-delete ' . key)
|
||||
" Assume this always wors, the reply is simply "^done".
|
||||
exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
|
||||
unlet s:breakpoints[key]
|
||||
break
|
||||
let bploc = printf('%s:%d', fname, lnum)
|
||||
if has_key(s:breakpoint_locations, bploc)
|
||||
let idx = 0
|
||||
for id in s:breakpoint_locations[bploc]
|
||||
if has_key(s:breakpoints, id)
|
||||
" Assume this always works, the reply is simply "^done".
|
||||
call s:SendCommand('-break-delete ' . id)
|
||||
for subid in keys(s:breakpoints[id])
|
||||
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
|
||||
endfor
|
||||
unlet s:breakpoints[id]
|
||||
unlet s:breakpoint_locations[bploc][idx]
|
||||
break
|
||||
else
|
||||
let idx += 1
|
||||
endif
|
||||
endfor
|
||||
if empty(s:breakpoint_locations[bploc])
|
||||
unlet s:breakpoint_locations[bploc]
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func s:Run(args)
|
||||
@@ -873,15 +897,16 @@ endfunc
|
||||
|
||||
let s:BreakpointSigns = []
|
||||
|
||||
func s:CreateBreakpoint(nr)
|
||||
if index(s:BreakpointSigns, a:nr) == -1
|
||||
call add(s:BreakpointSigns, a:nr)
|
||||
exe "sign define debugBreakpoint" . a:nr . " text=" . substitute(a:nr, '\..*', '', '') . " texthl=debugBreakpoint"
|
||||
func s:CreateBreakpoint(id, subid)
|
||||
let nr = printf('%d.%d', a:id, a:subid)
|
||||
if index(s:BreakpointSigns, nr) == -1
|
||||
call add(s:BreakpointSigns, nr)
|
||||
exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=debugBreakpoint"
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func s:SplitMsg(s)
|
||||
return split(a:s, '{\%([a-z-]\+=[^,]\+,*\)\+}\zs')
|
||||
func! s:SplitMsg(s)
|
||||
return split(a:s, '{.\{-}}\zs')
|
||||
endfunction
|
||||
|
||||
" Handle setting a breakpoint
|
||||
@@ -900,48 +925,63 @@ func s:HandleNewBreakpoint(msg)
|
||||
if empty(nr)
|
||||
return
|
||||
endif
|
||||
call s:CreateBreakpoint(nr)
|
||||
|
||||
if has_key(s:breakpoints, nr)
|
||||
let entry = s:breakpoints[nr]
|
||||
" If "nr" is 123 it becomes "123.0" and subid is "0".
|
||||
" If "nr" is 123.4 it becomes "123.4.0" and subid is "4"; "0" is discarded.
|
||||
let [id, subid; _] = map(split(nr . '.0', '\.'), 'v:val + 0')
|
||||
call s:CreateBreakpoint(id, subid)
|
||||
|
||||
if has_key(s:breakpoints, id)
|
||||
let entries = s:breakpoints[id]
|
||||
else
|
||||
let entries = {}
|
||||
let s:breakpoints[id] = entries
|
||||
endif
|
||||
if has_key(entries, subid)
|
||||
let entry = entries[subid]
|
||||
else
|
||||
let entry = {}
|
||||
let s:breakpoints[nr] = entry
|
||||
let entries[subid] = entry
|
||||
endif
|
||||
|
||||
let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '')
|
||||
let entry['fname'] = fname
|
||||
let entry['lnum'] = lnum
|
||||
|
||||
let bploc = printf('%s:%d', fname, lnum)
|
||||
if !has_key(s:breakpoint_locations, bploc)
|
||||
let s:breakpoint_locations[bploc] = []
|
||||
endif
|
||||
let s:breakpoint_locations[bploc] += [id]
|
||||
|
||||
if bufloaded(fname)
|
||||
call s:PlaceSign(nr, entry)
|
||||
call s:PlaceSign(id, subid, entry)
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func s:PlaceSign(nr, entry)
|
||||
exe 'sign place ' . (s:break_id + s:Breakpoint2SignNumber(a:nr)) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
|
||||
func s:PlaceSign(id, subid, entry)
|
||||
let nr = printf('%d.%d', a:id, a:subid)
|
||||
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname']
|
||||
let a:entry['placed'] = 1
|
||||
endfunc
|
||||
|
||||
" Handle deleting a breakpoint
|
||||
" Will remove the sign that shows the breakpoint
|
||||
func s:HandleBreakpointDelete(msg)
|
||||
let key = substitute(a:msg, '.*id="\([0-9.]*\)\".*', '\1', '')
|
||||
if empty(key)
|
||||
let id = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
|
||||
if empty(id)
|
||||
return
|
||||
endif
|
||||
for [nr, entry] in items(s:breakpoints)
|
||||
if stridx(nr, key) != 0
|
||||
continue
|
||||
endif
|
||||
let entry = s:breakpoints[nr]
|
||||
if has_key(entry, 'placed')
|
||||
exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(nr))
|
||||
unlet entry['placed']
|
||||
endif
|
||||
unlet s:breakpoints[nr]
|
||||
endfor
|
||||
if has_key(s:breakpoints, id)
|
||||
for [subid, entry] in items(s:breakpoints[id])
|
||||
if has_key(entry, 'placed')
|
||||
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
|
||||
unlet entry['placed']
|
||||
endif
|
||||
endfor
|
||||
unlet s:breakpoints[id]
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Handle the debugged program starting to run.
|
||||
@@ -958,20 +998,24 @@ endfunc
|
||||
" Handle a BufRead autocommand event: place any signs.
|
||||
func s:BufRead()
|
||||
let fname = expand('<afile>:p')
|
||||
for [nr, entry] in items(s:breakpoints)
|
||||
if entry['fname'] == fname
|
||||
call s:PlaceSign(nr, entry)
|
||||
endif
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for [subid, entry] in items(entries)
|
||||
if entry['fname'] == fname
|
||||
call s:PlaceSign(id, subid, entry)
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" Handle a BufUnloaded autocommand event: unplace any signs.
|
||||
func s:BufUnloaded()
|
||||
let fname = expand('<afile>:p')
|
||||
for [nr, entry] in items(s:breakpoints)
|
||||
if entry['fname'] == fname
|
||||
let entry['placed'] = 0
|
||||
endif
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for [subid, entry] in items(entries)
|
||||
if entry['fname'] == fname
|
||||
let entry['placed'] = 0
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
" License: This file can be redistribued and/or modified under the same terms
|
||||
" as Vim itself.
|
||||
" Last Change: 2014-03-04
|
||||
" Last Change: 2018-12-06
|
||||
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
|
||||
" TODO: see particular FIXME's scattered through the file
|
||||
" make it really linewise?
|
||||
@@ -159,7 +159,7 @@ syn keyword apacheOption inherit
|
||||
syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase
|
||||
syn keyword apacheDeclaration LoadFile LoadModule
|
||||
syn keyword apacheDeclaration CheckSpelling CheckCaseOnly
|
||||
syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCryptoDevice SSLEngine SSLHonorCipherOrder SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLUserName SSLVerifyClient SSLVerifyDepth
|
||||
syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCompression SSLCryptoDevice SSLEngine SSLFIPS SSLHonorCipherOrder SSLInsecureRenegotiation SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCheckPeerCN SSLProxyCheckPeerExpire SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateChainFile SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRenegBufferSize SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLSessionTicketKeyFile SSLSessionTickets SSLStrictSNIVHostCheck SSLUserName SSLVerifyClient SSLVerifyDepth
|
||||
syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>"
|
||||
syn keyword apacheOption builtin sem
|
||||
syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):"
|
||||
|
||||
+21
-18
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainers: Anduin Withers <awithers@anduin.com>
|
||||
" Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2018-06-29
|
||||
" Last Change: 2018-11-26
|
||||
" Filenames: *.cs
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
@@ -11,12 +11,12 @@
|
||||
" REFERENCES:
|
||||
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cs_cpo_save = &cpo
|
||||
set cpo&vim
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
|
||||
syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
|
||||
@@ -34,7 +34,7 @@ syn keyword csException try catch finally throw when
|
||||
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
|
||||
syn keyword csAsync async await
|
||||
|
||||
syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this typeof unchecked unsafe using
|
||||
syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this unchecked unsafe using
|
||||
syn keyword csUnsupportedStatement add remove value
|
||||
syn keyword csUnspecifiedKeyword explicit implicit
|
||||
|
||||
@@ -44,10 +44,16 @@ syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interf
|
||||
syn match csContextualStatement /\<\(get\|set\)\(;\|[[:space:]\n]*{\)/me=s+3
|
||||
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
|
||||
|
||||
" Operators
|
||||
syn keyword csTypeOf typeof contained
|
||||
syn region csTypeOfStatement start="typeof(" end=")" contains=csType, csTypeOf
|
||||
|
||||
" Punctuation
|
||||
syn match csBraces "[{}\[\]]" display
|
||||
syn match csParens "[()]" display
|
||||
syn match csOpSymbols "[+\-><=]\{1,2}" display
|
||||
syn match csOpSymbols "[+\-=]\{1,2}" display
|
||||
syn match csOpSymbols "[><]\{2}" display
|
||||
syn match csOpSymbols "\s\zs[><]\ze\_s" display
|
||||
syn match csOpSymbols "[!><+\-*/]=" display
|
||||
syn match csOpSymbols "[!*/^]" display
|
||||
syn match csOpSymbols "=>" display
|
||||
@@ -144,17 +150,18 @@ syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStateme
|
||||
|
||||
" The default highlighting.
|
||||
hi def link csType Type
|
||||
hi def link csNewType Type
|
||||
hi def link csClassType Type
|
||||
hi def link csIsType Type
|
||||
hi def link csStorage StorageClass
|
||||
hi def link csClass StorageClass
|
||||
hi def link csStorage Structure
|
||||
hi def link csClass Structure
|
||||
hi def link csRepeat Repeat
|
||||
hi def link csConditional Conditional
|
||||
hi def link csLabel Label
|
||||
hi def link csModifier StorageClass
|
||||
hi def link csConstant Constant
|
||||
hi def link csException Exception
|
||||
hi def link csTypeOf Operator
|
||||
hi def link csTypeOfStatement Typedef
|
||||
hi def link csUnspecifiedStatement Statement
|
||||
hi def link csUnsupportedStatement Statement
|
||||
hi def link csUnspecifiedKeyword Keyword
|
||||
@@ -164,16 +171,12 @@ hi def link csIsAs Keyword
|
||||
hi def link csAsync Keyword
|
||||
hi def link csContextualStatement Statement
|
||||
hi def link csOperatorError Error
|
||||
hi def link csInterfaceDeclaration Include
|
||||
|
||||
hi def link csTodo Todo
|
||||
hi def link csComment Comment
|
||||
|
||||
hi def link csEndColon Statement
|
||||
hi def link csOpSymbols Operator
|
||||
hi def link csLogicSymbols Boolean
|
||||
hi def link csBraces Function
|
||||
hi def link csParens Operator
|
||||
hi def link csLogicSymbols Operator
|
||||
|
||||
hi def link csSpecialError Error
|
||||
hi def link csSpecialCharError Error
|
||||
@@ -200,9 +203,9 @@ hi def link csXmlCommentLeader Comment
|
||||
hi def link csXmlComment Comment
|
||||
hi def link csXmlTag Statement
|
||||
|
||||
let b:current_syntax = "cs"
|
||||
let b:current_syntax = 'cs'
|
||||
|
||||
let &cpo = s:cs_cpo_save
|
||||
unlet s:cs_cpo_save
|
||||
let &cpoptions = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: vts=16,28
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: TASM: turbo assembler by Borland
|
||||
" Maintaner: FooLman of United Force <foolman@bigfoot.com>
|
||||
" Last Change: 2012 Feb 03 by Thilo Six
|
||||
" Last Change: 2012 Feb 03 by Thilo Six, and 2018 Nov 27.
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -109,7 +109,7 @@ hi def link tasmComment Comment
|
||||
hi def link tasmLabel Label
|
||||
|
||||
|
||||
let b:curret_syntax = "tasm"
|
||||
let b:current_syntax = "tasm"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -652,7 +652,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi
|
||||
la dosiero estus precize same kiel kopio de la instruilo kiam vi
|
||||
konservis øin.
|
||||
|
||||
5. Nun forviþu la dosieron tajpante (MS-DOS): :!del TESTO
|
||||
5. Nun forviþu la dosieron tajpante (WINDOWS): :!del TESTO
|
||||
aý (UNIKSO): :!rm TESTO
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
|
||||
1. :!komando plenumas eksteran komandon.
|
||||
|
||||
Iuj utilaj ekzemploj estas:
|
||||
(MS-DOS) (UNIKSO)
|
||||
(WINDOWS) (UNIKSO)
|
||||
:!dir :!ls - listigas dosierujon
|
||||
:!del DOSIERNOMO :!rm DOSIERNOMO - forviþas la dosieron DOSIERNOMO
|
||||
|
||||
@@ -914,7 +914,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser
|
||||
|
||||
1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo:
|
||||
:e ~/.vimrc por Unikso
|
||||
:e $VIM/_vimrc por MS-Vindozo
|
||||
:e $VIM/_vimrc por Windows
|
||||
|
||||
2. Nun legu la enhavon de la ekzempla "vimrc"
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
@@ -941,7 +941,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser
|
||||
|
||||
4. Premu CTRL-D kaj Vim montros liston de komandoj, kiuj komencas per "e".
|
||||
|
||||
5. Premu <TAB> kaj Vim kompletigos la nomon de la komando al ":edit".
|
||||
5. Premu d<TAB> kaj Vim kompletigos la nomon de la komando al ":edit".
|
||||
|
||||
6. Nun aldonu spaceton kaj la komencon de ekzistanta nomo: :edit DOSI
|
||||
|
||||
@@ -986,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
|
||||
Esperantigita fare de Dominique Pellé, 2008-04-01
|
||||
Retpoþto: dominique.pelle@gmail.com
|
||||
Lasta þanøo: 2016-07-02
|
||||
Lasta þanøo: 2018-12-02
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -652,7 +652,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO,
|
||||
la dosiero estus precize same kiel kopio de la instruilo kiam vi
|
||||
konservis ĝin.
|
||||
|
||||
5. Nun forviŝu la dosieron tajpante (MS-DOS): :!del TESTO
|
||||
5. Nun forviŝu la dosieron tajpante (WINDOWS): :!del TESTO
|
||||
aŭ (UNIKSO): :!rm TESTO
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
|
||||
1. :!komando plenumas eksteran komandon.
|
||||
|
||||
Iuj utilaj ekzemploj estas:
|
||||
(MS-DOS) (UNIKSO)
|
||||
(WINDOWS) (UNIKSO)
|
||||
:!dir :!ls - listigas dosierujon
|
||||
:!del DOSIERNOMO :!rm DOSIERNOMO - forviŝas la dosieron DOSIERNOMO
|
||||
|
||||
@@ -914,7 +914,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c
|
||||
|
||||
1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo:
|
||||
:e ~/.vimrc por Unikso
|
||||
:e $VIM/_vimrc por MS-Vindozo
|
||||
:e $VIM/_vimrc por Windows
|
||||
|
||||
2. Nun legu la enhavon de la ekzempla "vimrc"
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
@@ -941,7 +941,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c
|
||||
|
||||
4. Premu CTRL-D kaj Vim montros liston de komandoj, kiuj komencas per "e".
|
||||
|
||||
5. Premu <TAB> kaj Vim kompletigos la nomon de la komando al ":edit".
|
||||
5. Premu d<TAB> kaj Vim kompletigos la nomon de la komando al ":edit".
|
||||
|
||||
6. Nun aldonu spaceton kaj la komencon de ekzistanta nomo: :edit DOSI
|
||||
|
||||
@@ -986,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
|
||||
Esperantigita fare de Dominique Pellé, 2008-04-01
|
||||
Retpoŝto: dominique.pelle@gmail.com
|
||||
Lasta ŝanĝo: 2016-07-02
|
||||
Lasta ŝanĝo: 2018-12-02
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -685,8 +685,8 @@ NOTE : Si vous quittez Vim et le red
|
||||
celui-ci sera une copie exacte de ce cours au moment où vous l'avez
|
||||
enregistré.
|
||||
|
||||
5. Maintenant, effacez le fichier en tapant (MS-DOS) : :!del TEST
|
||||
ou (Unix) : :!rm TEST
|
||||
5. Maintenant, effacez le fichier en tapant (Windows) : :!del TEST
|
||||
ou (Unix) : :!rm TEST
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -731,7 +731,7 @@ NOTE : Apr
|
||||
où TEST est le nom de votre fichier.
|
||||
Le fichier que vous récupérez est placé au-dessous de la ligne du curseur.
|
||||
|
||||
4. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez
|
||||
3. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez
|
||||
qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle
|
||||
contenue dans le fichier.
|
||||
|
||||
@@ -747,12 +747,12 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple,
|
||||
1. :!commande exécute une commande externe.
|
||||
|
||||
Quelques exemples pratiques :
|
||||
(MS-DOS) (Unix)
|
||||
(Windows) (Unix)
|
||||
:!dir :!ls affiche le contenu du répertoire courant.
|
||||
:!del FICHIER :!rm FICHIER efface FICHIER.
|
||||
|
||||
2. :w FICHIER enregistre le fichier Vim courant sur le disque avec pour
|
||||
nom FICHIER.
|
||||
nom FICHIER.
|
||||
|
||||
3. v déplacement :w FICHIER sauvegarde les lignes de la sélection Visuelle
|
||||
dans le fichier FICHIER.
|
||||
@@ -950,7 +950,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
|
||||
1. Commencez à éditer le fichier "vimrc". Ceci dépend de votre système :
|
||||
:edit ~/.vimrc pour Unix
|
||||
:edit $VIM/_vimrc pour MS-Windows
|
||||
:edit $VIM/_vimrc pour Windows
|
||||
|
||||
2. Lisez maintenant le fichier d'exemple "vimrc" :
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
@@ -978,7 +978,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
4. Appuyez CTRL-D et Vim affichera une liste de commandes qui commencent
|
||||
par "e".
|
||||
|
||||
5. Appuyez <TAB> et Vim complétera le nom de la commande : ":edit"
|
||||
5. Appuyez d<TAB> et Vim complétera le nom de la commande : ":edit"
|
||||
|
||||
6. Ajoutez maintenant un espace et le début d'un fichier existant :
|
||||
:edit FIC
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le compl
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2017 Jun 30
|
||||
Last Change : 2018 Dec 2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -685,8 +685,8 @@ NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST,
|
||||
celui-ci sera une copie exacte de ce cours au moment où vous l'avez
|
||||
enregistré.
|
||||
|
||||
5. Maintenant, effacez le fichier en tapant (MS-DOS) : :!del TEST
|
||||
ou (Unix) : :!rm TEST
|
||||
5. Maintenant, effacez le fichier en tapant (Windows) : :!del TEST
|
||||
ou (Unix) : :!rm TEST
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -731,7 +731,7 @@ NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3.
|
||||
où TEST est le nom de votre fichier.
|
||||
Le fichier que vous récupérez est placé au-dessous de la ligne du curseur.
|
||||
|
||||
4. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez
|
||||
3. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez
|
||||
qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle
|
||||
contenue dans le fichier.
|
||||
|
||||
@@ -747,12 +747,12 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple,
|
||||
1. :!commande exécute une commande externe.
|
||||
|
||||
Quelques exemples pratiques :
|
||||
(MS-DOS) (Unix)
|
||||
(Windows) (Unix)
|
||||
:!dir :!ls affiche le contenu du répertoire courant.
|
||||
:!del FICHIER :!rm FICHIER efface FICHIER.
|
||||
|
||||
2. :w FICHIER enregistre le fichier Vim courant sur le disque avec pour
|
||||
nom FICHIER.
|
||||
nom FICHIER.
|
||||
|
||||
3. v déplacement :w FICHIER sauvegarde les lignes de la sélection Visuelle
|
||||
dans le fichier FICHIER.
|
||||
@@ -950,7 +950,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
|
||||
1. Commencez à éditer le fichier "vimrc". Ceci dépend de votre système :
|
||||
:edit ~/.vimrc pour Unix
|
||||
:edit $VIM/_vimrc pour MS-Windows
|
||||
:edit $VIM/_vimrc pour Windows
|
||||
|
||||
2. Lisez maintenant le fichier d'exemple "vimrc" :
|
||||
:r $VIMRUNTIME/vimrc_example.vim
|
||||
@@ -978,7 +978,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
4. Appuyez CTRL-D et Vim affichera une liste de commandes qui commencent
|
||||
par "e".
|
||||
|
||||
5. Appuyez <TAB> et Vim complétera le nom de la commande : ":edit"
|
||||
5. Appuyez d<TAB> et Vim complétera le nom de la commande : ":edit"
|
||||
|
||||
6. Ajoutez maintenant un espace et le début d'un fichier existant :
|
||||
:edit FIC
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2017 Jun 30
|
||||
Last Change : 2018 Dec 2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+44
-24
@@ -1,30 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment version="1050" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="MMPreferenceController">
|
||||
<connections>
|
||||
<outlet property="advancedPreferences" destination="620" id="632"/>
|
||||
<outlet property="autoInstallUpdateButton" destination="UYM-W0-Kgl" id="cX5-tk-9WJ"/>
|
||||
<outlet property="generalPreferences" destination="115" id="143"/>
|
||||
<outlet property="layoutPopUpButton" destination="427" id="596"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<userDefaultsController representsSharedInstance="YES" id="58" userLabel="Shared Defaults"/>
|
||||
<customView id="115" userLabel="General">
|
||||
<rect key="frame" x="0.0" y="0.0" width="483" height="290"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="483" height="314"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<popUpButton verticalHuggingPriority="750" id="957">
|
||||
<rect key="frame" x="206" y="16" width="197" height="26"/>
|
||||
<rect key="frame" x="206" y="19" width="197" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<popUpButtonCell key="cell" type="push" title="Keep MacVim Running" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" selectedItem="960" id="979">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" title="OtherViews" id="959">
|
||||
<items>
|
||||
<menuItem title="Keep MacVim Running" state="on" id="960"/>
|
||||
@@ -38,8 +40,8 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" id="126">
|
||||
<rect key="frame" x="17" y="22" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="17" y="25" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="After last window closes:" id="977">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -47,11 +49,11 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" id="427">
|
||||
<rect key="frame" x="218" y="109" width="229" height="26"/>
|
||||
<rect key="frame" x="218" y="112" width="229" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<popUpButtonCell key="cell" type="push" title="and set the arglist" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" selectedItem="436" id="978">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" title="OtherViews" id="429">
|
||||
<items>
|
||||
<menuItem title="with a tab for each file" tag="3" id="430"/>
|
||||
@@ -74,8 +76,8 @@
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" id="124">
|
||||
<rect key="frame" x="17" y="187" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="17" y="209" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="When MacVim launches:" id="976">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -83,19 +85,21 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button id="122">
|
||||
<rect key="frame" x="207" y="186" width="258" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="207" y="208" width="258" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<string key="toolTip">Checks for updates and presents a dialog box showing the release notes and prompt for whether you want to install the new version.</string>
|
||||
<buttonCell key="cell" type="check" title="Check for updates" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="975">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="checkForUpdatesChanged:" target="-2" id="YjS-ig-M1j"/>
|
||||
<binding destination="58" name="value" keyPath="values.SUCheckAtStartup" id="169"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" id="121">
|
||||
<rect key="frame" x="209" y="47" width="243" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="209" y="50" width="243" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" id="974">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<string key="title">This applies to files opened from the Finder (e.g. by double-clicking on a file or by dragging a file onto the MacVim dock icon) or from external programs such as Xcode. </string>
|
||||
@@ -104,7 +108,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" id="120">
|
||||
<rect key="frame" x="209" y="141" width="243" height="38"/>
|
||||
<rect key="frame" x="209" y="144" width="243" height="38"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="cellSize" width="243" height="18"/>
|
||||
@@ -131,8 +135,8 @@
|
||||
</connections>
|
||||
</matrix>
|
||||
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" autosizesCells="NO" id="119">
|
||||
<rect key="frame" x="209" y="212" width="243" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="209" y="234" width="243" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="cellSize" width="243" height="18"/>
|
||||
<size key="intercellSpacing" width="4" height="2"/>
|
||||
@@ -161,8 +165,8 @@
|
||||
</connections>
|
||||
</matrix>
|
||||
<textField verticalHuggingPriority="750" id="117">
|
||||
<rect key="frame" x="17" y="253" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="17" y="275" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Open untitled window:" id="973">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -170,15 +174,31 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" id="116">
|
||||
<rect key="frame" x="17" y="162" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<rect key="frame" x="17" y="165" width="187" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Open files from applications:" id="972">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button id="UYM-W0-Kgl" userLabel="Auto-install updates">
|
||||
<rect key="frame" x="221" y="188" width="244" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
|
||||
<string key="toolTip">MacVim will automatically download and install updates without prompting. The updated version will be used the next time MacVim starts.</string>
|
||||
<buttonCell key="cell" type="check" title="Automatically install updates" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="GfP-vg-mec">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<connections>
|
||||
<binding destination="58" name="enabled" keyPath="values.SUCheckAtStartup" id="5oY-Gf-XJN"/>
|
||||
</connections>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="58" name="value" keyPath="values.SUAutomaticallyUpdate" id="kyZ-ah-zKf"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<point key="canvasLocation" x="137.5" y="382"/>
|
||||
</customView>
|
||||
<customView id="620" userLabel="Advanced">
|
||||
<rect key="frame" x="0.0" y="0.0" width="483" height="318"/>
|
||||
|
||||
Binary file not shown.
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>152</string>
|
||||
<string>153</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -1187,7 +1187,7 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
{
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
[data appendBytes:&fuoptions length:sizeof(int)];
|
||||
bg = MM_COLOR(bg);
|
||||
bg = MM_COLOR_WITH_TRANSP(bg,p_transp);
|
||||
[data appendBytes:&bg length:sizeof(int)];
|
||||
[self queueMessage:EnterFullScreenMsgID data:data];
|
||||
}
|
||||
|
||||
@@ -137,8 +137,13 @@ defaultAdvanceForFont(NSFont *font)
|
||||
boolForKey:MMBufferedDrawingKey];
|
||||
cgBufferDrawNeedsUpdateContext = NO;
|
||||
|
||||
cgLayerEnabled = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMUseCGLayerAlwaysKey];
|
||||
cgLayerEnabled = NO;
|
||||
if (!cgBufferDrawEnabled) {
|
||||
// Buffered draw supercedes the CGLayer renderer, which is deprecated
|
||||
// and doesn't actually work in 10.14+.
|
||||
cgLayerEnabled = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMUseCGLayerAlwaysKey];
|
||||
}
|
||||
cgLayerLock = [NSLock new];
|
||||
|
||||
// NOTE! It does not matter which font is set here, Vim will set its
|
||||
@@ -452,7 +457,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
|
||||
- (void)setFrameSize:(NSSize)newSize {
|
||||
if (!NSEqualSizes(newSize, self.bounds.size)) {
|
||||
if (!drawPending && !cgBufferDrawEnabled) {
|
||||
if (!drawPending && !cgBufferDrawEnabled && drawData.count == 0) {
|
||||
// When resizing a window, it will invalidate the buffer and cause
|
||||
// MacVim to draw black until we get the draw commands from Vim and
|
||||
// we draw them out in drawRect. Use beginGrouping to stop the
|
||||
@@ -795,7 +800,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled
|
||||
{
|
||||
if (cgContext)
|
||||
if (cgContext || cgBufferDrawEnabled)
|
||||
return;
|
||||
|
||||
cgLayerEnabled = enabled;
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
|
||||
// General pane
|
||||
IBOutlet NSPopUpButton *layoutPopUpButton;
|
||||
IBOutlet NSButton *autoInstallUpdateButton;
|
||||
}
|
||||
|
||||
// General pane
|
||||
- (IBAction)openInCurrentWindowSelectionChanged:(id)sender;
|
||||
- (IBAction)checkForUpdatesChanged:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -86,8 +86,20 @@ static void loadSymbols()
|
||||
BOOL openInCurrentWindowSelected = ([[sender selectedCell] tag] != 0);
|
||||
BOOL useWindowsLayout =
|
||||
([[layoutPopUpButton selectedItem] tag] == MMLayoutWindows);
|
||||
if (openInCurrentWindowSelected && useWindowsLayout)
|
||||
[layoutPopUpButton selectItemWithTag:MMLayoutTabs];
|
||||
if (openInCurrentWindowSelected && useWindowsLayout) {
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:MMLayoutTabs forKey:MMOpenLayoutKey];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)checkForUpdatesChanged:(id)sender
|
||||
{
|
||||
// Sparkle's auto-install update preference trumps "check for update", so
|
||||
// need to make sure to unset that if the user unchecks "check for update".
|
||||
NSButton *button = (NSButton *)sender;
|
||||
BOOL checkForUpdates = ([button state] != 0);
|
||||
if (!checkForUpdates) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"SUAutomaticallyUpdate"];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+10
-12
@@ -497,14 +497,12 @@ enum {
|
||||
|
||||
CALayer *backedLayer = [self layer];
|
||||
if (backedLayer) {
|
||||
// This would only trigger in 10.14 where all views are layer-backed.
|
||||
//
|
||||
// Note: This doesn't do much now. Should fix this class to use
|
||||
// updateLayer: instead of drawRect: at a later time, which would draw
|
||||
// the background color automatically. When we do that we can remove the
|
||||
// hack at drawKnobSlotInRect: since it would overlay properly without
|
||||
// needing to manually draw the background color itself.
|
||||
[backedLayer setBackgroundColor:[back CGColor]];
|
||||
// This only happens in 10.14+, where everything is layer-backed by
|
||||
// default. Since textView draws itself as a separate layer, we don't
|
||||
// want this layer to draw anything. This is especially important with
|
||||
// 'transparency' where there's alpha blending and we don't want this
|
||||
// layer to be in the way and double-blending things.
|
||||
[backedLayer setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
||||
}
|
||||
|
||||
for (NSUInteger i = 0, count = [scrollbars count]; i < count; ++i) {
|
||||
@@ -1005,10 +1003,10 @@ enum {
|
||||
// show through rendering artifacts (e.g. if guioption 'k' is on, and you
|
||||
// turn off the bar bar, the artiacts will show through in the overlay).
|
||||
//
|
||||
// Note: This should ideally be done on MMVimView itself by setting a background
|
||||
// color. This would be fixed at a later time by telling the view to just
|
||||
// use the background color form the backed CALayer (mandated since Mojave
|
||||
// 10.14).
|
||||
// Note: Another way to fix this is to make sure to draw the underlying
|
||||
// MMVimView or the window with the proper color so the scrollbar would just
|
||||
// draw on top, but this doesn't work properly right now, and it's difficult
|
||||
// to get that to work with the 'transparency' setting as well.
|
||||
MMVimView *vimView = [self target];
|
||||
NSColor *defaultBackgroundColor = [[vimView textView] defaultBackgroundColor];
|
||||
[defaultBackgroundColor setFill];
|
||||
|
||||
@@ -348,6 +348,7 @@
|
||||
// GUIEnter auto command could cause this).
|
||||
[fullScreenWindow enterFullScreen];
|
||||
fullScreenEnabled = YES;
|
||||
shouldResizeVimView = YES;
|
||||
} else if (delayEnterFullScreen) {
|
||||
// Set alpha to zero so that the decorated window doesn't pop up
|
||||
// before we enter full-screen.
|
||||
@@ -543,7 +544,39 @@
|
||||
[decoratedWindow setOpaque:isOpaque];
|
||||
if (fullScreenWindow)
|
||||
[fullScreenWindow setOpaque:isOpaque];
|
||||
[decoratedWindow setBackgroundColor:back];
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||
if (@available(macos 10.14, *)) {
|
||||
// We usually don't really need to change the background color of the
|
||||
// window, but in 10.14+ we switched to using layer-backed drawing.
|
||||
// That's fine except when we set 'transparency' to non-zero. The alpha
|
||||
// is set on the text view, but it won't work if drawn on top of a solid
|
||||
// window, so we need to set a transparency color here to make the
|
||||
// transparency show through.
|
||||
if ([back alphaComponent] == 1) {
|
||||
// Here, any solid color would do, but setting it with "back" has an
|
||||
// interesting effect where the title bar gets subtly tinted by it
|
||||
// as well, so do that. (Note that this won't play well in <=10.12
|
||||
// since we are using the deprecated
|
||||
// NSWindowStyleMaskTexturedBackground which makes the titlebars
|
||||
// transparent in those. Consider not using textured background.)
|
||||
[decoratedWindow setBackgroundColor:back];
|
||||
if (fullScreenWindow) {
|
||||
[fullScreenWindow setBackgroundColor:back];
|
||||
}
|
||||
} else {
|
||||
// HACK! We really want a transparent background color to avoid
|
||||
// double blending the transparency, but setting alpha=0 leads to
|
||||
// the window border disappearing and also drag-to-resize becomes a
|
||||
// lot slower. So hack around it by making it virtually transparent.
|
||||
NSColor *clearColor = [back colorWithAlphaComponent:0.001];
|
||||
[decoratedWindow setBackgroundColor:clearColor];
|
||||
if (fullScreenWindow) {
|
||||
[fullScreenWindow setBackgroundColor:clearColor];
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[vimView setDefaultColorsBackground:back foreground:fore];
|
||||
}
|
||||
@@ -758,8 +791,16 @@
|
||||
// times during startup.
|
||||
[fullScreenWindow release];
|
||||
|
||||
NSColor *fullscreenBg = back;
|
||||
|
||||
// See setDefaultColorsBackground: for why set a transparent
|
||||
// background color, and why 0.001 instead of 0.
|
||||
if ([fullscreenBg alphaComponent] != 1) {
|
||||
fullscreenBg = [fullscreenBg colorWithAlphaComponent:0.001];
|
||||
}
|
||||
|
||||
fullScreenWindow = [[MMFullScreenWindow alloc]
|
||||
initWithWindow:decoratedWindow view:vimView backgroundColor:back];
|
||||
initWithWindow:decoratedWindow view:vimView backgroundColor:fullscreenBg];
|
||||
[fullScreenWindow setOptions:fuoptions];
|
||||
[fullScreenWindow setRepresentedFilename:
|
||||
[decoratedWindow representedFilename]];
|
||||
@@ -1544,7 +1585,7 @@
|
||||
BOOL windowTextured = ([decoratedWindow styleMask] &
|
||||
NSWindowStyleMaskTexturedBackground) != 0;
|
||||
BOOL hideSeparator = NO;
|
||||
|
||||
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_10) {
|
||||
// The tabline separator is mostly an old feature and not necessary
|
||||
// modern macOS versions.
|
||||
|
||||
@@ -381,6 +381,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame];
|
||||
NSImage *button = nil;
|
||||
|
||||
if ([cell isHighlighted]) button = closeButton;
|
||||
if ([cell closeButtonOver]) button = closeButtonOver;
|
||||
if ([cell closeButtonPressed]) button = closeButtonDown;
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ set langmenu=none
|
||||
" version. However, following code tries to find a Homebrew, MacPorts or
|
||||
" an installation from python.org:
|
||||
if exists("&pythondll") && exists("&pythonhome")
|
||||
if filereadable("/usr/local/Library/Frameworks/Python.framework/Versions/2.7/Python")
|
||||
if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
|
||||
" Homebrew python 2.7
|
||||
set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
|
||||
set pythonhome=/usr/local/Frameworks/Python.framework/Versions/2.7
|
||||
@@ -29,8 +29,8 @@ if exists("&pythondll") && exists("&pythonhome")
|
||||
set pythonhome=/opt/local/Library/Frameworks/Python.framework/Versions/2.7
|
||||
elseif filereadable("/Library/Frameworks/Python.framework/Versions/2.7/Python")
|
||||
" https://www.python.org/downloads/mac-osx/
|
||||
set pythonthreedll=/Library/Frameworks/Python.framework/Versions/2.7/Python
|
||||
set pythonthreehome=/Library/Frameworks/Python.framework/Versions/2.7
|
||||
set pythondll=/Library/Frameworks/Python.framework/Versions/2.7/Python
|
||||
set pythonhome=/Library/Frameworks/Python.framework/Versions/2.7
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
+4
-1
@@ -2173,6 +2173,7 @@ diffopt_changed(void)
|
||||
int diff_flags_new = 0;
|
||||
int diff_foldcolumn_new = 2;
|
||||
long diff_algorithm_new = 0;
|
||||
long diff_indent_heuristic = 0;
|
||||
tabpage_T *tp;
|
||||
|
||||
p = p_dip;
|
||||
@@ -2236,7 +2237,7 @@ diffopt_changed(void)
|
||||
else if (STRNCMP(p, "indent-heuristic", 16) == 0)
|
||||
{
|
||||
p += 16;
|
||||
diff_algorithm_new |= XDF_INDENT_HEURISTIC;
|
||||
diff_indent_heuristic = XDF_INDENT_HEURISTIC;
|
||||
}
|
||||
else if (STRNCMP(p, "internal", 8) == 0)
|
||||
{
|
||||
@@ -2276,6 +2277,8 @@ diffopt_changed(void)
|
||||
++p;
|
||||
}
|
||||
|
||||
diff_algorithm_new |= diff_indent_heuristic;
|
||||
|
||||
/* Can't have both "horizontal" and "vertical". */
|
||||
if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL))
|
||||
return FAIL;
|
||||
|
||||
+4
-1
@@ -7568,7 +7568,10 @@ set_var(
|
||||
return;
|
||||
}
|
||||
else if (v->di_tv.v_type != tv->v_type)
|
||||
internal_error("set_var()");
|
||||
{
|
||||
EMSG2(_("E963: setting %s to value with wrong type"), name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
clear_tv(&v->di_tv);
|
||||
|
||||
+15
-3
@@ -3262,6 +3262,8 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
int save_redir_execute = redir_execute;
|
||||
int save_redir_off = redir_off;
|
||||
garray_T save_ga;
|
||||
int save_msg_col = msg_col;
|
||||
int echo_output = FALSE;
|
||||
|
||||
rettv->vval.v_string = NULL;
|
||||
rettv->v_type = VAR_STRING;
|
||||
@@ -3288,6 +3290,8 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
if (s == NULL)
|
||||
return;
|
||||
if (*s == NUL)
|
||||
echo_output = TRUE;
|
||||
if (STRNCMP(s, "silent", 6) == 0)
|
||||
++msg_silent;
|
||||
if (STRCMP(s, "silent!") == 0)
|
||||
@@ -3304,6 +3308,8 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
ga_init2(&redir_execute_ga, (int)sizeof(char), 500);
|
||||
redir_execute = TRUE;
|
||||
redir_off = FALSE;
|
||||
if (!echo_output)
|
||||
msg_col = 0; // prevent leading spaces
|
||||
|
||||
if (cmd != NULL)
|
||||
do_cmdline_cmd(cmd);
|
||||
@@ -3336,9 +3342,15 @@ f_execute(typval_T *argvars, typval_T *rettv)
|
||||
redir_execute_ga = save_ga;
|
||||
redir_off = save_redir_off;
|
||||
|
||||
/* "silent reg" or "silent echo x" leaves msg_col somewhere in the
|
||||
* line. Put it back in the first column. */
|
||||
msg_col = 0;
|
||||
// "silent reg" or "silent echo x" leaves msg_col somewhere in the line.
|
||||
if (echo_output)
|
||||
// When not working silently: put it in column zero. A following
|
||||
// "echon" will overwrite the message, unavoidably.
|
||||
msg_col = 0;
|
||||
else
|
||||
// When working silently: Put it back where it was, since nothing
|
||||
// should have been written.
|
||||
msg_col = save_msg_col;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+6
-2
@@ -5885,9 +5885,13 @@ uc_add_command(
|
||||
|
||||
if (cmp == 0)
|
||||
{
|
||||
if (!force)
|
||||
// Command can be replaced with "command!" and when sourcing the
|
||||
// same script again, but only once.
|
||||
if (!force && (cmd->uc_script_ctx.sc_sid != current_sctx.sc_sid
|
||||
|| cmd->uc_script_ctx.sc_seq == current_sctx.sc_seq))
|
||||
{
|
||||
EMSG(_("E174: Command already exists: add ! to replace it"));
|
||||
EMSG2(_("E174: Command already exists: add ! to replace it: %s"),
|
||||
name);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -2784,7 +2784,19 @@ gui_redraw_block(
|
||||
else if (enc_utf8)
|
||||
{
|
||||
if (ScreenLines[off + col1] == 0)
|
||||
--col1;
|
||||
{
|
||||
if (col1 > 0)
|
||||
--col1;
|
||||
else
|
||||
{
|
||||
// FIXME: how can the first character ever be zero?
|
||||
// Make this IEMSGN when it no longer breaks Travis CI.
|
||||
vim_snprintf((char *)IObuff, IOSIZE,
|
||||
"INTERNAL ERROR: NUL in ScreenLines in row %ld",
|
||||
(long)gui.row);
|
||||
msg(IObuff);
|
||||
}
|
||||
}
|
||||
# ifdef FEAT_GUI_GTK
|
||||
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
|
||||
++col2;
|
||||
@@ -3883,10 +3895,14 @@ send_tabline_menu_event(int tabidx, int event)
|
||||
{
|
||||
char_u string[3];
|
||||
|
||||
/* Don't put events in the input queue now. */
|
||||
// Don't put events in the input queue now.
|
||||
if (hold_gui_events)
|
||||
return;
|
||||
|
||||
// Cannot close the last tabpage.
|
||||
if (event == TABLINE_MENU_CLOSE && first_tabpage->tp_next == NULL)
|
||||
return;
|
||||
|
||||
string[0] = CSI;
|
||||
string[1] = KS_TABMENU;
|
||||
string[2] = KE_FILLER;
|
||||
|
||||
+1
-3
@@ -3337,9 +3337,7 @@ create_tabline_menu(void)
|
||||
GtkWidget *menu;
|
||||
|
||||
menu = gtk_menu_new();
|
||||
if (first_tabpage->tp_next != NULL)
|
||||
add_tabline_menu_item(menu, (char_u *)_("Close tab"),
|
||||
TABLINE_MENU_CLOSE);
|
||||
add_tabline_menu_item(menu, (char_u *)_("Close tab"), TABLINE_MENU_CLOSE);
|
||||
add_tabline_menu_item(menu, (char_u *)_("New tab"), TABLINE_MENU_NEW);
|
||||
add_tabline_menu_item(menu, (char_u *)_("Open Tab..."), TABLINE_MENU_OPEN);
|
||||
|
||||
|
||||
+1
-2
@@ -6715,8 +6715,7 @@ initialise_tabline(void)
|
||||
|
||||
// create tabline popup menu required by vim docs (see :he tabline-menu)
|
||||
CreateNewMenu(kTabContextMenuId, 0, &contextMenu);
|
||||
if (first_tabpage->tp_next != NULL)
|
||||
AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close Tab"), 0,
|
||||
AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close Tab"), 0,
|
||||
TABLINE_MENU_CLOSE, NULL);
|
||||
AppendMenuItemTextWithCFString(contextMenu, CFSTR("New Tab"), 0,
|
||||
TABLINE_MENU_NEW, NULL);
|
||||
|
||||
+10
-13
@@ -514,21 +514,18 @@ gui_x11_create_widgets(void)
|
||||
XtVaSetValues(scroller, XmNwidth, 0, XmNresizable, False,
|
||||
XmNtraversalOn, False, NULL);
|
||||
|
||||
/* Create the tabline popup menu */
|
||||
// Create the tabline popup menu
|
||||
tabLine_menu = XmCreatePopupMenu(tabLine, "tabline popup", NULL, 0);
|
||||
|
||||
/* Add the buttons to the menu */
|
||||
if (first_tabpage->tp_next != NULL)
|
||||
{
|
||||
n = 0;
|
||||
XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++;
|
||||
xms = XmStringCreate((char *)"Close tab", STRING_TAG);
|
||||
XtSetArg(args[n], XmNlabelString, xms); n++;
|
||||
button = XmCreatePushButton(tabLine_menu, "Close", args, n);
|
||||
XtAddCallback(button, XmNactivateCallback,
|
||||
(XtCallbackProc)tabline_button_cb, NULL);
|
||||
XmStringFree(xms);
|
||||
}
|
||||
// Add the buttons to the tabline popup menu
|
||||
n = 0;
|
||||
XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++;
|
||||
xms = XmStringCreate((char *)"Close tab", STRING_TAG);
|
||||
XtSetArg(args[n], XmNlabelString, xms); n++;
|
||||
button = XmCreatePushButton(tabLine_menu, "Close", args, n);
|
||||
XtAddCallback(button, XmNactivateCallback,
|
||||
(XtCallbackProc)tabline_button_cb, NULL);
|
||||
XmStringFree(xms);
|
||||
|
||||
n = 0;
|
||||
XtSetArg(args[n], XmNuserData, TABLINE_MENU_NEW); n++;
|
||||
|
||||
+13
-2
@@ -2018,7 +2018,7 @@ get_last_leader_offset(char_u *line, char_u **flags)
|
||||
{
|
||||
if (i == 0 || !VIM_ISWHITE(line[i - 1]))
|
||||
continue;
|
||||
while (VIM_ISWHITE(string[0]))
|
||||
while (VIM_ISWHITE(*string))
|
||||
++string;
|
||||
}
|
||||
for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j)
|
||||
@@ -2032,8 +2032,19 @@ get_last_leader_offset(char_u *line, char_u **flags)
|
||||
*/
|
||||
if (vim_strchr(part_buf, COM_BLANK) != NULL
|
||||
&& !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
|
||||
{
|
||||
continue;
|
||||
|
||||
if (vim_strchr(part_buf, COM_MIDDLE) != NULL)
|
||||
{
|
||||
// For a middlepart comment, only consider it to match if
|
||||
// everything before the current position in the line is
|
||||
// whitespace. Otherwise we would think we are inside a
|
||||
// comment if the middle part appears somewhere in the middle
|
||||
// of the line. E.g. for C the "*" appears often.
|
||||
for (j = 0; VIM_ISWHITE(line[j]) && j <= i; j++)
|
||||
;
|
||||
if (j < i)
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
# define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m,%f|%l| %m"
|
||||
#else
|
||||
# if defined(WIN3264)
|
||||
# define DFLT_EFM "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m"
|
||||
# define DFLT_EFM "%f(%l) \\=: %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) \\=: %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m"
|
||||
# else
|
||||
# if defined(__QNX__)
|
||||
# define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m,%f|%l| %m"
|
||||
|
||||
+7
-11
@@ -5842,7 +5842,6 @@ mch_detect_ended_job(job_T *job_list)
|
||||
mch_signal_job(job_T *job, char_u *how)
|
||||
{
|
||||
int sig = -1;
|
||||
pid_t job_pid;
|
||||
|
||||
if (*how == NUL || STRCMP(how, "term") == 0)
|
||||
sig = SIGTERM;
|
||||
@@ -5863,16 +5862,13 @@ mch_signal_job(job_T *job, char_u *how)
|
||||
else
|
||||
return FAIL;
|
||||
|
||||
/* TODO: have an option to only kill the process, not the group? */
|
||||
job_pid = job->jv_pid;
|
||||
#ifdef HAVE_GETPGID
|
||||
if (job_pid == getpgid(job_pid))
|
||||
job_pid = -job_pid;
|
||||
#endif
|
||||
|
||||
/* Never kill ourselves! */
|
||||
if (job_pid != 0)
|
||||
kill(job_pid, sig);
|
||||
// Never kill ourselves!
|
||||
if (job->jv_pid != 0)
|
||||
{
|
||||
// TODO: have an option to only kill the process, not the group?
|
||||
kill(-job->jv_pid, sig);
|
||||
kill(job->jv_pid, sig);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
+9
-2
@@ -4704,6 +4704,12 @@ check_termcode(
|
||||
int need_flush = FALSE;
|
||||
# ifdef FEAT_MOUSE_SGR
|
||||
int is_iterm2 = FALSE;
|
||||
int is_mintty = FALSE;
|
||||
|
||||
// mintty 2.9.5 sends 77;20905;0c.
|
||||
// (77 is ASCII 'M' for mintty.)
|
||||
if (STRNCMP(tp + extra - 3, "77;", 3) == 0)
|
||||
is_mintty = TRUE;
|
||||
# endif
|
||||
|
||||
/* if xterm version >= 141 try to get termcap codes */
|
||||
@@ -4757,8 +4763,9 @@ check_termcode(
|
||||
{
|
||||
# ifdef FEAT_MOUSE_SGR
|
||||
/* Xterm version 277 supports SGR. Also support
|
||||
* Terminal.app and iTerm2. */
|
||||
if (version >= 277 || is_iterm2 || is_mac_terminal)
|
||||
* Terminal.app, iTerm2 and mintty. */
|
||||
if (version >= 277 || is_iterm2 || is_mac_terminal
|
||||
|| is_mintty)
|
||||
set_option_value((char_u *)"ttym", 0L,
|
||||
(char_u *)"sgr", 0);
|
||||
else
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29
|
||||
| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
|
||||
|X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p
|
||||
|:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|p|a|t|i|e|n|c|e| @42
|
||||
|:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|h|i|s|t|o|g|r|a|m| @41
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
|
||||
| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
|
||||
|X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1
|
||||
|:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|d|e|n|t|-|h|e|u|r|i|s|t|i|c| @44
|
||||
|:+0&&| @73
|
||||
|
||||
@@ -103,6 +103,8 @@ func VerifyScreenDump(buf, filename, options, ...)
|
||||
|
||||
let i = 0
|
||||
while 1
|
||||
" leave some time for updating the original window
|
||||
sleep 10m
|
||||
call delete(testfile)
|
||||
call term_dumpwrite(a:buf, testfile, a:options)
|
||||
if readfile(reference) == readfile(testfile)
|
||||
@@ -113,12 +115,11 @@ func VerifyScreenDump(buf, filename, options, ...)
|
||||
" Leave the test file around for inspection.
|
||||
let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
|
||||
if a:0 == 1
|
||||
let msg = a:1 . ': ' . msg
|
||||
let msg = a:1 . ': ' . msg
|
||||
endif
|
||||
call assert_report(msg)
|
||||
return 1
|
||||
endif
|
||||
sleep 10m
|
||||
let i += 1
|
||||
endwhile
|
||||
return 0
|
||||
|
||||
@@ -813,8 +813,16 @@ func Test_diff_screen()
|
||||
call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_diff_10', {})
|
||||
|
||||
call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_diff_11', {})
|
||||
" Leave trailing : at commandline!
|
||||
call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one')
|
||||
" shouldn't matter, if indent-algorithm comes before or after the algorithm
|
||||
call term_sendkeys(buf, ":set diffopt&\<cr>")
|
||||
call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_diff_11', {}, 'two')
|
||||
call term_sendkeys(buf, ":set diffopt&\<cr>")
|
||||
call term_sendkeys(buf, ":set diffopt+=algorithm:patience,indent-heuristic\<cr>:\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_diff_11', {}, 'three')
|
||||
|
||||
" Test 12: diff the same file
|
||||
call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
||||
|
||||
@@ -53,3 +53,13 @@ func Test_line_continuation()
|
||||
"\ and some more
|
||||
call assert_equal([5, 6], array)
|
||||
endfunc
|
||||
|
||||
func Test_E963()
|
||||
" These commands used to cause an internal error prior to vim 8.1.0563
|
||||
let v_e = v:errors
|
||||
let v_o = v:oldfiles
|
||||
call assert_fails("let v:errors=''", 'E963:')
|
||||
call assert_equal(v_e, v:errors)
|
||||
call assert_fails("let v:oldfiles=''", 'E963:')
|
||||
call assert_equal(v_o, v:oldfiles)
|
||||
endfunc
|
||||
|
||||
@@ -49,3 +49,32 @@ func Test_execute_list()
|
||||
call assert_equal("", execute([]))
|
||||
call assert_equal("", execute(test_null_list()))
|
||||
endfunc
|
||||
|
||||
func Test_execute_does_not_change_col()
|
||||
echo ''
|
||||
echon 'abcd'
|
||||
let x = execute('silent echo 234343')
|
||||
echon 'xyz'
|
||||
let text = ''
|
||||
for col in range(1, 7)
|
||||
let text .= nr2char(screenchar(&lines, col))
|
||||
endfor
|
||||
call assert_equal('abcdxyz', text)
|
||||
endfunc
|
||||
|
||||
func Test_execute_not_silent()
|
||||
echo ''
|
||||
echon 'abcd'
|
||||
let x = execute('echon 234', '')
|
||||
echo 'xyz'
|
||||
let text1 = ''
|
||||
for col in range(1, 8)
|
||||
let text1 .= nr2char(screenchar(&lines - 1, col))
|
||||
endfor
|
||||
call assert_equal('abcd234 ', text1)
|
||||
let text2 = ''
|
||||
for col in range(1, 4)
|
||||
let text2 .= nr2char(screenchar(&lines, col))
|
||||
endfor
|
||||
call assert_equal('xyz ', text2)
|
||||
endfunc
|
||||
|
||||
@@ -507,6 +507,35 @@ func Test_fold_marker()
|
||||
enew!
|
||||
endfunc
|
||||
|
||||
" test create fold markers with C filetype
|
||||
func Test_fold_create_marker_in_C()
|
||||
enew!
|
||||
set fdm=marker fdl=9
|
||||
set filetype=c
|
||||
|
||||
let content = [
|
||||
\ '/*',
|
||||
\ ' * comment',
|
||||
\ ' * ',
|
||||
\ ' *',
|
||||
\ ' */',
|
||||
\ 'int f(int* p) {',
|
||||
\ ' *p = 3;',
|
||||
\ ' return 0;',
|
||||
\ '}'
|
||||
\]
|
||||
for c in range(len(content) - 1)
|
||||
bw!
|
||||
call append(0, content)
|
||||
call cursor(c + 1, 1)
|
||||
norm! zfG
|
||||
call assert_equal(content[c] . (c < 4 ? '{{{' : '/*{{{*/'), getline(c + 1))
|
||||
endfor
|
||||
|
||||
set fdm& fdl&
|
||||
enew!
|
||||
endfunc
|
||||
|
||||
" test folding with indent
|
||||
func Test_fold_indent()
|
||||
enew!
|
||||
@@ -695,3 +724,20 @@ func Test_folds_with_rnu()
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xtest_folds_with_rnu')
|
||||
endfunc
|
||||
|
||||
func Test_folds_marker_in_comment2()
|
||||
new
|
||||
call setline(1, ['Lorem ipsum dolor sit', 'Lorem ipsum dolor sit', 'Lorem ipsum dolor sit'])
|
||||
setl fen fdm=marker
|
||||
setl commentstring=<!--%s-->
|
||||
setl comments=s:<!--,m:\ \ \ \ ,e:-->
|
||||
norm! zf2j
|
||||
setl nofen
|
||||
:1y
|
||||
call assert_equal(['Lorem ipsum dolor sit<!--{{{-->'], getreg(0,1,1))
|
||||
:+2y
|
||||
call assert_equal(['Lorem ipsum dolor sit<!--}}}-->'], getreg(0,1,1))
|
||||
|
||||
set foldmethod&
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
@@ -90,6 +90,34 @@ func Test_Ambiguous()
|
||||
delcommand Dothat
|
||||
endfunc
|
||||
|
||||
func Test_redefine_on_reload()
|
||||
call writefile(['command ExistingCommand echo "yes"'], 'Xcommandexists')
|
||||
call assert_equal(0, exists(':ExistingCommand'))
|
||||
source Xcommandexists
|
||||
call assert_equal(2, exists(':ExistingCommand'))
|
||||
" Redefining a command when reloading a script is OK.
|
||||
source Xcommandexists
|
||||
call assert_equal(2, exists(':ExistingCommand'))
|
||||
|
||||
" But redefining in another script is not OK.
|
||||
call writefile(['command ExistingCommand echo "yes"'], 'Xcommandexists2')
|
||||
call assert_fails('source Xcommandexists2', 'E174:')
|
||||
call delete('Xcommandexists2')
|
||||
|
||||
" And defining twice in one script is not OK.
|
||||
delcommand ExistingCommand
|
||||
call assert_equal(0, exists(':ExistingCommand'))
|
||||
call writefile([
|
||||
\ 'command ExistingCommand echo "yes"',
|
||||
\ 'command ExistingCommand echo "no"',
|
||||
\ ], 'Xcommandexists')
|
||||
call assert_fails('source Xcommandexists', 'E174:')
|
||||
call assert_equal(2, exists(':ExistingCommand'))
|
||||
|
||||
call delete('Xcommandexists')
|
||||
delcommand ExistingCommand
|
||||
endfunc
|
||||
|
||||
func Test_CmdUndefined()
|
||||
call assert_fails('Doit', 'E492:')
|
||||
au CmdUndefined Doit :command Doit let g:didit = 'yes'
|
||||
|
||||
@@ -807,6 +807,40 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
577,
|
||||
/**/
|
||||
576,
|
||||
/**/
|
||||
575,
|
||||
/**/
|
||||
574,
|
||||
/**/
|
||||
573,
|
||||
/**/
|
||||
572,
|
||||
/**/
|
||||
571,
|
||||
/**/
|
||||
570,
|
||||
/**/
|
||||
569,
|
||||
/**/
|
||||
568,
|
||||
/**/
|
||||
567,
|
||||
/**/
|
||||
566,
|
||||
/**/
|
||||
565,
|
||||
/**/
|
||||
564,
|
||||
/**/
|
||||
563,
|
||||
/**/
|
||||
562,
|
||||
/**/
|
||||
561,
|
||||
/**/
|
||||
560,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user