mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96dc4e1390 | |||
| 8743ed43c8 | |||
| 1e00286144 | |||
| dc0ccaee68 | |||
| 9b45794818 | |||
| 936c48f8ca | |||
| 8ddef48d1e | |||
| 70d6f82178 | |||
| 226630a030 | |||
| d22cb61149 | |||
| ec68a99464 | |||
| 8610e74d73 | |||
| 84dbd494dc | |||
| d76626f3c9 | |||
| 6100d02aab | |||
| 6c585c1bfd | |||
| c036347336 | |||
| fa649b7684 | |||
| f701767b4f | |||
| 8839232993 | |||
| 60ea35dac6 | |||
| 0b2421e4c5 | |||
| 2ec618c9fe | |||
| 51e4114a83 | |||
| b3435b0a3a | |||
| b9c31e71f5 | |||
| 3712d186e5 | |||
| 1777785751 | |||
| 890680ca63 | |||
| a683bab097 | |||
| 0e77b7691e | |||
| 7ef3810d28 | |||
| 1eceadaf48 | |||
| 677d665ca0 | |||
| c79d6aa01d | |||
| 3e496b0ea3 | |||
| 9af4184276 | |||
| 20eeb6129d | |||
| 947000d6e4 | |||
| 680e015bfe | |||
| 3f1c15b24a | |||
| 418b98e5f2 | |||
| 0d6868f0e0 | |||
| 50ba526fbf | |||
| 9e02cfa226 | |||
| 99ec74897a | |||
| bbe917d9d4 | |||
| 31b273e7c0 | |||
| 07026777ea | |||
| ebdd90ac28 | |||
| ff43fd2343 | |||
| 418cb178ab | |||
| d07969093a | |||
| e7f312f4ac | |||
| 3c4ebeba17 | |||
| fd2a19c144 | |||
| 5582ef1438 | |||
| 9c95c4f7ba | |||
| 0975715099 |
@@ -8,3 +8,5 @@ maintainer of the port.
|
||||
|
||||
- Vim README https://github.com/macvim-dev/macvim/blob/master/README_vim.md
|
||||
|
||||
- Travis CI <a href="https://travis-ci.org/macvim-dev/macvim"><img src="https://travis-ci.org/macvim-dev/macvim.svg?branch=master" alt="Build Status"></a><a href="https://travis-ci.org/macvim-dev/homebrew-macvim"><img src="https://travis-ci.org/macvim-dev/homebrew-macvim.svg?branch=master" alt="Build Status"></a>
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
`README.md` for version 7.4 of Vim: Vi IMproved.
|
||||
`README.md` for version 8.0 of Vim: Vi IMproved.
|
||||
[](https://travis-ci.org/vim/vim)
|
||||
[](https://coveralls.io/github/vim/vim?branch=master)
|
||||
[](https://ci.appveyor.com/project/chrisbra/vim)
|
||||
|
||||
@@ -41,7 +41,7 @@ These are the normal steps to install Vim from the .zip archives:
|
||||
located. Check the $VIM setting to see where it points to:
|
||||
set VIM
|
||||
For example, if you have
|
||||
C:\vim\vim74
|
||||
C:\vim\vim80
|
||||
do
|
||||
cd C:\
|
||||
Binary and runtime Vim archives are normally unpacked in the same location,
|
||||
|
||||
@@ -16,9 +16,6 @@ matrix:
|
||||
|
||||
before_build:
|
||||
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release'
|
||||
# Work around for Python 2.7.11's bug
|
||||
- reg copy HKLM\SOFTWARE\Python\PythonCore\2.7 HKLM\SOFTWARE\Python\PythonCore\2.7-32 /s /reg:32
|
||||
- reg copy HKLM\SOFTWARE\Python\PythonCore\2.7 HKLM\SOFTWARE\Python\PythonCore\2.7-32 /s /reg:64
|
||||
|
||||
build_script:
|
||||
- src/appveyor.bat
|
||||
|
||||
@@ -236,7 +236,7 @@ fun! getscript#GetLatestVimScripts()
|
||||
" call Decho("..depscript<".depscript.">")
|
||||
|
||||
" found a "GetLatestVimScripts: # #" line in the script;
|
||||
" check if its already in the datafile by searching backwards from llp1,
|
||||
" check if it's already in the datafile by searching backwards from llp1,
|
||||
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
|
||||
" for the script-id with no wrapping allowed.
|
||||
let curline = line(".")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Nov 05
|
||||
" Last Change: 2016 Sep 28
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -63,6 +63,9 @@ fun gzip#read(cmd)
|
||||
" set 'modifiable'
|
||||
let ma_save = &ma
|
||||
setlocal ma
|
||||
" set 'write'
|
||||
let write_save = &write
|
||||
set write
|
||||
" Reset 'foldenable', otherwise line numbers get adjusted.
|
||||
if has("folding")
|
||||
let fen_save = &fen
|
||||
@@ -127,6 +130,7 @@ fun gzip#read(cmd)
|
||||
let &pm = pm_save
|
||||
let &cpo = cpo_save
|
||||
let &l:ma = ma_save
|
||||
let &write = write_save
|
||||
if has("folding")
|
||||
let &l:fen = fen_save
|
||||
endif
|
||||
|
||||
@@ -931,7 +931,7 @@ function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibite
|
||||
endfor
|
||||
|
||||
for modifier in a:modifiers
|
||||
" if the modifier is prohibited its a no match
|
||||
" if the modifier is prohibited it's a no match
|
||||
if index(a:prohibited_modifiers, modifier) != -1
|
||||
return 0
|
||||
endif
|
||||
|
||||
@@ -117,7 +117,7 @@ fun! tar#Browse(tarfile)
|
||||
if !filereadable(a:tarfile)
|
||||
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
|
||||
if a:tarfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
" if it's an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
||||
endif
|
||||
|
||||
@@ -347,7 +347,7 @@ fun! vimball#Vimball(really,...)
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
|
||||
" set up help if its a doc/*.txt file
|
||||
" set up help if it's a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
|
||||
+66
-10
@@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jul 02, 2013
|
||||
" Version: 27
|
||||
" Date: Sep 13, 2016
|
||||
" Version: 28
|
||||
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
|
||||
@@ -20,10 +20,10 @@
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v27"
|
||||
let g:loaded_zip= "v28"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of zip needs vim 7.2"
|
||||
echo "***warning*** this version of zip needs vim 7.2 or later"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
@@ -53,6 +53,9 @@ endif
|
||||
if !exists("g:zip_unzipcmd")
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
endif
|
||||
if !exists("g:zip_extractcmd")
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -62,14 +65,14 @@ endif
|
||||
" zip#Browse: {{{2
|
||||
fun! zip#Browse(zipfile)
|
||||
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
|
||||
" sanity check: insure that the zipfile has "PK" as its first two letters
|
||||
" sanity check: ensure that the zipfile has "PK" as its first two letters
|
||||
" (zipped files have a leading PK as a "magic cookie")
|
||||
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
|
||||
exe "noautocmd e ".fnameescape(a:zipfile)
|
||||
" call Dret("zip#Browse : not a zipfile<".a:zipfile.">")
|
||||
return
|
||||
" else " Decho
|
||||
" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - its a zip file")
|
||||
" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - it's a zip file")
|
||||
endif
|
||||
|
||||
let repkeep= &report
|
||||
@@ -92,7 +95,7 @@ fun! zip#Browse(zipfile)
|
||||
endif
|
||||
if !filereadable(a:zipfile)
|
||||
if a:zipfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
" if it's an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
@@ -136,8 +139,10 @@ fun! zip#Browse(zipfile)
|
||||
return
|
||||
endif
|
||||
|
||||
" Maps associated with zip plugin
|
||||
setlocal noma nomod ro
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
noremap <silent> <buffer> x :call zip#Extract()<cr>
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse")
|
||||
@@ -204,6 +209,15 @@ fun! zip#Read(fname,mode)
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
" sanity check
|
||||
if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','',''))
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Read) sorry, your system doesn't appear to have the ".g:zip_unzipcmd." program" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
|
||||
" the following code does much the same thing as
|
||||
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
|
||||
@@ -236,9 +250,9 @@ fun! zip#Write(fname)
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:zip_zipcmd)
|
||||
if !executable(substitute(g:zip_zipcmd,'\s\+.*$','',''))
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
@@ -344,6 +358,48 @@ fun! zip#Write(fname)
|
||||
" call Dret("zip#Write")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" zip#Extract: extract a file from a zip archive {{{2
|
||||
fun! zip#Extract()
|
||||
" call Dfunc("zip#Extract()")
|
||||
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
" sanity check
|
||||
if fname =~ '^"'
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Extract")
|
||||
return
|
||||
endif
|
||||
if fname =~ '/$'
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Extract) Please specify a file, not a directory" | echohl None
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Extract")
|
||||
return
|
||||
endif
|
||||
|
||||
" extract the file mentioned under the cursor
|
||||
" call Decho("system(".g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell).")")
|
||||
call system(g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell))
|
||||
" call Decho("zipfile<".b:zipfile.">")
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!" | echohl NONE
|
||||
elseif !filereadable(fname)
|
||||
echohl Error | echo "***error*** attempted to extract ".fname." but it doesn't appear to be present!"
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
" restore option
|
||||
let &report= repkeep
|
||||
|
||||
" call Dret("zip#Extract")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Escape: {{{2
|
||||
fun! s:Escape(fname,isfilt)
|
||||
|
||||
+15
-6
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 03
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -79,11 +79,15 @@ exception is that "<sfile>" is expanded when the autocmd is defined. Example:
|
||||
|
||||
Here Vim expands <sfile> to the name of the file containing this line.
|
||||
|
||||
When your .vimrc file is sourced twice, the autocommands will appear twice.
|
||||
To avoid this, put this command in your .vimrc file, before defining
|
||||
autocommands: >
|
||||
`:autocmd` adds to the list of autocommands regardless of whether they are
|
||||
already present. When your .vimrc file is sourced twice, the autocommands
|
||||
will appear twice. To avoid this, define your autocommands in a group, so
|
||||
that you can easily clear them: >
|
||||
|
||||
:autocmd! " Remove ALL autocommands for the current group.
|
||||
augroup vimrc
|
||||
autocmd! " Remove all vimrc autocommands
|
||||
au BufNewFile,BufRead *.html so <sfile>:h/html.vim
|
||||
augroup END
|
||||
|
||||
If you don't want to remove all autocommands, you can instead use a variable
|
||||
to ensure that Vim includes the autocommands only once: >
|
||||
@@ -130,8 +134,13 @@ prompt. When one command outputs two messages this can happen anyway.
|
||||
|
||||
:au[tocmd]! [group] {event}
|
||||
Remove ALL autocommands for {event}.
|
||||
Warning: You should not do this without a group for
|
||||
|BufRead| and other common events, it can break
|
||||
plugins, syntax highlighting, etc.
|
||||
|
||||
:au[tocmd]! [group] Remove ALL autocommands.
|
||||
Warning: You should normally not do this without a
|
||||
group, it breaks plugins, syntax highlighting, etc.
|
||||
|
||||
When the [group] argument is not given, Vim uses the current group (as defined
|
||||
with ":augroup"); otherwise, Vim uses the group defined with [group].
|
||||
@@ -983,7 +992,7 @@ WinLeave Before leaving a window. If the window to be
|
||||
|
||||
*WinNew*
|
||||
WinNew When a new window was created. Not done for
|
||||
the fist window, when Vim has just started.
|
||||
the first window, when Vim has just started.
|
||||
Before a WinEnter event.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Sep 11
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -913,8 +913,7 @@ Exceptions:
|
||||
Substitute with an expression *sub-replace-expression*
|
||||
*sub-replace-\=* *s/\=*
|
||||
When the substitute string starts with "\=" the remainder is interpreted as an
|
||||
expression. This does not work recursively: a |substitute()| function inside
|
||||
the expression cannot use "\=" for the substitute string.
|
||||
expression.
|
||||
|
||||
The special meaning for characters as mentioned at |sub-replace-special| does
|
||||
not apply except for "<CR>". A <NL> character is used as a line break, you
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Sep 11
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -33,7 +33,7 @@ The Netbeans interface also uses a channel. |netbeans|
|
||||
1. Overview *job-channel-overview*
|
||||
|
||||
There are four main types of jobs:
|
||||
1. A deamon, serving several Vim instances.
|
||||
1. A daemon, serving several Vim instances.
|
||||
Vim connects to it with a socket.
|
||||
2. One job working with one Vim instance, asynchronously.
|
||||
Uses a socket or pipes.
|
||||
@@ -465,6 +465,11 @@ it like this: >
|
||||
Without the handler you need to read the output with |ch_read()| or
|
||||
|ch_readraw()|. You can do this in the close callback, see |read-in-close-cb|.
|
||||
|
||||
Note that if the job exits before you read the output, the output may be lost.
|
||||
This depends on the system (on Unix this happens because closing the write end
|
||||
of a pipe causes the read end to get EOF). To avoid this make the job sleep
|
||||
for a short while before it exits.
|
||||
|
||||
The handler defined for "out_cb" will not receive stderr. If you want to
|
||||
handle that separately, add an "err_cb" handler: >
|
||||
let job = job_start(command, {"out_cb": "MyHandler",
|
||||
@@ -516,7 +521,7 @@ If the job can take some time and you don't need intermediate results, you can
|
||||
add a close callback and read the output there: >
|
||||
|
||||
func! CloseHandler(channel)
|
||||
while ch_status(a:channel) == 'buffered'
|
||||
while ch_status(a:channel, {'part': 'out'}) == 'buffered'
|
||||
echomsg ch_read(a:channel)
|
||||
endwhile
|
||||
endfunc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.0. Last change: 2016 Aug 27
|
||||
*cmdline.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -229,9 +229,10 @@ CTRL-Y When there is a modeless selection, copy the selection into
|
||||
the clipboard. |modeless-selection|
|
||||
If there is no selection CTRL-Y is inserted as a character.
|
||||
|
||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||
CTRL-M or CTRL-J *c_CTRL-M* *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||
<CR> or <NL> start entered command
|
||||
*c_<Esc>* *c_Esc*
|
||||
|
||||
CTRL-[ *c_CTRL-[* *c_<Esc>* *c_Esc*
|
||||
<Esc> When typed and 'x' not present in 'cpoptions', quit
|
||||
Command-line mode without executing. In macros or when 'x'
|
||||
present in 'cpoptions', start entered command.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Aug 06
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -181,7 +181,8 @@ start editing another file, Vim will refuse this. In order to overrule this
|
||||
protection, add a '!' to the command. The changes will then be lost. For
|
||||
example: ":q" will not work if the buffer was changed, but ":q!" will. To see
|
||||
whether the buffer was changed use the "CTRL-G" command. The message includes
|
||||
the string "[Modified]" if the buffer has been changed.
|
||||
the string "[Modified]" if the buffer has been changed, or "+" if the 'm' flag
|
||||
is in 'shortmess'.
|
||||
|
||||
If you want to automatically save the changes without asking, switch on the
|
||||
'autowriteall' option. 'autowrite' is the associated Vi-compatible option
|
||||
|
||||
+47
-25
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Sep 07
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -125,7 +125,8 @@ cleared. A List, Dictionary or Float is not a Number or String, thus
|
||||
evaluates to FALSE.
|
||||
|
||||
*E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
|
||||
List, Dictionary, Funcref and Job types are not automatically converted.
|
||||
List, Dictionary, Funcref, Job and Channel types are not automatically
|
||||
converted.
|
||||
|
||||
*E805* *E806* *E808*
|
||||
When mixing Number and Float the Number is converted to Float. Otherwise
|
||||
@@ -643,7 +644,7 @@ It's possible to form a variable name with curly braces, see
|
||||
|
||||
Expression syntax summary, from least to most significant:
|
||||
|
||||
|expr1| expr2
|
||||
|expr1| expr2
|
||||
expr2 ? expr1 : expr1 if-then-else
|
||||
|
||||
|expr2| expr3
|
||||
@@ -691,7 +692,7 @@ Expression syntax summary, from least to most significant:
|
||||
expr8.name entry in a |Dictionary|
|
||||
expr8(expr1, ...) function call with |Funcref| variable
|
||||
|
||||
|expr9| number number constant
|
||||
|expr9| number number constant
|
||||
"string" string constant, backslash is special
|
||||
'string' string constant, ' is doubled
|
||||
[expr1, ...] |List|
|
||||
@@ -957,7 +958,7 @@ expr8[expr1] item of String or |List| *expr-[]* *E111*
|
||||
*E909* *subscript*
|
||||
If expr8 is a Number or String this results in a String that contains the
|
||||
expr1'th single byte from expr8. expr8 is used as a String, expr1 as a
|
||||
Number. This doesn't recognize multi-byte encodings, see |byteidx()| for
|
||||
Number. This doesn't recognize multi-byte encodings, see `byteidx()` for
|
||||
an alternative, or use `split()` to turn the string into a list of characters.
|
||||
|
||||
Index zero gives the first byte. This is like it works in C. Careful:
|
||||
@@ -1244,7 +1245,7 @@ The arguments are optional. Example: >
|
||||
< error function
|
||||
*closure*
|
||||
Lambda expressions can access outer scope variables and arguments. This is
|
||||
often called a closure. Example where "i" a and "a:arg" are used in a lambda
|
||||
often called a closure. Example where "i" and "a:arg" are used in a lambda
|
||||
while they exist in the function scope. They remain valid even after the
|
||||
function returns: >
|
||||
:function Foo(arg)
|
||||
@@ -2030,7 +2031,8 @@ ch_sendraw({handle}, {string} [, {options}])
|
||||
any send {string} over raw {handle}
|
||||
ch_setoptions({handle}, {options})
|
||||
none set options for {handle}
|
||||
ch_status({handle}) String status of channel {handle}
|
||||
ch_status({handle} [, {options}])
|
||||
String status of channel {handle}
|
||||
changenr() Number current change number
|
||||
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
@@ -2072,8 +2074,8 @@ expand({expr} [, {nosuf} [, {list}]])
|
||||
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
filereadable({file}) Number |TRUE| if {file} is a readable file
|
||||
filewritable({file}) Number |TRUE| if {file} is a writable file
|
||||
filter({expr}, {string}) List/Dict remove items from {expr} where
|
||||
{string} is 0
|
||||
filter({expr1}, {expr2}) List/Dict remove items from {expr1} where
|
||||
{expr2} is 0
|
||||
finddir({name}[, {path}[, {count}]])
|
||||
String find directory {name} in {path}
|
||||
findfile({name}[, {path}[, {count}]])
|
||||
@@ -2097,7 +2099,7 @@ garbagecollect([{atexit}]) none free memory, breaking cyclic references
|
||||
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
|
||||
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
|
||||
get({func}, {what}) any get property of funcref/partial {func}
|
||||
getbufinfo([{expr}]) List information about buffers
|
||||
getbufinfo([{expr}]) List information about buffers
|
||||
getbufline({expr}, {lnum} [, {end}])
|
||||
List lines {lnum} to {end} of buffer {expr}
|
||||
getbufvar({expr}, {varname} [, {def}])
|
||||
@@ -2128,12 +2130,12 @@ getqflist([{what}]) List list of quickfix items
|
||||
getreg([{regname} [, 1 [, {list}]]])
|
||||
String or List contents of register
|
||||
getregtype([{regname}]) String type of register
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabvar({nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
|
||||
any {name} in {winnr} in tab page {tabnr}
|
||||
getwininfo([{winid}]) List list of windows
|
||||
getwininfo([{winid}]) List list of windows
|
||||
getwinposx() Number X coord in pixels of GUI Vim window
|
||||
getwinposy() Number Y coord in pixels of GUI Vim window
|
||||
getwinvar({nr}, {varname} [, {def}])
|
||||
@@ -2197,7 +2199,7 @@ localtime() Number current time
|
||||
log({expr}) Float natural logarithm (base e) of {expr}
|
||||
log10({expr}) Float logarithm of Float {expr} to base 10
|
||||
luaeval({expr}[, {expr}]) any evaluate |Lua| expression
|
||||
map({expr}, {string}) List/Dict change each item in {expr} to {expr}
|
||||
map({expr1}, {expr2}) List/Dict change each item in {expr1} to {expr}
|
||||
maparg({name}[, {mode} [, {abbr} [, {dict}]]])
|
||||
String or Dict
|
||||
rhs of mapping {name} in mode {mode}
|
||||
@@ -3041,7 +3043,8 @@ ch_info({handle}) *ch_info()*
|
||||
Returns a Dictionary with information about {handle}. The
|
||||
items are:
|
||||
"id" number of the channel
|
||||
"status" "open" (any part is open) or "closed"
|
||||
"status" "open", "buffered" or "closed", like
|
||||
ch_status()
|
||||
When opened with ch_open():
|
||||
"hostname" the hostname of the address
|
||||
"port" the port of the address
|
||||
@@ -3050,11 +3053,11 @@ ch_info({handle}) *ch_info()*
|
||||
"sock_io" "socket"
|
||||
"sock_timeout" timeout in msec
|
||||
When opened with job_start():
|
||||
"out_status" "open" or "closed"
|
||||
"out_status" "open", "buffered" or "closed"
|
||||
"out_mode" "NL", "RAW", "JSON" or "JS"
|
||||
"out_io" "null", "pipe", "file" or "buffer"
|
||||
"out_timeout" timeout in msec
|
||||
"err_status" "open" or "closed"
|
||||
"err_status" "open", "buffered" or "closed"
|
||||
"err_mode" "NL", "RAW", "JSON" or "JS"
|
||||
"err_io" "out", "null", "pipe", "file" or "buffer"
|
||||
"err_timeout" timeout in msec
|
||||
@@ -3069,7 +3072,7 @@ ch_log({msg} [, {handle}]) *ch_log()*
|
||||
When {handle} is passed the channel number is used for the
|
||||
message.
|
||||
{handle} can be Channel or a Job that has a Channel. The
|
||||
Channel must open.
|
||||
Channel must be open for the channel number to be used.
|
||||
|
||||
ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
Start logging channel activity to {fname}.
|
||||
@@ -3139,7 +3142,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()*
|
||||
These options cannot be changed:
|
||||
"waittime" only applies to |ch_open()|
|
||||
|
||||
ch_status({handle}) *ch_status()*
|
||||
ch_status({handle} [, {options}]) *ch_status()*
|
||||
Return the status of {handle}:
|
||||
"fail" failed to open the channel
|
||||
"open" channel can be used
|
||||
@@ -3149,6 +3152,11 @@ ch_status({handle}) *ch_status()*
|
||||
"buffered" is used when the channel was closed but there is
|
||||
still data that can be obtained with |ch_read()|.
|
||||
|
||||
If {options} is given it can contain a "part" entry to specify
|
||||
the part of the channel to return the status for: "out" or
|
||||
"err". For example, to get the error status: >
|
||||
ch_status(job, {"part": "err"})
|
||||
<
|
||||
*copy()*
|
||||
copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't
|
||||
different from using {expr} directly.
|
||||
@@ -3701,9 +3709,10 @@ filter({expr1}, {expr2}) *filter()*
|
||||
is zero remove the item from the |List| or |Dictionary|.
|
||||
{expr2} must be a |string| or |Funcref|.
|
||||
|
||||
if {expr2} is a |string|, inside {expr2} |v:val| has the value
|
||||
If {expr2} is a |string|, inside {expr2} |v:val| has the value
|
||||
of the current item. For a |Dictionary| |v:key| has the key
|
||||
of the current item.
|
||||
of the current item and for a |List| |v:key| has the index of
|
||||
the current item.
|
||||
Examples: >
|
||||
call filter(mylist, 'v:val !~ "OLD"')
|
||||
< Removes the items where "OLD" appears. >
|
||||
@@ -3725,6 +3734,10 @@ filter({expr1}, {expr2}) *filter()*
|
||||
return a:idx % 2 == 1
|
||||
endfunc
|
||||
call filter(mylist, function('Odd'))
|
||||
< It is shorter when using a |lambda|: >
|
||||
call filter(myList, {idx, val -> idx * val <= 42})
|
||||
< If you do not use "val" you can leave it out: >
|
||||
call filter(myList, {idx -> idx % 2 == 1})
|
||||
<
|
||||
The operation is done in-place. If you want a |List| or
|
||||
|Dictionary| to remain unmodified make a copy first: >
|
||||
@@ -4356,7 +4369,7 @@ getfperm({fname}) *getfperm()*
|
||||
< This will hopefully (from a security point of view) display
|
||||
the string "rw-r--r--" or even "rw-------".
|
||||
|
||||
For setting permissins use |setfperm()|.
|
||||
For setting permissions use |setfperm()|.
|
||||
|
||||
getftime({fname}) *getftime()*
|
||||
The result is a Number, which is the last modification time of
|
||||
@@ -4503,7 +4516,8 @@ getqflist([{what}]) *getqflist()*
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
returns only the items listed in {what} as a dictionary. The
|
||||
following string items are supported in {what}:
|
||||
nr get information for this quickfix list
|
||||
nr get information for this quickfix list; zero
|
||||
means the current quickfix list
|
||||
title get the list title
|
||||
winid get the |window-ID| (if opened)
|
||||
all all of the above quickfix properties
|
||||
@@ -4782,6 +4796,7 @@ histadd({history}, {item}) *histadd()*
|
||||
"expr" or "=" typed expression history
|
||||
"input" or "@" input line history
|
||||
"debug" or ">" debug command history
|
||||
empty the current or last used history
|
||||
The {history} string does not need to be the whole name, one
|
||||
character is sufficient.
|
||||
If {item} does already exist in the history, it will be
|
||||
@@ -5439,6 +5454,10 @@ map({expr1}, {expr2}) *map()*
|
||||
return a:key . '-' . a:val
|
||||
endfunc
|
||||
call map(myDict, function('KeyValue'))
|
||||
< It is shorter when using a |lambda|: >
|
||||
call map(myDict, {key, val -> key . '-' . val})
|
||||
< If you do not use "val" you can leave it out: >
|
||||
call map(myDict, {key -> 'item: ' . key})
|
||||
<
|
||||
The operation is done in-place. If you want a |List| or
|
||||
|Dictionary| to remain unmodified make a copy first: >
|
||||
@@ -6149,9 +6168,9 @@ range({expr} [, {max} [, {stride}]]) *range()*
|
||||
*readfile()*
|
||||
readfile({fname} [, {binary} [, {max}]])
|
||||
Read file {fname} and return a |List|, each line of the file
|
||||
as an item. Lines broken at NL characters. Macintosh files
|
||||
separated with CR will result in a single long line (unless a
|
||||
NL appears somewhere).
|
||||
as an item. Lines are broken at NL characters. Macintosh
|
||||
files separated with CR will result in a single long line
|
||||
(unless a NL appears somewhere).
|
||||
All NUL characters are replaced with a NL character.
|
||||
When {binary} contains "b" binary mode is used:
|
||||
- When the last line ends in a NL an extra empty list item is
|
||||
@@ -7371,6 +7390,9 @@ submatch({nr}[, {list}]) *submatch()* *E935*
|
||||
|substitute()| this list will always contain one or zero
|
||||
items, since there are no real line breaks.
|
||||
|
||||
When substitute() is used recursively only the submatches in
|
||||
the current (deepest) call can be obtained.
|
||||
|
||||
Example: >
|
||||
:s/\d\+/\=submatch(0) + 1/
|
||||
< This finds the first number in the line and adds one to it.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_mac.txt* For Vim version 7.4. Last change: 2012 Jan 13
|
||||
*gui_mac.txt* For Vim version 8.0. Last change: 2012 Jan 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bjorn Winckler
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 8.0. Last change: 2016 Aug 21
|
||||
*gui_x11.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -484,7 +484,7 @@ your system has a working pkg-config together with the .pc file of the
|
||||
required GTK+. For that, say, run the following on the command line to see if
|
||||
your pkg-config works with your GTK+ 2: >
|
||||
|
||||
$ pkgconfig --modversion gtk+-2.0
|
||||
$ pkg-config --modversion gtk+-2.0
|
||||
|
||||
Replace gtk+-2.0 with gtk+-3.0 for GTK+ 3. If you get the correct version
|
||||
number of your GTK+, you can proceed; if not, you probably need to do some
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 8.0. Last change: 2016 Mar 31
|
||||
*help.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -135,6 +135,7 @@ Advanced editing ~
|
||||
|autocmd.txt| automatically executing commands on an event
|
||||
|filetype.txt| settings done specifically for a type of file
|
||||
|eval.txt| expression evaluation, conditional commands
|
||||
|channel.txt| Jobs, Channels, inter-process communication
|
||||
|fold.txt| hide (fold) ranges of lines
|
||||
|
||||
Special issues ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*if_pyth.txt* For Vim version 8.0. Last change: 2016 Sep 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -748,11 +748,11 @@ match the Python 2.x or Python 3 version Vim was compiled with.
|
||||
The `:py3` and `:python3` commands work similar to `:python`. A simple check
|
||||
if the `:py3` command is working: >
|
||||
:py3 print("Hello")
|
||||
< *:py3file*
|
||||
|
||||
To see what version of Python you have: >
|
||||
:py3 import sys
|
||||
:py3 print(sys.version)
|
||||
|
||||
< *:py3file*
|
||||
The `:py3file` command works similar to `:pyfile`.
|
||||
*:py3do*
|
||||
The `:py3do` command works similar to `:pydo`.
|
||||
|
||||
@@ -207,21 +207,19 @@ MS-Windows ~
|
||||
|
||||
You need to install the right version of Ruby for this to work. You can find
|
||||
the package to download from:
|
||||
http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
|
||||
Currently that is ruby-1.9.2-p136-i386-mswin32.zip
|
||||
http://rubyinstaller.org/downloads/
|
||||
Currently that is rubyinstaller-2.2.5.exe
|
||||
|
||||
To use the Ruby interface the Ruby DLL must be in your search path. In a
|
||||
console window type "path" to see what directories are used. The 'rubydll'
|
||||
option can be also used to specify the Ruby DLL.
|
||||
|
||||
The name of the DLL must match the Ruby version Vim was compiled with.
|
||||
Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know
|
||||
Currently the name is "msvcrt-ruby220.dll". That is for Ruby 2.2.X. To know
|
||||
for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
|
||||
|
||||
If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file
|
||||
and comment-out the check for _MSC_VER.
|
||||
You may also need to rename the include directory name to match the version,
|
||||
strangely for Ruby 1.9.3 the directory is called 1.9.1.
|
||||
If you want to build Vim with RubyInstaller 1.9 or 2.X using MSVC, you need
|
||||
some tricks. See the src/INSTALLpc.txt for detail.
|
||||
|
||||
|
||||
Unix ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.0. Last change: 2016 Aug 27
|
||||
*index.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1002,7 +1002,7 @@ tag command action in Command-line editing mode ~
|
||||
|c_CTRL-L| CTRL-L do completion on the pattern in front of the
|
||||
cursor and insert the longest common part
|
||||
|c_<CR>| <CR> execute entered command
|
||||
|c_<CR>| CTRL-M same as <CR>
|
||||
|c_CTRL-M| CTRL-M same as <CR>
|
||||
|c_CTRL-N| CTRL-N after using 'wildchar' with multiple matches:
|
||||
go to next match, otherwise: same as <Down>
|
||||
CTRL-O not used
|
||||
@@ -1026,7 +1026,7 @@ tag command action in Command-line editing mode ~
|
||||
CTRL-Y copy (yank) modeless selection
|
||||
CTRL-Z not used (reserved for suspend)
|
||||
|c_<Esc>| <Esc> abandon command-line without executing it
|
||||
|c_<Esc>| CTRL-[ same as <Esc>
|
||||
|c_CTRL-[| CTRL-[ same as <Esc>
|
||||
|c_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode, abandon command-line
|
||||
|c_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode',
|
||||
abandon command-line
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 8.0. Last change: 2015 Jan 20
|
||||
*intro.txt* For Vim version 8.0. Last change: 2016 Sep 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -135,10 +135,14 @@ http://www.vim.org/maillist.php
|
||||
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will see
|
||||
the message. If you don't want that, e.g. because it is a security issue,
|
||||
send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram).
|
||||
There are two ways to report bugs, both work:
|
||||
1. Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will
|
||||
see the message. If you don't want that, e.g. because it is a security
|
||||
issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer
|
||||
(that's Bram).
|
||||
2. Open issue on GitHub: https://github.com/vim/vim/issues
|
||||
The text will be forwarded to the vim-dev maillist.
|
||||
|
||||
Please be brief; all the time that is spent on answering mail is subtracted
|
||||
from the time that is spent on improving Vim! Always give a reproducible
|
||||
|
||||
+13
-10
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Sep 02
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Oct 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,7 +10,7 @@ Options *options*
|
||||
2. Automatically setting options |auto-setting|
|
||||
3. Options summary |option-summary|
|
||||
|
||||
For an overview of options see help.txt |option-list|.
|
||||
For an overview of options see quickref.txt |option-list|.
|
||||
|
||||
Vim has a number of internal variables and switches which can be set to
|
||||
achieve special effects. These options come in three forms:
|
||||
@@ -1747,12 +1747,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
option + set value effect ~
|
||||
|
||||
'allowrevins' off no CTRL-_ command
|
||||
'backupcopy' Unix: "yes" backup file is a copy
|
||||
others: "auto" copy or rename backup file
|
||||
'backspace' "" normal backspace
|
||||
'backupcopy' Unix: "yes" backup file is a copy
|
||||
else: "auto" copy or rename backup file
|
||||
'backup' off no backup file
|
||||
'cindent' off no C code indentation
|
||||
'cedit' + "" no key to open the |cmdwin|
|
||||
'cindent' off no C code indentation
|
||||
'cpoptions' + (all flags) Vi-compatible flags
|
||||
'cscopetag' off don't use cscope for ":tag"
|
||||
'cscopetagorder' 0 see |cscopetagorder|
|
||||
@@ -1794,6 +1794,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'textwidth' 0 no automatic line wrap
|
||||
'tildeop' off tilde is not an operator
|
||||
'ttimeout' off no terminal timeout
|
||||
'viminfo' + {unchanged} no viminfo file
|
||||
'whichwrap' + "" left-right movements don't wrap
|
||||
'wildchar' + CTRL-E only when the current value is <Tab>
|
||||
use CTRL-E for cmdline completion
|
||||
@@ -2646,7 +2647,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
uhex Show unprintable characters hexadecimal as <xx>
|
||||
instead of using ^C and ~C.
|
||||
|
||||
When neither "lastline" or "truncate" is included, a last line that
|
||||
When neither "lastline" nor "truncate" is included, a last line that
|
||||
doesn't fit is replaced with "@" lines.
|
||||
|
||||
*'eadirection'* *'ead'*
|
||||
@@ -6274,7 +6275,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
personal preferences to overrule or add to the distributed defaults
|
||||
or system-wide settings (rarely needed).
|
||||
|
||||
More entries are added when using |packages|.
|
||||
More entries are added when using |packages|. If it gets very long
|
||||
then `:set rtp` will be truncated, use `:echo &rtp` to see the full
|
||||
string.
|
||||
|
||||
Note that, unlike 'path', no wildcards like "**" are allowed. Normal
|
||||
wildcards are allowed, but can significantly slow down searching for
|
||||
@@ -6335,7 +6338,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is set to 1 when 'compatible' is set.
|
||||
|
||||
*'scrolloff'* *'so'*
|
||||
'scrolloff' 'so' number (default 0)
|
||||
'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
Minimal number of screen lines to keep above and below the cursor.
|
||||
@@ -7840,7 +7843,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'timeout' 'to' boolean (default on)
|
||||
global
|
||||
*'ttimeout'* *'nottimeout'*
|
||||
'ttimeout' boolean (default off)
|
||||
'ttimeout' boolean (default off, set in |defaults.vim|))
|
||||
global
|
||||
{not in Vi}
|
||||
These two options together determine the behavior when part of a
|
||||
@@ -7875,7 +7878,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in all versions of Vi}
|
||||
*'ttimeoutlen'* *'ttm'*
|
||||
'ttimeoutlen' 'ttm' number (default -1)
|
||||
'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|))
|
||||
global
|
||||
{not in Vi}
|
||||
The time in milliseconds that is waited for a key code or mapped key
|
||||
|
||||
@@ -532,7 +532,7 @@ variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
|
||||
let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
|
||||
<
|
||||
(note: it has been reported that windows 7 with putty v0.6's "-batch" option
|
||||
doesn't work, so its best to leave it off for that system)
|
||||
doesn't work, so it's best to leave it off for that system)
|
||||
|
||||
See |netrw-p8| for more about putty, pscp, psftp, etc.
|
||||
|
||||
@@ -1206,7 +1206,7 @@ The :NetrwMB command is available outside of netrw buffers (once netrw has been
|
||||
invoked in the session).
|
||||
|
||||
The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By
|
||||
default, its stored on the first directory on the user's |'runtimepath'|.
|
||||
default, it's stored on the first directory on the user's |'runtimepath'|.
|
||||
|
||||
Related Topics:
|
||||
|netrw-gb| how to return (go) to a bookmark
|
||||
@@ -1431,7 +1431,7 @@ be used in that count.
|
||||
*.netrwhist*
|
||||
See |g:netrw_dirhistmax| for how to control the quantity of history stack
|
||||
slots. The file ".netrwhist" holds history when netrw (and vim) is not
|
||||
active. By default, its stored on the first directory on the user's
|
||||
active. By default, it's stored on the first directory on the user's
|
||||
|'runtimepath'|.
|
||||
|
||||
Related Topics:
|
||||
@@ -3271,7 +3271,7 @@ The user function is passed one argument; it resembles >
|
||||
|
||||
fun! ExampleUserMapFunc(islocal)
|
||||
<
|
||||
where a:islocal is 1 if its a local-directory system call or 0 when
|
||||
where a:islocal is 1 if it's a local-directory system call or 0 when
|
||||
remote-directory system call.
|
||||
|
||||
Use netrw#Expose("varname") to access netrw-internal (script-local)
|
||||
@@ -3595,7 +3595,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
|
||||
*netrw-p16*
|
||||
P16. When editing remote files (ex. :e ftp://hostname/path/file),
|
||||
under Windows I get an |E303| message complaining that its unable
|
||||
under Windows I get an |E303| message complaining that it's unable
|
||||
to open a swap file.
|
||||
|
||||
(romainl) It looks like you are starting Vim from a protected
|
||||
@@ -3649,7 +3649,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
P21. I've made a directory (or file) with an accented character, but
|
||||
netrw isn't letting me enter that directory/read that file:
|
||||
|
||||
Its likely that the shell or o/s is using a different encoding
|
||||
It's likely that the shell or o/s is using a different encoding
|
||||
than you have vim (netrw) using. A patch to vim supporting
|
||||
"systemencoding" may address this issue in the future; for
|
||||
now, just have netrw use the proper encoding. For example: >
|
||||
|
||||
+28
-2
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 8.0. Last change: 2013 Apr 17
|
||||
*pi_zip.txt* For Vim version 8.0. Last change: 2016 Sep 13
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
The VIM LICENSE (see |copyright|) applies to the files in this
|
||||
package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use
|
||||
"zip.vim" instead of "VIM". Like anything else that's free, zip.vim
|
||||
@@ -33,6 +33,9 @@ Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
also write to the file. Currently, one may not make a new file in
|
||||
zip archives via the plugin.
|
||||
|
||||
*zip-x*
|
||||
x : may extract a listed file when the cursor is atop it
|
||||
|
||||
OPTIONS
|
||||
|
||||
*g:zip_nomax*
|
||||
@@ -60,6 +63,11 @@ Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
It's used during the writing (updating) of a file already in a zip
|
||||
file; by default: >
|
||||
let g:zip_zipcmd= "zip"
|
||||
<
|
||||
*g:zip_extractcmd*
|
||||
This option specifies the program (and any options needed) used to
|
||||
extract a file from a zip archive. By default, >
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
<
|
||||
PREVENTING LOADING~
|
||||
|
||||
@@ -83,8 +91,26 @@ Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
One can simply extend this line to accommodate additional extensions that
|
||||
should be treated as zip files.
|
||||
|
||||
Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc.
|
||||
Currently (11/30/15) it holds: >
|
||||
|
||||
let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,
|
||||
\ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,
|
||||
\ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,
|
||||
\ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub'
|
||||
|
||||
==============================================================================
|
||||
4. History *zip-history* {{{1
|
||||
v28 Oct 08, 2014 * changed the sanity checks for executables to reflect
|
||||
the command actually to be attempted in zip#Read()
|
||||
and zip#Write()
|
||||
* added the extraction of a file capability
|
||||
Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list
|
||||
Sep 13, 2016 * added *.apk to the |g:zipPlugin_ext| list and
|
||||
sorted the suffices.
|
||||
v27 Jul 02, 2013 * sanity check: zipfile must have "PK" as its first
|
||||
two bytes.
|
||||
* modified to allow zipfile: entries in quickfix lists
|
||||
v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that
|
||||
are synonyms for .zip
|
||||
v25 Jun 27, 2011 * using keepj with unzip -Z
|
||||
|
||||
+11
-4
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3521,8 +3521,8 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
|
||||
and also determines where |:syn-keyword| will be checked for a new
|
||||
match.
|
||||
|
||||
It is recommended when writing syntax files, to use this command
|
||||
to the correct value for the specific syntax language and not change
|
||||
It is recommended when writing syntax files, to use this command to
|
||||
set the correct value for the specific syntax language and not change
|
||||
the 'iskeyword' option.
|
||||
|
||||
DEFINING KEYWORDS *:syn-keyword*
|
||||
@@ -3580,7 +3580,11 @@ DEFINING KEYWORDS *:syn-keyword*
|
||||
|
||||
DEFINING MATCHES *:syn-match*
|
||||
|
||||
:sy[ntax] match {group-name} [{options}] [excludenl] {pattern} [{options}]
|
||||
:sy[ntax] match {group-name} [{options}]
|
||||
[excludenl]
|
||||
[keepend]
|
||||
{pattern}
|
||||
[{options}]
|
||||
|
||||
This defines one match.
|
||||
|
||||
@@ -3589,6 +3593,9 @@ DEFINING MATCHES *:syn-match*
|
||||
[excludenl] Don't make a pattern with the end-of-line "$"
|
||||
extend a containing match or region. Must be
|
||||
given before the pattern. |:syn-excludenl|
|
||||
keepend Don't allow contained matches to go past a
|
||||
match with the end pattern. See
|
||||
|:syn-keepend|.
|
||||
{pattern} The search pattern that defines the match.
|
||||
See |:syn-pattern| below.
|
||||
Note that the pattern may match more than one
|
||||
|
||||
@@ -5238,6 +5238,7 @@ c_CTRL-I cmdline.txt /*c_CTRL-I*
|
||||
c_CTRL-J cmdline.txt /*c_CTRL-J*
|
||||
c_CTRL-K cmdline.txt /*c_CTRL-K*
|
||||
c_CTRL-L cmdline.txt /*c_CTRL-L*
|
||||
c_CTRL-M cmdline.txt /*c_CTRL-M*
|
||||
c_CTRL-N cmdline.txt /*c_CTRL-N*
|
||||
c_CTRL-P cmdline.txt /*c_CTRL-P*
|
||||
c_CTRL-Q cmdline.txt /*c_CTRL-Q*
|
||||
@@ -5254,6 +5255,7 @@ c_CTRL-U cmdline.txt /*c_CTRL-U*
|
||||
c_CTRL-V cmdline.txt /*c_CTRL-V*
|
||||
c_CTRL-W cmdline.txt /*c_CTRL-W*
|
||||
c_CTRL-Y cmdline.txt /*c_CTRL-Y*
|
||||
c_CTRL-[ cmdline.txt /*c_CTRL-[*
|
||||
c_CTRL-\_CTRL-G intro.txt /*c_CTRL-\\_CTRL-G*
|
||||
c_CTRL-\_CTRL-N intro.txt /*c_CTRL-\\_CTRL-N*
|
||||
c_CTRL-\_e cmdline.txt /*c_CTRL-\\_e*
|
||||
@@ -6428,6 +6430,8 @@ g:vimsyn_maxlines syntax.txt /*g:vimsyn_maxlines*
|
||||
g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
|
||||
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
|
||||
g:yaml_schema syntax.txt /*g:yaml_schema*
|
||||
g:zipPlugin_ext pi_zip.txt /*g:zipPlugin_ext*
|
||||
g:zip_extractcmd pi_zip.txt /*g:zip_extractcmd*
|
||||
g:zip_nomax pi_zip.txt /*g:zip_nomax*
|
||||
g:zip_shq pi_zip.txt /*g:zip_shq*
|
||||
g:zip_unzipcmd pi_zip.txt /*g:zip_unzipcmd*
|
||||
@@ -9483,6 +9487,7 @@ zip-extension pi_zip.txt /*zip-extension*
|
||||
zip-history pi_zip.txt /*zip-history*
|
||||
zip-manual pi_zip.txt /*zip-manual*
|
||||
zip-usage pi_zip.txt /*zip-usage*
|
||||
zip-x pi_zip.txt /*zip-x*
|
||||
zj fold.txt /*zj*
|
||||
zk fold.txt /*zk*
|
||||
zl scroll.txt /*zl*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 8.0. Last change: 2016 Aug 20
|
||||
*tagsrch.txt* For Vim version 8.0. Last change: 2016 Sep 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -91,7 +91,7 @@ The ignore-case matches are not found for a ":tag" command when:
|
||||
- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern
|
||||
contains an upper case character.
|
||||
|
||||
The gnore-case matches are found when:
|
||||
The ignore-case matches are found when:
|
||||
- a pattern is used (starting with a "/")
|
||||
- for ":tselect"
|
||||
- when 'tagcase' is "followic" and 'ignorecase' is off
|
||||
|
||||
+50
-268
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Oct 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -36,11 +36,9 @@ not be repeated below, unless there is extra information.
|
||||
|
||||
After 8.0 is released:
|
||||
- Drop support for older MS-Windows systems, before XP.
|
||||
Patch from Ken Takata, 2016 Mar 8.
|
||||
Patch from Ken Takata, updated 2016 Sep 12.
|
||||
|
||||
+channel:
|
||||
- channel_wait() may return an error while there is still something to read.
|
||||
Perhaps try to read once more?
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Add 'cwd' argument to start_job(): directory to change to in the child.
|
||||
check for valid directory before forking.
|
||||
@@ -112,6 +110,8 @@ Or avoid recursiveness.
|
||||
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Patch to recognize tmux. (Michael Henry, 2016 Sep 29)
|
||||
|
||||
Once .exe with updated installer is available: Add remark to download page
|
||||
about /S and /D options (Ken Takata, 2016 Apr 13)
|
||||
Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
@@ -128,7 +128,14 @@ Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27)
|
||||
Is there another solution?
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
E.g. deepcopy(test_null_list())
|
||||
|
||||
Patch to make it possible to extend a list with itself.
|
||||
(Nikolai Pavlov, 2016 Sep 23)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
@@ -140,11 +147,33 @@ Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
|
||||
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
4#1038)
|
||||
|
||||
Patch to add "cmdline" completion to getcompletion(). (Shougo, Oct 1, #1140)
|
||||
|
||||
Patch for systemlist(), add empty item. (thinca, Sep 30, #1135)
|
||||
Adjust the documentation instead? Do include the test.
|
||||
|
||||
Idea from Sven: record sequence of keys. Useful to show others what they are
|
||||
doing (look over the shoulder), and also to see what happened.
|
||||
Probably list of keystrokes, with some annotations for mode changes.
|
||||
Could store in logfile to be able to analyise it with an external command.
|
||||
E.g. to see when's the last time a plugin command was used.
|
||||
|
||||
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
|
||||
|
||||
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
|
||||
|
||||
Patch for :pyx, run python commands depending on the supported version.
|
||||
(Marc Weber, update from Ken Takata, 2016 Sep 19)
|
||||
|
||||
When using ":diffput" through a mapping, undo in the target buffer isn't
|
||||
synced. (Ryan Carney, 2016 Sep 14)
|
||||
|
||||
Syntax highlighting for messages with RFC3339 timestamp (#946)
|
||||
Did maintainer reply?
|
||||
|
||||
Patch to avoid problem with special characters in file name.
|
||||
(Shougo, 2016 Sept 19, #1099) Not finished?
|
||||
|
||||
ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
|
||||
Also with latest version.
|
||||
|
||||
@@ -166,6 +195,9 @@ Also for ":@.".
|
||||
|
||||
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
|
||||
Have a way to get the call stack, in a function and from an exception.
|
||||
#1125
|
||||
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
@@ -174,6 +206,9 @@ This does not work: :set cscopequickfix=a-
|
||||
|
||||
Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
|
||||
|
||||
Patch to add separate highlighting for quickfix current line.
|
||||
(anishsane, 2016 Sep 16, #1080)
|
||||
|
||||
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
|
||||
|
||||
Patch to improve map documentation. Issue #799.
|
||||
@@ -183,14 +218,16 @@ Patch for syntax folding optimization. (Shougo, 2016 Sep 6, #1045)
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
Now on Git: https://gist.github.com/nocd5/165286495c782b815b94
|
||||
Update 2016 Aug 10.
|
||||
|
||||
We can use '. to go to the last change in the current buffer, but how about
|
||||
the last change in any buffer? Can we use ', (, is next to .)?
|
||||
|
||||
Ramel Eshed: system() is much slower than job_start(), why? (Aug 26)
|
||||
|
||||
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
|
||||
What does it change?
|
||||
|
||||
Patch to make gd and gD work better for non-K&R code and with comments.
|
||||
(Anton Lindqvist, 2016 Aug 29)
|
||||
|
||||
@@ -208,11 +245,6 @@ Patch to support strikethrough next to bold and italic. (Christian Brabandt,
|
||||
Update mentioned by Christian, 2016 Apr 25.
|
||||
Update from Ken Takata, 2016 Jul 17.
|
||||
|
||||
Patch to improve cscope. (Adrian Kocis, #843)
|
||||
|
||||
Patch for groovy multi-line comment highlighting. (Justin M. Keyes, 2016 May
|
||||
20 #644)
|
||||
|
||||
When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
|
||||
Because of using the initial buffer? (Dun Peal, 2016 May 12)
|
||||
|
||||
@@ -225,7 +257,7 @@ Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
|
||||
No test, needs some work to include.
|
||||
|
||||
Patch to make finding duplicate tags much faster, using a hashtab. (James
|
||||
McCoy, 2016 Sept 6, #1046)
|
||||
McCoy, 2016 Sept 14, #1046) Should work now.
|
||||
>
|
||||
Patch to improve indenting for C++ constructor with initializer list.
|
||||
(Hirohito Higashi, 2016 Mar 31)
|
||||
@@ -261,6 +293,9 @@ Can already do it with ":$put =execute('command')".
|
||||
When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
|
||||
Apr 17) #762
|
||||
|
||||
exists(":tearoff") does not tell you if the command is implemented. (Tony
|
||||
Mechelynck) Perhaps use exists("::tearoff") to check?
|
||||
|
||||
Use vim.vim syntax highlighting for help file examples, but without ":" in
|
||||
'iskeyword' for syntax.
|
||||
|
||||
@@ -284,9 +319,6 @@ Should use /usr/local/share/applications or /usr/share/applications.
|
||||
Or use $XDG_DATA_DIRS.
|
||||
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
|
||||
|
||||
Patch to test popupmenu. Fails, possibly due to a bug.
|
||||
(Christian Brabandt, 2016 Jul 23)
|
||||
|
||||
Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
|
||||
Better help Aug 19.
|
||||
Problem: applies to too many commands, such as :cbuffer.
|
||||
@@ -299,9 +331,6 @@ Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3). Still needs more work.
|
||||
|
||||
Patch to add CTRL-N / CTRL-P while searching. (Christian Brabandt, 2016 Aug
|
||||
3) Problem: two matches in one line and using CTRL-P does not move back.
|
||||
|
||||
Access to uninitialized memory in match_backref() regexp_nda.c:4882
|
||||
(Dominique Pelle, 2015 Nov 6)
|
||||
|
||||
@@ -382,8 +411,6 @@ Add "===" to have a strict comparison (type and value match).
|
||||
Add "==*" (?) to have a value match, but no automatic conversion, and v:true
|
||||
equals 1 and 1.0, v:false equals 0 and 0.0.?
|
||||
|
||||
Plugin to use Vim in MANPAGER. Konfekt, PR #491
|
||||
|
||||
Using uninitialized memory. (Dominique Pelle, 2015 Nov 4)
|
||||
|
||||
MS-Windows: When editing a file with a leading space, writing it uses the
|
||||
@@ -408,9 +435,6 @@ I can't recommend it though.
|
||||
Build with Python on Mac does not always use the right library.
|
||||
(Kazunobu Kuriyama, 2015 Mar 28)
|
||||
|
||||
Need a Vim equivalent of Python's None and a way to test for it.
|
||||
Use v:none. var == v:none
|
||||
|
||||
Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
|
||||
24) Also need a way to get the global arg list? Update later on Jan 24
|
||||
Update Mar 5. Update Apr 7. Update Jun 5.
|
||||
@@ -453,10 +477,6 @@ the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)
|
||||
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
|
||||
Sep 10)
|
||||
|
||||
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
|
||||
Needs a different check for CLEARTYPE_QUALITY.
|
||||
Problem mentioned by Christian Brabandt, 2016 Jan 4.
|
||||
|
||||
Example in editing.txt uses $HOME with the expectation that it ends in a
|
||||
slash. For me it does, but perhaps not for everybody. Add a function that
|
||||
inserts a slash when needed? pathconcat(dir, path) (Thilo Six, 2015 Aug 12)
|
||||
@@ -498,9 +518,6 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
Patch to use different terminal mode settings for system(). (Hayaki Saito)
|
||||
Does this work for everybody?
|
||||
|
||||
Patch to add wordcount(). Same info as g CTRL-G. (Christian Brabandt, 2015
|
||||
Nov 17)
|
||||
|
||||
Patch for man.vim. (SungHyun Nam, 2015 May 20)
|
||||
Doesn't work completely (Dominique Orban)
|
||||
|
||||
@@ -520,16 +537,8 @@ OK to not block marks?
|
||||
|
||||
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
Now on Git: https://gist.github.com/nocd5/165286495c782b815b94
|
||||
Update 2016 Aug 10.
|
||||
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
When 'balloonexpr' returns a list the result has a trailing newline.
|
||||
Just remove one trailing newline. (lcd, 2014 Oct 17)
|
||||
|
||||
When two SIGWINCH arrive very quickly, the second one may be lost.
|
||||
(Josh Triplett, 2015 Sep 17)
|
||||
|
||||
@@ -633,7 +642,7 @@ right-mouse-drag on the status line to move a window up/down without changing
|
||||
its height? It's like dragging the status bar above it at the same time.
|
||||
|
||||
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
|
||||
What for systems that don't have unsetenv()?
|
||||
What for systems that don't have unsetenv()? (Issue #1116)
|
||||
|
||||
Patch to add a :domodeline command. (Christian Brabandt, 2014 Oct 21)
|
||||
|
||||
@@ -688,9 +697,6 @@ Out of scope:
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
CTRL-] in Visual mode uses the selected text as a tag. This does not work
|
||||
when preceded with CTRL-W. (Patrick Hemmer, 2014 Jun 28)
|
||||
|
||||
When typing the first character of a command, e.g. "f", then using a menu, the
|
||||
menu item doesn't work. Clear typeahead when using a menu?
|
||||
|
||||
@@ -732,9 +738,6 @@ Patch to right-align signs. (James Kolb (email james), 2013 Sep 23)
|
||||
|
||||
Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
|
||||
|
||||
With "$" in 'cpoptions' the popup menu isn't fully drawn. (Matti Niemenmaa,
|
||||
2013 Sep 5)
|
||||
|
||||
Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel
|
||||
Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5.
|
||||
|
||||
@@ -799,10 +802,6 @@ Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}.
|
||||
Exception caused by argument of return is not caught by try/catch.
|
||||
(David Barnett, 2013 Nov 19)
|
||||
|
||||
8 'backupdir' and 'directory' should use $TMPDIR, $TMP and/or $TEMP when
|
||||
defined.
|
||||
Issue 28.
|
||||
|
||||
Patch to fix that 'cedit' is recognized after :normal. (Christian Brabandt,
|
||||
2013 Mar 19, later message)
|
||||
|
||||
@@ -847,8 +846,6 @@ How to test that it works well for all Vim users?
|
||||
|
||||
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
|
||||
- Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine
|
||||
the two into a regex for searching. (Ned Konz)
|
||||
Patch by Christian Brabandt, 2013 Apr 20, unfinished.
|
||||
@@ -859,20 +856,11 @@ In the ATTENTION message about an existing swap file, mention the name of the
|
||||
process that is running. It might actually be some other program, e.g. after
|
||||
a reboot.
|
||||
|
||||
Patch to select the next or previous text object if there isn't one under the
|
||||
cursor. (Daniel Thau, 2013 Nov 20)
|
||||
|
||||
patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6)
|
||||
|
||||
Bug caused by patch 7.3.1288? Issue 183.
|
||||
I can't reproduce it.
|
||||
|
||||
Syntax update problem in one buffer opened in two windows, bottom window is
|
||||
not correctly updated. (Paul Harris, 2012 Feb 27)
|
||||
|
||||
Patch to add assignments in cscope. (Uli Meis, Estabrooks, 2012 Sep 1)
|
||||
Alternate patch by Gary Johnson, Sep 4.
|
||||
|
||||
Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4.
|
||||
Or use expand('<sid>')?
|
||||
|
||||
@@ -910,10 +898,6 @@ Szamotulski, 2012 Nov 8)
|
||||
Session file creation: 'autochdir' causes trouble. Keep it off until after
|
||||
loading all files.
|
||||
|
||||
Win32: When 'autochdir' is on and 'encoding' is changed, files on the command
|
||||
line are opened again, but from the wrong directory. Apply 'autochdir' only
|
||||
after starting up?
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
@@ -931,9 +915,6 @@ of many matches. (Cody Cutler, 2013 Mar 28)
|
||||
|
||||
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
|
||||
|
||||
Help for 'b:undo_indent'. (Thilo Six, 2012 May 28)
|
||||
Also question if examples are correct.
|
||||
|
||||
The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
|
||||
Suggestion for another map. (Philip Mat, 2012 Jun 18)
|
||||
But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
|
||||
@@ -1010,8 +991,6 @@ Only for MS-Windows. No documentation. Do we want this?
|
||||
|
||||
Patch to support cursor shape in Cygwin console. (Ben bgold, 2011 Dec 27)
|
||||
|
||||
Issue 64: when 'incsearch' is on can't paste LF on command line.
|
||||
|
||||
On MS-Windows a temp dir with a & init causes system() to fail. (Ben Fritz,
|
||||
2012 Jun 19)
|
||||
|
||||
@@ -1063,10 +1042,6 @@ When using a Vim server, a # in the path causes an error message.
|
||||
Setting $HOME on MS-Windows is not very well documented. Suggestion by Ben
|
||||
Fritz (2011 Oct 27).
|
||||
|
||||
Bug: Windows 7 64 bit system freezes when 'clipboard' set to "unnamed" and
|
||||
doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011
|
||||
Jun 17)
|
||||
|
||||
When there is a ">" in a line that "gq" wraps to the start of the next line,
|
||||
then the following line will pick it up as a leader. Should get the leader
|
||||
from the first line, not a wrapped line. (Matt Ackeret, 2012 Feb 27)
|
||||
@@ -1146,12 +1121,6 @@ Is this needed? CTRL-O and CTRL-I do the same, just more difficult to use.
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9.
|
||||
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once
|
||||
after typing something.
|
||||
Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
Patch by Christian Brabandt, 2011 May 6.
|
||||
|
||||
Add event for when the text scrolls. A bit like CursorMoved. Also a similar
|
||||
one for insert mode. Use the event in matchparen to update the highlight if
|
||||
the match scrolls into view.
|
||||
@@ -1288,9 +1257,6 @@ setwinvar().
|
||||
|
||||
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
|
||||
When writing a file > 2Gbyte, the reported number of bytes is negative.
|
||||
(Antonio Colombo, 2010 Dec 18)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
@@ -1453,8 +1419,6 @@ Patch for GTK buttons X1Mouse and X2Mouse. (Christian J. Robinson, 2010 Aug 9)
|
||||
|
||||
Motif: Build on Ubuntu can't enter any text in dialog text fields.
|
||||
|
||||
When 'ft' changes redraw custom status line.
|
||||
|
||||
":tab split fname" doesn't set the alternate file in the original window,
|
||||
because win_valid() always returns FALSE. Below win_new_tabpage() in
|
||||
ex_docmd.c.
|
||||
@@ -1502,10 +1466,6 @@ perhaps. And undo CTRL-W. CTRL-G l would redo.
|
||||
|
||||
Diff mode out of sync. (Gary Johnson, 2010 Aug 4)
|
||||
|
||||
Support a 'systemencoding' option (for Unix). It specifies the encoding of
|
||||
file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian
|
||||
system when 'encoding' is "utf-8".
|
||||
|
||||
Win32 GUI: last message from startup doesn't show up when there is an echoerr
|
||||
command. (Cyril Slobin, 2009 Mar 13)
|
||||
|
||||
@@ -1550,9 +1510,6 @@ Sergey Khorev)
|
||||
Consider making YankRing or something else that keeps a list of yanked text
|
||||
part of standard Vim. The "1 to "9 registers are not sufficient.
|
||||
|
||||
netrw: dragging status line causes selection of entry. Should check row
|
||||
number to be below last visible line.
|
||||
|
||||
After doing "su" $HOME can be the old user's home, thus ~root/file is not
|
||||
correct. Don't use it in the swap file.
|
||||
|
||||
@@ -1623,8 +1580,6 @@ doesn't. (John Little, 2008 Nov 9)
|
||||
Shell expansion returns unexpanded string?
|
||||
Don't use shell when "~" is not at the start?
|
||||
|
||||
":unlet $VAR" doesn't work.
|
||||
|
||||
When using ":e ++enc=foo file" and the file is already loaded with
|
||||
'fileencoding' set to "bar", then do_ecmd() uses that buffer, even though the
|
||||
fileencoding differs. Reload the buffer in this situation? Need to check for
|
||||
@@ -1659,9 +1614,6 @@ command is not executed. Fix by Ian Kelling?
|
||||
":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim
|
||||
Chase) Fix by Ian Kelling, 2008 Jul 14.
|
||||
|
||||
Use "\U12345678" for 32 bit Unicode characters? (Tony Mechelynck, 2009
|
||||
Apr 6) Or use "\u(123456)", similar to Perl.
|
||||
|
||||
When mapping : to ; and ; to :, @; doesn't work like @: and @: doesn't work
|
||||
either. Matt Wozniski: nv_at() calls do_execreg() which uses
|
||||
put_in_typebuf(). Char mapped twice?
|
||||
@@ -1718,8 +1670,6 @@ Works OK when 'cmdheight' is 2.
|
||||
that the context can be taken into account. (Robert Webb)
|
||||
Patch by Christian Brabandt, 2013 May 31.
|
||||
|
||||
Test54 should not use shell commands. Make it portable.
|
||||
|
||||
The utf class table is missing some entries:
|
||||
0x2212, minus sign
|
||||
0x2217, star
|
||||
@@ -1928,8 +1878,6 @@ patches by Mathias, see mail Feb 22)
|
||||
Win32: compiling with normal features and OLE fails. Patch by Mathias
|
||||
Michaelis, 2006 Jun 4.
|
||||
|
||||
Win16: include patches to make Win16 version work. (Vince Negri, 2006 May 22)
|
||||
|
||||
Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis,
|
||||
2007 Feb 18)
|
||||
Patch by Alex Dobrynin, 2007 Jun 3. Also fixes other scroll wheel problems.
|
||||
@@ -1967,9 +1915,6 @@ F1 - F4 in an xterm produce a different escape sequence when used with a
|
||||
modifier key. Need to catch three different sequences. Use K_ZF1, like
|
||||
K_ZHOME? (Dickey, 2007 Dec 2)
|
||||
|
||||
UTF-8: mapping a multi-byte key where the second byte is 0x80 doesn't appear
|
||||
to work. (Tony Mechelynck, 2007 March 2)
|
||||
|
||||
In debug mode, using CTRL-R = to evaluate a function causes stepping through
|
||||
the function. (Hari Krishna Dara, 2006 Jun 28)
|
||||
|
||||
@@ -2074,15 +2019,6 @@ When showing a diff between a non-existent file and an existing one, with the
|
||||
cursor in the empty buffer, the other buffer only shows the last line. Change
|
||||
the "insert" into a change from one line to many? (Yakov Lerner, 2008 May 27)
|
||||
|
||||
Add autocommand for when a tabpage is being closed. Also for when a tab page
|
||||
has been created.
|
||||
|
||||
Using ":make" blocks Vim. Allow running one make in the background (if the
|
||||
shell supports it), catch errors in a file and update the error list on the
|
||||
fly. A bit like "!make > file&" and repeating ":cf file". ":bgmake",
|
||||
background make. ":bgcancel" interrupts it.
|
||||
A.Politz may work on this.
|
||||
|
||||
These two abbreviations don't give the same result:
|
||||
let asdfasdf = "xyz\<Left>"
|
||||
cabbr XXX <C-R>=asdfasdf<CR>
|
||||
@@ -2095,9 +2031,6 @@ In FileChangedShell command it's no longer allowed to switch to another
|
||||
buffer. But the changed buffer may differ from the current buffer, how to
|
||||
reload it then?
|
||||
|
||||
New syntax files for fstab and resolv from Radu Dineiu, David Necas did
|
||||
previous version.
|
||||
|
||||
For Aap: include a config.arg.example file with hints how to use config.arg.
|
||||
|
||||
Command line completion when 'cmdheight' is maximum and 'wildmenu' is set,
|
||||
@@ -2127,11 +2060,6 @@ start of the path is shown in the menu. Should move the menu to the right to
|
||||
show more text of the completions. Shorten the items that don't fit in the
|
||||
middle?
|
||||
|
||||
When running inside screen it's possible to kill the X server and restart it
|
||||
(using pty's the program can keep on running). Vim dies because it loses the
|
||||
connection to the X server. Can Vim simply quit using the X server instead of
|
||||
dying? Also relevant when running in a console.
|
||||
|
||||
Accessing file#var in a function should not need the g: prepended.
|
||||
|
||||
When exiting detects a modified buffer, instead of opening the buffer in the
|
||||
@@ -2166,10 +2094,6 @@ the cursor line. It works OK after some other commands.
|
||||
|
||||
Win32: Is it possible to have both postscript and Win32 printing?
|
||||
|
||||
Check: Running Vim in a console and still having connect to the X server for
|
||||
copy/paste: is stopping the X server handled gracefully? Should catch the X
|
||||
error and stop using the connection to the server.
|
||||
|
||||
Problem with 'cdpath' on MS-Windows when a directory is equal to $HOME. (2006
|
||||
Jul 26, Gary Johnson)
|
||||
|
||||
@@ -2206,30 +2130,11 @@ differently and unexpectedly. Caused by patch 7.2.398?
|
||||
The magic clipboard format "VimClipboard2" appears in several places. Should
|
||||
be only one.
|
||||
|
||||
"vim -C" often has 'nocompatible', because it's set somewhere in a startup
|
||||
script. Do "set compatible" after startup?
|
||||
|
||||
It's difficult to debug numbered functions (function in a Dictionary). Print
|
||||
the function name before resolving it to a number?
|
||||
let d = {}
|
||||
fun! d.foo()
|
||||
echo "here"
|
||||
endfun
|
||||
call d.foo(9)
|
||||
|
||||
Add a mark for the other end of the Visual area (VIsual pos). '< and '> are
|
||||
only set after Visual moded is ended.
|
||||
Also add a variable for the Visual mode. So that this mode and '< '> can be
|
||||
used to set what "gv" selects. (Ben Schmidt)
|
||||
|
||||
Win32, NTFS: When editing a specific infostream directly and 'backupcopy' is
|
||||
"auto" should detect this situation and work like 'backupcopy' is "yes". File
|
||||
name is something like "c:\path\foo.txt:bar", includes a colon. (Alex
|
||||
Jakushev, 2008 Feb 1)
|
||||
|
||||
printf() uses the field width in bytes. Can it be made character width,
|
||||
perhaps with a modifier? What does Posix say?
|
||||
|
||||
Small problem displaying diff filler line when opening windows with a script.
|
||||
(David Luyer, 2007 Mar 1 ~/Mail/oldmail/mool/in.15872 )
|
||||
|
||||
@@ -2250,8 +2155,6 @@ When completing from another file that uses a different encoding completion
|
||||
text has the wrong encoding. E.g., when 'encoding' is utf-8 and file is
|
||||
latin1. Example from Gombault Damien, 2007 Mar 24.
|
||||
|
||||
Is it possible to use "foo#var" instead of "g:foo#var" inside a function?
|
||||
|
||||
Syntax HL: When using "nextgroup" and the group has an empty match, there is
|
||||
no search at that position for another match. (Lukas Mai, 2008 April 11)
|
||||
|
||||
@@ -2312,8 +2215,6 @@ More patches:
|
||||
- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
|
||||
Needs a few tests.
|
||||
- Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3)
|
||||
- Argument for feedkeys() to prepend to typeahead (Yakov Lerner, 2006 Oct
|
||||
21)
|
||||
- Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs
|
||||
patch May 10)
|
||||
- Extra argument to strtrans() to translate special keys to their name (Eric
|
||||
@@ -2338,8 +2239,6 @@ More patches:
|
||||
Schmidt, 2008 Jul 22.
|
||||
- testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008
|
||||
Sep 13)
|
||||
- Patch for adding "space" item in 'listchars'. (Jérémie Roquet, 2009 Oct 29,
|
||||
Docs patch Oct 30, update David Burgin (glts) 2013 Aug 24, 2014 Oct 10)
|
||||
- Replace ccomplete.vim by cppcomplete.vim from www.vim.org? script 1520 by
|
||||
Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts
|
||||
more friendly for the Vim distribution.
|
||||
@@ -2362,8 +2261,6 @@ Awaiting updated patches:
|
||||
9 HTML indenting can be slow. Caused by using searchpair(). Can search()
|
||||
be used instead? A.Politz is looking into a solution.
|
||||
8 Win32: Add minidump generation. (George Reilly, 2006 Apr 24)
|
||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||
Aric Blumer has a patch for this. He will update the patch for 6.3.
|
||||
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
||||
Update 2004 Sep 6.
|
||||
How does this work? Missing comments.
|
||||
@@ -2464,8 +2361,6 @@ Vi incompatibility:
|
||||
the ":map" when it's used without arguments?
|
||||
7 CTRL-L is not the end of a section? It is for Posix! Make it an option.
|
||||
7 Implement 'prompt' option. Init to off when stdin is not a tty.
|
||||
7 CTRL-T in Insert mode inserts 'shiftwidth' of spaces at the cursor. Add a
|
||||
flag in 'cpoptions' for this.
|
||||
7 Add a way to send an email for a crashed edit session. Create a file when
|
||||
making changes (containing name of the swap file), delete it when writing
|
||||
the file. Supply a program that can check for crashed sessions (either
|
||||
@@ -2528,9 +2423,6 @@ Win32 GUI known bugs:
|
||||
7 When font smoothing is enabled, redrawing can become very slow. The reason
|
||||
appears to be drawing with a transparent background. Would it be possible
|
||||
to use an opaque background in most places?
|
||||
8 Use another default for 'termencoding': the active codepage. Means that
|
||||
when 'encoding' is changed typing characters still works properly.
|
||||
Alternative: use the Unicode functions to obtain typed characters.
|
||||
7 The cursor color indicating IME mode doesn't work properly. (Shizhu Pan,
|
||||
2004 May 9)
|
||||
8 Win32: When clicking on the gvim title bar, which gives it focus, produces
|
||||
@@ -2743,14 +2635,6 @@ Win32 console:
|
||||
backslashes. (Ronald Hoellwarth)
|
||||
|
||||
|
||||
Windows 95:
|
||||
8 Editing a file by its short file name and writing it, makes the long file
|
||||
name disappear. Setting 'backupcopy' helps.
|
||||
Use FindFirstFile()->cAlternateFileName in fname_case() (George Reilly).
|
||||
8 Doing wildcard expansion, will match the short filename, but result in the
|
||||
long filename (both DJGPP and Win32).
|
||||
|
||||
|
||||
Win32 console:
|
||||
9 When editing a file by its short file name, it should be expanded into its
|
||||
long file name, to avoid problems like these: (Mccollister)
|
||||
@@ -2774,9 +2658,6 @@ Win32 console:
|
||||
a Netware network drive. Use same function as for Win32 GUI?
|
||||
8 In os_win32.h, HAVE_STRICMP and HAVE_STRNICMP are defined only if __GNUC__
|
||||
is not defined. Shouldn't that be the other way around?
|
||||
7 Use SetConsoleCP() and SetConsoleOutputCP() to implement 'termencoding'?
|
||||
Avoids that input and output work differently. Need to be restored when
|
||||
exiting.
|
||||
|
||||
|
||||
Amiga:
|
||||
@@ -2879,9 +2760,6 @@ Macintosh:
|
||||
is currently fixed to use ".,:;!". Add an option to make this
|
||||
configurable?
|
||||
8 'hkmap' should probably be global-local.
|
||||
9 When "$" is in 'cpoptions' and folding is active, a "C" command changes
|
||||
the folds and resets w_lines_valid. The display updating doesn't work
|
||||
then. (Pritesh Mistry)
|
||||
8 Using ":s" in a function changes the previous replacement string. Save
|
||||
"old_sub" in save_search_patterns()?
|
||||
8 Should allow multi-byte characters for the delimiter: ":s+a+b+" where "+"
|
||||
@@ -2925,11 +2803,6 @@ Macintosh:
|
||||
- Be able to print a window in diff mode.
|
||||
- Be able to specify a colorscheme to use for printing. And a separate
|
||||
one for B&W printing (if that can be detected).
|
||||
8 In Visual block mode with 'lbr' set, a change command doesn't insert the
|
||||
text in following lines where the linebreak changes.
|
||||
9 dosinst.c: The DJGPP version can't uninstall the Uninstall registry key on
|
||||
Windows NT. How to install a .inf file on Windows NT and how to detect
|
||||
that Windows NT is being used?
|
||||
8 When 'virtualedit' is "block,insert" and encoding is "utf-8", selecting a
|
||||
block of one double-wide character, then "d" deletes only half of it.
|
||||
8 When 'virtualedit' is set, should "I" in blockwise visual mode also insert
|
||||
@@ -2986,8 +2859,6 @@ Macintosh:
|
||||
(e.g., ":w").
|
||||
8 CTRL-A can't handle big "long" numbers, they become negative. Check for
|
||||
"-" character, if not present, use unsigned long.
|
||||
8 Make it possible to disable the special meaning of "#" in the first column
|
||||
for ">>".
|
||||
8 Add suspending with CTRL-Z at the "more" prompt, and when executing a long
|
||||
script in do_cmdline().
|
||||
8 When using 'hidden', many swap files will be open. When Vim runs into the
|
||||
@@ -3109,11 +2980,6 @@ Problems that will (probably) not be solved:
|
||||
- Amiga: The ":cq" command does not always abort the Manx compiler. Why?
|
||||
- Linux: A file with protection r--rw-rw- is seen readonly for others. The
|
||||
access() function in GNU libc is probably wrong.
|
||||
- MSDOS: When using smartdrive with write-back buffering, writing to a
|
||||
readonly floppy will cause problems. How to test for a writable floppy
|
||||
first?
|
||||
- MSDOS: Both 16 and 32 bit versions: File name expansion doesn't work for
|
||||
names that start with a dot. These used to be illegal file names.
|
||||
- When doing a CTRL-Z and typing a command for the shell, while Vim is busy
|
||||
(e.g. writing a file), the command for the shell is sometimes eaten by Vim,
|
||||
because the terminal mode is changed from RAW to CBREAK.
|
||||
@@ -3224,7 +3090,6 @@ Documentation:
|
||||
8 List of options should mention whether environment variables are expanded
|
||||
or not.
|
||||
8 Extend usr_27.txt a bit. (Adam Seyfarth)
|
||||
7 Add a section on debugging scripts in the user manual.
|
||||
9 Make the Reference Manual more precise. For each command mention:
|
||||
- change to cursor position and curswant
|
||||
- if it can be undone (u/CTRL-R) and redone (.)
|
||||
@@ -3250,7 +3115,6 @@ Help:
|
||||
- When a help item has multiple matches make it possible to use ":tn" to go
|
||||
to the other matches.
|
||||
- Support a way to view (and edit) .info files.
|
||||
- Default mapping for help files: <Tab> to position cursor on next |:tag|.
|
||||
- Implement a "sticky" help window, some help text lines that are always
|
||||
displayed in a window with fixed height. (Guckes) Use "~/.vimhelp" file,
|
||||
user can edit it to insert his favorite commands, new account can contain a
|
||||
@@ -3274,20 +3138,12 @@ User Friendlier:
|
||||
$HOME/_vimrc, etc.) and add "edit vimrc" to the File menu.
|
||||
- Add a way to save local settings and mappings into a new plugin file.
|
||||
":mkplugin <file>"?
|
||||
8 Add ":plugininstall" command. Can be used to install a plugin file that
|
||||
includes documentation. Let the user select a directory from
|
||||
'runtimepath'.
|
||||
" Vim plugin
|
||||
<main plugin code>
|
||||
" >>> plugin help start <<<
|
||||
<plugin docs>
|
||||
- Add mappings local to a window: ":map <window> ..."?
|
||||
9 Add buffer-local menu. Should offer a choice between removing the menu or
|
||||
disabling it. Be careful that tear-offs don't disappear (keep one empty
|
||||
item?).
|
||||
Alternative: use BufEnter and BufLeave autocommands.
|
||||
8 make a vimtutor script for Amiga and other systems.
|
||||
7 Add the arguments for configure to the ":version" output?
|
||||
7 When Vim detects a file is being edited elsewhere and it's a gvim session
|
||||
of the same user it should offer a "Raise" button, so that the other gvim
|
||||
window can be displayed. (Eduard)
|
||||
@@ -3306,7 +3162,6 @@ Tab pages:
|
||||
7 :tabdup duplicate the tab with all its windows.
|
||||
7 Option to put tab line at the left or right? Need an option to specify
|
||||
its width. It's like a separate window with ":tabs" output.
|
||||
7 Add local variables for each tab page?
|
||||
8 Add local options for each tab page? E.g., 'diffopt' could differ between
|
||||
tab pages.
|
||||
7 Add local highlighting for each tab page?
|
||||
@@ -3410,15 +3265,8 @@ Diff mode:
|
||||
9 Instead invoking an external diff program, use builtin code. One can be
|
||||
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
|
||||
It's quite big and badly documented though.
|
||||
8 Use diff mode to show the changes made in a buffer (compared to the file).
|
||||
Use an unnamed buffer, like doing:
|
||||
new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
|
||||
Also show difference with the file when editing started? Should show what
|
||||
8 Also show difference with the file when editing started? Should show what
|
||||
can be undone. (Tom Popovich)
|
||||
7 Add cursor-binding: when moving the cursor in one diff'ed buffer, also
|
||||
move it in other diff'ed buffers, so that CTRL-W commands go to the same
|
||||
location.
|
||||
|
||||
|
||||
Folding:
|
||||
(commands still available: zI zJ zK zp zP zq zQ zV zy zY;
|
||||
@@ -3426,8 +3274,6 @@ Folding:
|
||||
8 Vertical folds: looks like vertically split windows, but the cursor moves
|
||||
through the vertical separator, separator moves when scrolling.
|
||||
8 Add "z/" and "z?" for searching in not folded text only.
|
||||
9 Add search pattern item to only match in closed or open fold and/or fold
|
||||
with certain level. Allows doing ":g/pat/cmd" to work on closed folds.
|
||||
8 When a closed fold is displayed open because of 'foldminlines', the
|
||||
behavior of commands is still like the fold is closed. How to make the
|
||||
user aware of this?
|
||||
@@ -3458,9 +3304,6 @@ Folding:
|
||||
- 'foldmethod' "syntax": "fold=3" argument: set fold level for a region or
|
||||
match.
|
||||
- Apply a new foldlevel to a range of lines. (Steve Litt)
|
||||
8 Have some way to restrict commands to not folded text. Also commands like
|
||||
searches.
|
||||
|
||||
|
||||
Multi-byte characters:
|
||||
- When editing a file with both utf-8 and latin1 text Vim always falls back
|
||||
@@ -3652,9 +3495,6 @@ Syntax highlighting:
|
||||
8 When using a regexp for "contains=", should delay matching with it until
|
||||
redrawing happens. Set a flag when a group is added, check this flag when
|
||||
highlighting starts.
|
||||
8 Some terminals can display colors like the GUI. Add some setting to use
|
||||
GUI colors for the terminal? With something to define the escape
|
||||
sequence.
|
||||
7 It's possible for an item to be transparent, so that the colors of an item
|
||||
lower on the stack is used. Also do this with highlighting, so that the
|
||||
user can set transparent highlighting? E.g. a number in a C comment would
|
||||
@@ -3860,9 +3700,6 @@ Performance:
|
||||
so that we don't need to make a copy? Or avoid invoking ml_updatechunk(),
|
||||
that is taking a lot of time. (Ralf Wildenhues, 2008 Jul 7)
|
||||
With a patch, but does it work?
|
||||
8 Instead of loading rgb.txt every time a color wasn't recognized load it
|
||||
once and keep it in memory. Move the code to a common place to avoid
|
||||
repeating it in various system files.
|
||||
8 Turn b_syn_ic and b_syn_containedin into b_syn_flags.
|
||||
9 Loading menu.vim still takes quite a bit of time. How to make it faster?
|
||||
8 in_id_list() takes much time for syntax highlighting. Cache the result?
|
||||
@@ -3887,7 +3724,6 @@ Performance:
|
||||
http://www.theregister.co.uk/content/4/22908.html. (Andre Pang)
|
||||
7 Check how performance of loading the wordlist can be improved (adding a
|
||||
lot of abbreviations).
|
||||
7 MS-DOS console: Add t_DL support, to make scrolling faster.
|
||||
7 Compile Ex commands to byte codes. Store byte codes in a vim script file
|
||||
at the end, after "compiled:. Make it look like a single comment line
|
||||
for old Vim versions. Insert first line "Vim script compiled <timestamp>.
|
||||
@@ -4012,8 +3848,6 @@ Screen updating:
|
||||
8 Add a ":refresh [winnr]" command, to force updating a window. Useful from
|
||||
an event handler where ":normal" can't be used. Also useful when
|
||||
'lazyredraw' is set in a mapping.
|
||||
7 Make 'list' and 'linebreak' work together.
|
||||
|
||||
|
||||
Scrolling:
|
||||
8 Add "zy" command: scroll horizontally to put the cursor in the middle.
|
||||
@@ -4197,8 +4031,6 @@ GUI:
|
||||
use them again? Otherwise, allow disabling allocating the default colors.
|
||||
Or allocate an own colormap (check UAE). With an option to use it. For
|
||||
the commandline, "-install" is mostly used for X11 programs.
|
||||
7 Add command line argument for "gvim" not to start the GUI. Sort of the
|
||||
inverse of "vim -g". (Vikas)
|
||||
7 Should support multi-column menus.
|
||||
- Should add option for where to put the "Help" menu: like Motif at the far
|
||||
right, or with the other menus (but still at the right).
|
||||
@@ -4499,7 +4331,6 @@ Insert mode:
|
||||
7 Use CTRL-G <count> to repeat what follows. Useful for inserting a
|
||||
character multiple times or repeating CTRL-Y.
|
||||
- Make 'revins' work in Replace mode.
|
||||
9 Can't use multi-byte characters for 'matchpairs'.
|
||||
7 Use 'matchpairs' for 'showmatch': When inserting a character check if it
|
||||
appears in the rhs of 'matchpairs'.
|
||||
- In Insert mode (and command line editing?): Allow undo of the last typed
|
||||
@@ -4641,8 +4472,6 @@ Text objects:
|
||||
use "aq" and "iq". Use 'quotepairs' to define pairs of quotes, like
|
||||
'matchpairs'?
|
||||
8 Add text object for any kind of parens, also multi-byte ones.
|
||||
7 Add text object for current search pattern: "a/" and "i/". Makes it
|
||||
possible to turn text highlighted for 'hlsearch' into a Visual area.
|
||||
8 Add a way to make an ":omap" for a user-defined text object. Requires
|
||||
changing the starting position in oap->start.
|
||||
8 Add "gp" and "gP" commands: insert text and make sure there is a single
|
||||
@@ -4699,8 +4528,6 @@ Visual mode:
|
||||
receive dropped text from another program. (Ben Godfrey)
|
||||
7 With blockwise Visual mode and "c", "C", "I", "A", etc., allow the use of
|
||||
a <CR>. The entered lines are repeated over the Visual area.
|
||||
7 CTRL-V :s should substitute only in the block, not to whole lines. (David
|
||||
Young is working on this)
|
||||
7 Filtering a block should only apply to the block, not to the whole lines.
|
||||
When the number of lines is increased, add lines. When decreased, pad with
|
||||
spaces or delete? Use ":`<,`>" on the command line.
|
||||
@@ -4730,8 +4557,6 @@ Visual mode:
|
||||
|
||||
More advanced repeating commands:
|
||||
- Add "." command for visual mode: redo last visual command (e.g. ":fmt").
|
||||
7 Repeating "d:{cmd}" with "." doesn't work. (Benji Fisher) Somehow remember
|
||||
the command line so that it can be repeated?
|
||||
- Add command to repeat last movement. Including count.
|
||||
- Add "." command after operator: repeat last command of same operator. E.g.
|
||||
"c." will repeat last change, also when "x" used since then (Webb).
|
||||
@@ -4760,9 +4585,6 @@ Mappings and Abbreviations:
|
||||
not the <Space>.
|
||||
8 Give a warning when using CTRL-C in the lhs of a mapping. It will never
|
||||
(?) work.
|
||||
8 Add a way to save a current mapping and restore it later. Use a function
|
||||
that returns the mapping command to restore it: mapcmd()? mapcheck() is
|
||||
not fool proof. How to handle ambiguous mappings?
|
||||
7 Add <0x8f> (hex), <033> (octal) and <123> (decimal) to <> notation?
|
||||
7 When someone tries to unmap with a trailing space, and it fails, try
|
||||
unmapping without the trailing space. Helps for ":unmap xx | unmap yy".
|
||||
@@ -4815,8 +4637,6 @@ Incsearch:
|
||||
cases, saves a lot of time in big files. (Slootman wants to work on this?)
|
||||
When not using special characters, can continue search from the last match
|
||||
(or not at all, when there was no match). See oldmail/webb/in.872.
|
||||
- With incsearch, use CTRL-N/CTRL-P to go to next/previous match, some other
|
||||
key to copy matched word to search pattern (Alexander Schmid).
|
||||
|
||||
|
||||
Searching:
|
||||
@@ -4840,9 +4660,6 @@ Searching:
|
||||
8 Show the progress every second. Could use the code that checks for CTRL-C
|
||||
to find out how much time has passed. Or use SIGALRM. Where to show the
|
||||
number?
|
||||
8 When using an expression for ":s", set the match position in a v:
|
||||
variable. So that you can do ":%s/^/\=v:lnum/" to put a line number
|
||||
before each line.
|
||||
7 Support for approximate-regexps to find similar words (agrep
|
||||
http://www.tgries.de/agrep/ tre: http://laurikari.net/tre/index.html).
|
||||
8 Add an item for a big character range, so that one can search for a
|
||||
@@ -4851,8 +4668,6 @@ Searching:
|
||||
the stack if previous atom matched". Other side is "match with top of
|
||||
stack, pop it when it matches". Use "\@pX" and "\@m"?
|
||||
Example: \((\@p).\{-}\@m\)*
|
||||
7 Add an option to accept a match at the cursor position. Also for
|
||||
search(). (Brett)
|
||||
7 Add a flag to "/pat/" to discard an error. Useful to continue a mapping
|
||||
when a search fails. Could be "/pat/E" (e is already used for end offset).
|
||||
7 Add pattern item to use properties of Unicode characters. In Perl it's
|
||||
@@ -4956,9 +4771,6 @@ Undo:
|
||||
when tests fail after making changes and you forgot in which files.
|
||||
9 After undo/redo, in the message show whether the buffer is modified or
|
||||
not.
|
||||
8 Use timestamps for undo, so that a version a certain time ago can be found
|
||||
and info before some time/date can be flushed. 'undopersist' gives maximum
|
||||
time to keep undo: "3h", "1d", "2w", "1y", etc.
|
||||
8 Search for pattern in undo tree, showing when it happened and the text
|
||||
state, so that you can jump to it.
|
||||
8 Undo tree: visually show the tree somehow (Damian Conway)
|
||||
@@ -4966,13 +4778,6 @@ Undo:
|
||||
timestamp?
|
||||
Put branch with most recent change on the left, older changes get more
|
||||
indent?
|
||||
8 See ":e" as a change operation, find the changes and add them to the
|
||||
undo info. Also be able to undo the "Reload file" choice for when a file
|
||||
was changed outside of Vim.
|
||||
Would require doing a diff between the buffer text and the file and
|
||||
storing the differences.
|
||||
Alternative: before reloading a buffer, store it somewhere. Keep a list
|
||||
of about 10 last reloaded buffers.
|
||||
- Make it possible to undo all the commands from a mapping, including a
|
||||
trailing unfinished command, e.g. for ":map K iX^[r".
|
||||
- When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not
|
||||
@@ -5024,8 +4829,6 @@ Buffer list:
|
||||
7 Add expansion of buffer names, so that "*.c" is expanded to all buffer
|
||||
names. Needed for ":bdel *.c", ":bunload *.c", etc.
|
||||
8 Support for <afile> where a buffer name is expected.
|
||||
8 Some commands don't use line numbers, but buffer numbers. '$'
|
||||
should then mean the number of the last buffer. E.g.: "4,$bdel".
|
||||
7 Add an option to mostly use slashes in file names. Separately for
|
||||
internal use and for when executing an external program?
|
||||
8 Some file systems are case-sensitive, some are not. Besides
|
||||
@@ -5345,11 +5148,6 @@ Various improvements:
|
||||
7 Allow a window not to have a statusline. Makes it possible to use a
|
||||
window as a buffer-tab selection.
|
||||
8 Allow non-active windows to have a different statusline. (Yakov Lerner)
|
||||
7 Support using ":vert" with User commands. Add expandable items <vert>.
|
||||
Do the same for ":browse" and ":confirm"?
|
||||
For ":silent" and ":debug" apply to the whole user command.
|
||||
More general: need a way to access command modifiers in a user command.
|
||||
Assign them to a v: variable?
|
||||
7 Add an invisible buffer which can be edited. For use in scripts that want
|
||||
to manipulate text without changing the window layout.
|
||||
8 Add a command to revert to the saved version of file; undo or redo until
|
||||
@@ -5399,10 +5197,6 @@ Various improvements:
|
||||
non-unix systems. Perhaps let configure define CONF_XXX, and use #ifdef
|
||||
CONF_XXX in feature.h? Then what should min-features and max-features do?
|
||||
8 Add "g^E" and "g^Y", to scroll a screen-full line up and down.
|
||||
6 Add ":timer" command, to set a command to be executed at a certain
|
||||
interval, or once after some time has elapsed. (Aaron)
|
||||
Perhaps an autocommand event like CursorHold is better?
|
||||
Patch to add async functionality. (Geoff Greer, 2013 Sep 1 and later)
|
||||
8 Add ":confirm" handling in open_exfile(), for when file already exists.
|
||||
8 When quitting with changed files, make the dialog list the changed file
|
||||
and allow "write all", "discard all", "write some". The last one would
|
||||
@@ -5638,7 +5432,6 @@ Various improvements:
|
||||
gives read errors. Check protection before opening.
|
||||
- When writing check for file exists but no permission, "Permission denied".
|
||||
- If file does not exist, check if directory exists.
|
||||
- MSDOS: although t_cv and t_ci are not set, do invert char under cursor.
|
||||
- Settings edit mode: make file with ":set opt=xx", edit it, parse it as ex
|
||||
commands.
|
||||
- ":set -w all": list one option per line.
|
||||
@@ -5673,10 +5466,7 @@ Various improvements:
|
||||
instead of CTRL-R to make repeating possible. (Marinichev)
|
||||
- Add "^Vb" on the command line, replace with word before or under the
|
||||
cursor?
|
||||
- Option to make a .swp file only when a change is made (Templeton).
|
||||
- Support mapping for replace mode and "r" command (Vi doesn't do this)?
|
||||
5 Add 'ignorefilecase' option: Ignore case when expanding file names.
|
||||
":e ma<Tab>" would also find "Makefile" on Unix.
|
||||
8 Sorting of filenames for completion is wrong on systems that ignore
|
||||
case of filenames. Add 'ignorefncase' option. When set, case in
|
||||
filenames is ignored for sorting them. Patch by Mike Williams:
|
||||
@@ -5745,11 +5535,6 @@ Far future and "big" extensions:
|
||||
- Add open mode, use it when terminal has no cursor positioning.
|
||||
- Special "drawing mode": a line is drawn where the cursor is moved to.
|
||||
Backspace deletes along the line (from jvim).
|
||||
- Implement ":Bset", set option in all buffers. Also ":Wset", set in all
|
||||
windows, ":Aset, set in all arguments and ":Tset", set in all files
|
||||
mentioned in the tags file.
|
||||
Add buffer/arg range, like in ":2,5B%s/..." (do we really need this???)
|
||||
Add search string: "B/*.c/%s/.."? Or ":F/*.c/%s/.."?
|
||||
- Support for underlining (underscore-BS-char), bold (char-BS-char) and other
|
||||
standout modes switched on/off with , 'overstrike' option (Reiter).
|
||||
- Add vertical mode (Paul Jury, Demirel): "5vdw" deletes a word in five
|
||||
@@ -5765,8 +5550,5 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
When using "do" or ":diffget" in a buffer with changes in every line an extra
|
||||
empty line would appear.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
|
||||
+22
-21
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -159,7 +159,7 @@ Many functions and commands have been added to support the new types.
|
||||
On some systems the numbers used in Vim script are now 64 bit. This can be
|
||||
checked with the |+num64| feature.
|
||||
|
||||
Many items were added so support |new-style-testing|.
|
||||
Many items were added to support |new-style-testing|.
|
||||
|
||||
printf() now accepts any type of argument for %s. It is converted to a string
|
||||
like with string().
|
||||
@@ -1031,7 +1031,7 @@ Files: src/configure.in, src/auto/configure
|
||||
|
||||
Patch 7.4.095 (after 7.4.093)
|
||||
Problem: Regexp for LuaJIT version doesn't work on BSD.
|
||||
Solution: Use "*" instead of "\+" and "\?". (Ozaki)
|
||||
Solution: Use "*" instead of "\+" and "\?". (Ozaki Kiichi)
|
||||
Files: src/configure.in, src/auto/configure
|
||||
|
||||
Patch 7.4.096
|
||||
@@ -1750,7 +1750,7 @@ Files: src/Makefile
|
||||
|
||||
Patch 7.4.218
|
||||
Problem: It's not easy to remove duplicates from a list.
|
||||
Solution: Add the uniq() function. (LCD)
|
||||
Solution: Add the uniq() function. (Lcd)
|
||||
Files: runtime/doc/change.txt, runtime/doc/eval.txt,
|
||||
runtime/doc/usr_41.txt, runtime/doc/version7.txt, src/eval.c,
|
||||
src/testdir/test55.in, src/testdir/test55.ok
|
||||
@@ -4311,7 +4311,7 @@ Files: src/misc2.c
|
||||
|
||||
Patch 7.4.650
|
||||
Problem: Configure check may fail because the dl library is not used.
|
||||
Solution: Put "-ldl" in LIBS rather than LDFLAGS. (Oazki Kiichi)
|
||||
Solution: Put "-ldl" in LIBS rather than LDFLAGS. (Ozaki Kiichi)
|
||||
Files: src/configure.in, src/auto/configure
|
||||
|
||||
Patch 7.4.651 (after 7.4.582)
|
||||
@@ -4903,7 +4903,7 @@ Solution: Make the buffer larger. (Kazunobu Kuriyama)
|
||||
Files: src/eval.c
|
||||
|
||||
Patch 7.4.749 (after 7.4.741)
|
||||
Problem: For some options two consecutive commas are OK. (Nikolay Pavlov)
|
||||
Problem: For some options two consecutive commas are OK. (Nikolai Pavlov)
|
||||
Solution: Add the P_ONECOMMA flag.
|
||||
Files: src/option.c
|
||||
|
||||
@@ -6969,7 +6969,7 @@ Files: src/Make_mvc.mak, src/GvimExt/Makefile
|
||||
|
||||
Patch 7.4.1096
|
||||
Problem: Need several lines to verify a command produces an error.
|
||||
Solution: Add assert_fails(). (suggested by Nikolay Pavlov)
|
||||
Solution: Add assert_fails(). (suggested by Nikolai Pavlov)
|
||||
Make the quickfix alloc test actually work.
|
||||
Files: src/testdir/test_quickfix.vim, src/eval.c, runtime/doc/eval.txt,
|
||||
src/misc2.c, src/alloc.h
|
||||
@@ -7432,7 +7432,7 @@ Files: src/mbyte.c, src/os_win32.c
|
||||
|
||||
Patch 7.4.1166
|
||||
Problem: Can't encode a Funcref into JSON. jsonencode() doesn't handle the
|
||||
same list or dict twice properly. (Nikolay Pavlov)
|
||||
same list or dict twice properly. (Nikolai Pavlov)
|
||||
Solution: Give an error. Reset copyID when the list or dict is finished.
|
||||
Files: src/json.c, src/proto/json.pro, src/testdir/test_json.vim
|
||||
|
||||
@@ -7442,7 +7442,7 @@ Solution: Add tests.
|
||||
Files: src/testdir/test_viml.vim
|
||||
|
||||
Patch 7.4.1168
|
||||
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay
|
||||
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolai
|
||||
Pavlov)
|
||||
Solution: Make the string "v:true" instead of "true".
|
||||
Files: src/eval.c, src/testdir/test_viml.vim
|
||||
@@ -7993,7 +7993,7 @@ Files: src/testdir/test_channel.vim
|
||||
|
||||
Patch 7.4.1258
|
||||
Problem: The channel test can fail if messages arrive later.
|
||||
Solution: Add a short sleep. (Jun T.)
|
||||
Solution: Add a short sleep. (Jun Takimoto)
|
||||
Files: src/testdir/test_channel.vim
|
||||
|
||||
Patch 7.4.1259
|
||||
@@ -8848,8 +8848,8 @@ Files: src/channel.c, src/gui_w32.c, src/os_win32.c, src/structs.h,
|
||||
|
||||
Patch 7.4.1405
|
||||
Problem: Completion menu flickers.
|
||||
Solution: Delay showing the popup menu. (Shougo, Justin M. Keyes, closes
|
||||
#656)
|
||||
Solution: Delay showing the popup menu. (Shougo Matsu, Justin M. Keyes,
|
||||
closes #656)
|
||||
Files: src/edit.c
|
||||
|
||||
Patch 7.4.1406
|
||||
@@ -9372,7 +9372,7 @@ Solution: Handle blinking differently. (Kazunobu Kuriyama)
|
||||
Files: src/gui_gtk_x11.c
|
||||
|
||||
Patch 7.4.1498
|
||||
Problem: Error for locked item when using json_decode(). (Shougo)
|
||||
Problem: Error for locked item when using json_decode(). (Shougo Matsu)
|
||||
Solution: Initialize v_lock.
|
||||
Files: src/json.c
|
||||
|
||||
@@ -9775,7 +9775,7 @@ Files: src/testdir/Make_all.mak, src/testdir/test106.in,
|
||||
|
||||
Patch 7.4.1570
|
||||
Problem: There is no way to avoid the message when editing a file.
|
||||
Solution: Add the "F" flag to 'shortmess'. (Shougo, closes #686)
|
||||
Solution: Add the "F" flag to 'shortmess'. (Shougo Matsu, closes #686)
|
||||
Files: runtime/doc/options.txt, src/buffer.c, src/ex_cmds.c,
|
||||
src/option.h
|
||||
|
||||
@@ -10793,7 +10793,7 @@ Files: src/if_py_both.h
|
||||
|
||||
Patch 7.4.1744
|
||||
Problem: Python: Converting a sequence may leak memory.
|
||||
Solution: Decrement a reference. (Nikolay Pavlov)
|
||||
Solution: Decrement a reference. (Nikolai Pavlov)
|
||||
Files: src/if_py_both.h
|
||||
|
||||
Patch 7.4.1745
|
||||
@@ -10866,7 +10866,8 @@ Files: src/option.c, src/testdir/test_alot.vim,
|
||||
Patch 7.4.1757
|
||||
Problem: When using complete() it may set 'modified' even though nothing
|
||||
was inserted.
|
||||
Solution: Use Down/Up instead of Next/Previous match. (Shougo, closes #745)
|
||||
Solution: Use Down/Up instead of Next/Previous match. (Shougo Matsu, closes
|
||||
#745)
|
||||
Files: src/edit.c
|
||||
|
||||
Patch 7.4.1758
|
||||
@@ -11392,7 +11393,7 @@ Solution: Check if ch_to_be_closed is set.
|
||||
Files: src/channel.c
|
||||
|
||||
Patch 7.4.1850
|
||||
Problem: GUI freezes when using a job. (Shougo)
|
||||
Problem: GUI freezes when using a job. (Shougo Matsu)
|
||||
Solution: Unregister the channel when there is an input error.
|
||||
Files: src/channel.c
|
||||
|
||||
@@ -12354,12 +12355,12 @@ Files: src/testdir/test_cmdline.vim
|
||||
|
||||
Patch 7.4.2013
|
||||
Problem: Using "noinsert" in 'completeopt' breaks redo.
|
||||
Solution: Set compl_curr_match. (Shougo, closes #874)
|
||||
Solution: Set compl_curr_match. (Shougo Matsu, closes #874)
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 7.4.2014
|
||||
Problem: Using "noinsert" in 'completeopt' does not insert match.
|
||||
Solution: Set compl_enter_selects. (Shougo, closes #875)
|
||||
Solution: Set compl_enter_selects. (Shougo Matsu, closes #875)
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 7.4.2015
|
||||
@@ -14279,7 +14280,7 @@ Solution: Make close_buffer() go back to the right window.
|
||||
Files: src/buffer.c, src/testdir/test_autocmd.vim
|
||||
|
||||
Patch 7.4.2329
|
||||
Problem: Error for min() and max() contains %s. (Nikolay Pavlov)
|
||||
Problem: Error for min() and max() contains %s. (Nikolai Pavlov)
|
||||
Solution: Pass the function name. (closes #1040)
|
||||
Files: src/evalfunc.c, src/testdir/test_expr.vim
|
||||
|
||||
@@ -14405,7 +14406,7 @@ Solution: Don't access curwin when exiting.
|
||||
Files: src/buffer.c
|
||||
|
||||
Patch 7.4.2349
|
||||
Problem: Valgrind reports using uninitialzed memory. (Dominique Pelle)
|
||||
Problem: Valgrind reports using uninitialized memory. (Dominique Pelle)
|
||||
Solution: Check the length before checking for a NUL.
|
||||
Files: src/message.c
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Aug 26
|
||||
" Last Change: 2016 Sep 22
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -676,6 +676,9 @@ au BufNewFile,BufRead *.dts,*.dtsi setf dts
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo)
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
|
||||
|
||||
" EditorConfig (close enough to dosini)
|
||||
au BufNewFile,BufRead .editorconfig setf dosini
|
||||
|
||||
" Embedix Component Description
|
||||
au BufNewFile,BufRead *.ecd setf ecd
|
||||
|
||||
@@ -806,6 +809,10 @@ au BufNewFile,BufRead *.gp,.gprc setf gp
|
||||
au BufNewFile,BufRead */.gnupg/options setf gpg
|
||||
au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
|
||||
au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg
|
||||
if !empty($GNUPGHOME)
|
||||
au BufNewFile,BufRead $GNUPGHOME/options setf gpg
|
||||
au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg
|
||||
endif
|
||||
|
||||
" gnash(1) configuration files
|
||||
au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
|
||||
|
||||
+59
-5
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: MetaFont
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: METAFONT
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 1
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,9 +12,62 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
let b:undo_ftplugin = "setl com< cms< fo< sua< inc< def< ofu<"
|
||||
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
|
||||
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=cjroql2
|
||||
setlocal suffixesadd=.mf
|
||||
let &l:include = '\<input\>'
|
||||
let &l:define = '\<\%(let\|newinternal\|interim\|def\|vardef\)\>\|\<\%(primary\|secondary\|tertiary\)def\>\s*[^ .]\+'
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
let g:omni_syntax_group_include_mf = 'mf\w\+'
|
||||
let g:omni_syntax_group_exclude_mf = 'mfTodoComment'
|
||||
|
||||
let s:mp_regex = {
|
||||
\ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|beginchar\|beginlogochar\)\>',
|
||||
\ 'endsection' : '^\s*\%(enddef\|endchar\|endlogochar\)\>',
|
||||
\ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>',
|
||||
\ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>'
|
||||
\ }
|
||||
|
||||
function! s:move_around(count, what, flags, visual)
|
||||
if a:visual
|
||||
exe "normal! gv"
|
||||
endif
|
||||
call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark
|
||||
for i in range(2, a:count)
|
||||
call search(s:mp_regex[a:what], a:flags)
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
" Move around macros.
|
||||
nnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:false) <CR>
|
||||
vnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:true) <CR>
|
||||
nnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:false) <CR>
|
||||
vnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:true) <CR>
|
||||
nnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:false) <CR>
|
||||
vnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:true) <CR>
|
||||
nnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:false) <CR>
|
||||
vnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:true) <CR>
|
||||
nnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:false) <CR>
|
||||
vnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:true) <CR>
|
||||
nnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:false) <CR>
|
||||
vnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:true) <CR>
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<if\>:\<else\%[if]\>:\<fi\>,' .
|
||||
\ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' .
|
||||
\ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' .
|
||||
\ '\<begingroup\>:\<endgroup\>,' .
|
||||
\ '\<beginchar\>:\<endchar\>' .
|
||||
\ '\<beginlogochar\>:\<endlogochar\>'
|
||||
" Ignore comments and strings
|
||||
let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
|
||||
\ =~# "mf\\(Comment\\|String\\)$"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
+62
-5
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 1
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,9 +12,16 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
let b:undo_ftplugin = "setl com< cms< fo< sua< inc< def< ofu<"
|
||||
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
|
||||
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=cjroql2
|
||||
setlocal suffixesadd=.mp,.mpiv
|
||||
let &l:include = '\<\%(input\|loadmodule\)\>' " loadmodule is in MetaFun
|
||||
let &l:define = '\<\%(let\|newinternal\|interim\|def\|vardef\)\>\|\<\%(primary\|secondary\|tertiary\)def\>\s*[^ .]\+'
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
let g:omni_syntax_group_include_mp = 'mf\w\+,mp\w\+'
|
||||
let g:omni_syntax_group_exclude_mp = 'mfTodoComment'
|
||||
|
||||
if exists(":FixBeginfigs") != 2
|
||||
command -nargs=0 FixBeginfigs call s:fix_beginfigs()
|
||||
@@ -24,5 +32,54 @@ if exists(":FixBeginfigs") != 2
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:mp_regex = {
|
||||
\ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|begin\%(fig\|char\|logochar\|glyph\|graph\)\)\>',
|
||||
\ 'endsection' : '^\s*\%(enddef\|end\%(fig\|char\|logochar\|glyph\|graph\)\)\>',
|
||||
\ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>',
|
||||
\ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>'
|
||||
\ }
|
||||
|
||||
function! s:move_around(count, what, flags, visual)
|
||||
if a:visual
|
||||
exe "normal! gv"
|
||||
endif
|
||||
call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark
|
||||
for i in range(2, a:count)
|
||||
call search(s:mp_regex[a:what], a:flags)
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
" Move around macros.
|
||||
nnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:false) <CR>
|
||||
vnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:true) <CR>
|
||||
nnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:false) <CR>
|
||||
vnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:true) <CR>
|
||||
nnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:false) <CR>
|
||||
vnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:true) <CR>
|
||||
nnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:false) <CR>
|
||||
vnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:true) <CR>
|
||||
nnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:false) <CR>
|
||||
vnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:true) <CR>
|
||||
nnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:false) <CR>
|
||||
vnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:true) <CR>
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<if\>:\<else\%[if]\>:\<fi\>,' .
|
||||
\ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' .
|
||||
\ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' .
|
||||
\ '\<beginfig\>:\<endfig\>,' .
|
||||
\ '\<begingroup\>:\<endgroup\>,' .
|
||||
\ '\<beginchar\>:\<endchar\>' .
|
||||
\ '\<beginlogochar\>:\<endlogochar\>' .
|
||||
\ '\<beginglyph\>:\<endglyph\>' .
|
||||
\ '\<begingraph\>:\<endgraph\>'
|
||||
" Ignore comments and strings
|
||||
let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
|
||||
\ =~# "^mf\\%(Comment\\|String\\|\\)$\\|^mpTeXinsert$"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -16,7 +16,7 @@ if exists("*CdlGetIndent")
|
||||
"finish
|
||||
endif
|
||||
|
||||
" find out if an "...=..." expresion its an asignment (or a conditional)
|
||||
" find out if an "...=..." expresion is an assignment (or a conditional)
|
||||
" it scans 'line' first, and then the previos lines
|
||||
fun! CdlAsignment(lnum, line)
|
||||
let f = -1
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.45
|
||||
" Last Change: 2016 Aug. 29
|
||||
" Version: 0.46
|
||||
" Last Change: 2016 Sep. 27
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made by: Albert Oliver Serra and Takuya Fujiwara.
|
||||
" Useful suggestions were made, in chronological order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -121,7 +122,8 @@ function FortranGetIndent(lnum)
|
||||
let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}'
|
||||
let type='\(\(integer\|real\|double\s\+precision\|complex\|logical'
|
||||
\.'\|character\|type\|class\)\s*\S*\s\+\)\='
|
||||
if prevstat =~? '^\s*\(module\|contains\/submodule\|program\)\>'
|
||||
if prevstat =~? '^\s*\(contains\|submodule\|program\)\>'
|
||||
\ ||prevstat =~? '^\s*'.'module\>\(\s*\procedure\)\@!'
|
||||
\ ||prevstat =~? '^\s*'.prefix.'subroutine\>'
|
||||
\ ||prevstat =~? '^\s*'.prefix.type.'function\>'
|
||||
\ ||prevstat =~? '^\s*'.type.prefix.'function\>'
|
||||
@@ -129,7 +131,7 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
if getline(v:lnum) =~? '^\s*contains\>'
|
||||
\ ||getline(v:lnum)=~? '^\s*end\s*'
|
||||
\ .'\(function\|subroutine\|module\/submodule\|program\)\>'
|
||||
\ .'\(function\|subroutine\|module\|submodule\|program\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -749,7 +749,7 @@ func! s:CssPrevNonComment(lnum, stopline)
|
||||
while 1
|
||||
let ccol = match(getline(lnum), '\*/')
|
||||
if ccol < 0
|
||||
" No comment end thus its something else.
|
||||
" No comment end thus it's something else.
|
||||
return lnum
|
||||
endif
|
||||
call cursor(lnum, ccol + 1)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
" METAFONT indent file
|
||||
" Language: METAFONT
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Last Change: 2016 Oct 1
|
||||
|
||||
runtime! indent/mp.vim
|
||||
+322
-178
@@ -1,56 +1,19 @@
|
||||
" MetaPost indent file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Eugene Minkovskii <emin@mccme.ru>
|
||||
" Last Change: 2012 May 18
|
||||
" Version: 0.1
|
||||
" ==========================================================================
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Eugene Minkovskii <emin@mccme.ru>
|
||||
" Last Change: 2016 Oct 01
|
||||
" Version: 0.2
|
||||
|
||||
" Identation Rules: {{{1
|
||||
" First of all, MetaPost language don't expect any identation rules.
|
||||
" This screept need for you only if you (not MetaPost) need to do
|
||||
" exactly code. If you don't need to use indentation, see
|
||||
" :help filetype-indent-off
|
||||
"
|
||||
" Note: Every rules of identation in MetaPost or TeX languages (and in some
|
||||
" other of course) is very subjective. I can release only my vision of this
|
||||
" promlem.
|
||||
"
|
||||
" ..........................................................................
|
||||
" Example of correct (by me) identation {{{2
|
||||
" shiftwidth=4
|
||||
" ==========================================================================
|
||||
" for i=0 upto 99:
|
||||
" z[i] = (0,1u) rotated (i*360/100);
|
||||
" endfor
|
||||
" draw z0 -- z10 -- z20
|
||||
" withpen ... % <- 2sw because breaked line
|
||||
" withcolor ...; % <- same as previous
|
||||
" draw z0 for i=1 upto 99:
|
||||
" -- z[i] % <- 1sw from left end of 'for' satement
|
||||
" endfor withpen ... % <- 0sw from left end of 'for' satement
|
||||
" withcolor ...; % <- 2sw because breaked line
|
||||
" draw if One: % <- This is internal if (like 'for' above)
|
||||
" one
|
||||
" elsif Other:
|
||||
" other
|
||||
" fi withpen ...;
|
||||
" if one: % <- This is external if
|
||||
" draw one;
|
||||
" elseif other:
|
||||
" draw other;
|
||||
" fi
|
||||
" draw z0; draw z1;
|
||||
" }}}
|
||||
" }}}
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetMetaPostIndent()
|
||||
setlocal indentkeys+=;,<:>,=if,=for,=def,=end,=else,=fi
|
||||
setlocal indentkeys+==end,=else,=fi,=fill,0),0]
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetMetaPostIndent")
|
||||
@@ -59,151 +22,332 @@ endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Auxiliary Definitions: {{{1
|
||||
function! MetaNextNonblankNoncomment(pos)
|
||||
" Like nextnonblank() but ignore comment lines
|
||||
let tmp = nextnonblank(a:pos)
|
||||
while tmp && getline(tmp) =~ '^\s*%'
|
||||
let tmp = nextnonblank(tmp+1)
|
||||
function GetMetaPostIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return GetMetaPostIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
" Regexps {{{
|
||||
" Note: the next three variables are made global so that a user may add
|
||||
" further keywords.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" Put these in ~/.vim/after/indent/mp.vim
|
||||
"
|
||||
" let g:mp_open_tag .= '\|\<begintest\>'
|
||||
" let g:mp_close_tag .= '\|\<endtest\>'
|
||||
|
||||
" Expressions starting indented blocks
|
||||
let g:mp_open_tag = ''
|
||||
\ . '\<if\>'
|
||||
\ . '\|\<else\%[if]\>'
|
||||
\ . '\|\<for\%(\|ever\|suffixes\)\>'
|
||||
\ . '\|\<begingroup\>'
|
||||
\ . '\|\<\%(\|var\|primary\|secondary\|tertiary\)def\>'
|
||||
\ . '\|^\s*\<begin\%(fig\|graph\|glyph\|char\|logochar\)\>'
|
||||
\ . '\|[([{]'
|
||||
|
||||
" Expressions ending indented blocks
|
||||
let g:mp_close_tag = ''
|
||||
\ . '\<fi\>'
|
||||
\ . '\|\<else\%[if]\>'
|
||||
\ . '\|\<end\%(\|for\|group\|def\|fig\|char\|logochar\|glyph\|graph\)\>'
|
||||
\ . '\|[)\]}]'
|
||||
|
||||
" Statements that may span multiple lines and are ended by a semicolon. To
|
||||
" keep this list short, statements that are unlikely to be very long or are
|
||||
" not very common (e.g., keywords like `interim` or `showtoken`) are not
|
||||
" included.
|
||||
"
|
||||
" The regex for assignments and equations (the last branch) is tricky, because
|
||||
" it must not match things like `for i :=`, `if a=b`, `def...=`, etc... It is
|
||||
" not perfect, but it works reasonably well.
|
||||
let g:mp_statement = ''
|
||||
\ . '\<\%(\|un\|cut\)draw\>'
|
||||
\ . '\|\<\%(\|un\)fill\%[draw]\>'
|
||||
\ . '\|\<draw\%(dbl\)\=arrow\>'
|
||||
\ . '\|\<clip\>'
|
||||
\ . '\|\<addto\>'
|
||||
\ . '\|\<save\>'
|
||||
\ . '\|\<setbounds\>'
|
||||
\ . '\|\<message\>'
|
||||
\ . '\|\<errmessage\>'
|
||||
\ . '\|\<errhelp\>'
|
||||
\ . '\|\<fontmapline\>'
|
||||
\ . '\|\<pickup\>'
|
||||
\ . '\|\<show\>'
|
||||
\ . '\|\<special\>'
|
||||
\ . '\|\<write\>'
|
||||
\ . '\|\%(^\|;\)\%([^;=]*\%('.g:mp_open_tag.'\)\)\@!.\{-}:\=='
|
||||
|
||||
" A line ends with zero or more spaces, possibly followed by a comment.
|
||||
let s:eol = '\s*\%($\|%\)'
|
||||
" }}}
|
||||
|
||||
" Auxiliary functions {{{
|
||||
" Returns 1 if (0-based) position immediately preceding `pos` in `line` is
|
||||
" inside a string or a comment; returns 0 otherwise.
|
||||
|
||||
" This is the function that is called more often when indenting, so it is
|
||||
" critical that it is efficient. The method we use is significantly faster
|
||||
" than using syntax attributes, and more general (it does not require
|
||||
" syntax_items). It is also faster than using a single regex matching an even
|
||||
" number of quotes. It helps that MetaPost strings cannot span more than one
|
||||
" line and cannot contain escaped quotes.
|
||||
function! s:CommentOrString(line, pos)
|
||||
let in_string = 0
|
||||
let q = stridx(a:line, '"')
|
||||
let c = stridx(a:line, '%')
|
||||
while q >= 0 && q < a:pos
|
||||
if c >= 0 && c < q
|
||||
if in_string " Find next percent symbol
|
||||
let c = stridx(a:line, '%', q + 1)
|
||||
else " Inside comment
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
let in_string = 1 - in_string
|
||||
let q = stridx(a:line, '"', q + 1) " Find next quote
|
||||
endwhile
|
||||
return tmp
|
||||
return in_string || (c >= 0 && c <= a:pos)
|
||||
endfunction
|
||||
|
||||
function! MetaPrevNonblankNoncomment(pos)
|
||||
" Like prevnonblank() but ignore comment lines
|
||||
let tmp = prevnonblank(a:pos)
|
||||
while tmp && getline(tmp) =~ '^\s*%'
|
||||
let tmp = prevnonblank(tmp-1)
|
||||
" Find the first non-comment non-blank line before the current line. Skip also
|
||||
" verbatimtex/btex... etex blocks.
|
||||
function! s:PrevNonBlankNonComment(lnum)
|
||||
let l:lnum = prevnonblank(a:lnum - 1)
|
||||
while getline(l:lnum) =~# '^\s*%' ||
|
||||
\ synIDattr(synID(a:lnum, 1, 1), "name") =~# '^mpTeXinsert$\|^tex\|^Delimiter'
|
||||
let l:lnum = prevnonblank(l:lnum - 1)
|
||||
endwhile
|
||||
return tmp
|
||||
return l:lnum
|
||||
endfunction
|
||||
|
||||
function! MetaSearchNoncomment(pattern, ...)
|
||||
" Like search() but ignore commented areas
|
||||
if a:0
|
||||
let flags = a:1
|
||||
elseif &wrapscan
|
||||
let flags = "w"
|
||||
else
|
||||
let flags = "W"
|
||||
endif
|
||||
let cl = line(".")
|
||||
let cc = col(".")
|
||||
let tmp = search(a:pattern, flags)
|
||||
while tmp && synIDattr(synID(line("."), col("."), 1), "name") =~
|
||||
\ 'm[fp]\(Comment\|TeXinsert\|String\)'
|
||||
let tmp = search(a:pattern, flags)
|
||||
" Returns true if the last tag appearing in the line is an open tag; returns
|
||||
" false otherwise.
|
||||
function! s:LastTagIsOpen(line)
|
||||
let o = s:LastValidMatchEnd(a:line, g:mp_open_tag, 0)
|
||||
if o == - 1 | return v:false | endif
|
||||
return s:LastValidMatchEnd(a:line, g:mp_close_tag, o) < 0
|
||||
endfunction
|
||||
|
||||
" A simple, efficient and quite effective heuristics is used to test whether
|
||||
" a line should cause the next line to be indented: count the "opening tags"
|
||||
" (if, for, def, ...) in the line, count the "closing tags" (endif, endfor,
|
||||
" ...) in the line, and compute the difference. We call the result the
|
||||
" "weight" of the line. If the weight is positive, then the next line should
|
||||
" most likely be indented. Note that `else` and `elseif` are both opening and
|
||||
" closing tags, so they "cancel out" in almost all cases, the only exception
|
||||
" being a leading `else[if]`, which is counted as an opening tag, but not as
|
||||
" a closing tag (so that, for instance, a line containing a single `else:`
|
||||
" will have weight equal to one, not zero). We do not treat a trailing
|
||||
" `else[if]` in any special way, because lines ending with an open tag are
|
||||
" dealt with separately before this function is called (see
|
||||
" GetMetaPostIndentIntern()).
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" forsuffixes $=a,b: if x.$ = y.$ : draw else: fill fi
|
||||
" % This line will be indented because |{forsuffixes,if,else}| > |{else,fi}| (3 > 2)
|
||||
" endfor
|
||||
|
||||
function! s:Weight(line)
|
||||
let [o, i] = [0, s:ValidMatchEnd(a:line, g:mp_open_tag, 0)]
|
||||
while i > 0
|
||||
let o += 1
|
||||
let i = s:ValidMatchEnd(a:line, g:mp_open_tag, i)
|
||||
endwhile
|
||||
if !tmp
|
||||
call cursor(cl,cc)
|
||||
let [c, i] = [0, matchend(a:line, '^\s*\<else\%[if]\>')] " Skip a leading else[if]
|
||||
let i = s:ValidMatchEnd(a:line, g:mp_close_tag, i)
|
||||
while i > 0
|
||||
let c += 1
|
||||
let i = s:ValidMatchEnd(a:line, g:mp_close_tag, i)
|
||||
endwhile
|
||||
return o - c
|
||||
endfunction
|
||||
|
||||
" Similar to matchend(), but skips strings and comments.
|
||||
" line: a String
|
||||
function! s:ValidMatchEnd(line, pat, start)
|
||||
let i = matchend(a:line, a:pat, a:start)
|
||||
while i > 0 && s:CommentOrString(a:line, i)
|
||||
let i = matchend(a:line, a:pat, i)
|
||||
endwhile
|
||||
return i
|
||||
endfunction
|
||||
|
||||
" Like s:ValidMatchEnd(), but returns the end position of the last (i.e.,
|
||||
" rightmost) match.
|
||||
function! s:LastValidMatchEnd(line, pat, start)
|
||||
let last_found = -1
|
||||
let i = matchend(a:line, a:pat, a:start)
|
||||
while i > 0
|
||||
if !s:CommentOrString(a:line, i)
|
||||
let last_found = i
|
||||
endif
|
||||
let i = matchend(a:line, a:pat, i)
|
||||
endwhile
|
||||
return last_found
|
||||
endfunction
|
||||
|
||||
function! s:DecreaseIndentOnClosingTag(curr_indent)
|
||||
let cur_text = getline(v:lnum)
|
||||
if cur_text =~# '^\s*\%('.g:mp_close_tag.'\)'
|
||||
return max([a:curr_indent - shiftwidth(), 0])
|
||||
endif
|
||||
return tmp
|
||||
return a:curr_indent
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! GetMetaPostIndent()
|
||||
" not indent in comment ???
|
||||
if synIDattr(synID(line("."), col("."), 1), "name") =~
|
||||
\ 'm[fp]\(Comment\|TeXinsert\|String\)'
|
||||
return -1
|
||||
endif
|
||||
" Some RegExps: {{{1
|
||||
" end_of_item: all of end by ';'
|
||||
" + all of end by :endfor, :enddef, :endfig, :endgroup, :fi
|
||||
" + all of start by :beginfig(num), :begingroup
|
||||
" + all of start by :for, :if, :else, :elseif and end by ':'
|
||||
" + all of start by :def, :vardef and end by '='
|
||||
let end_of_item = '\(' .
|
||||
\ ';\|' .
|
||||
\ '\<\(end\(for\|def\|fig\|group\)\|fi\)\>\|' .
|
||||
\ '\<begin\(group\>\|fig\s*(\s*\d\+\s*)\)\|' .
|
||||
\ '\<\(for\|if\|else\(if\)\=\)\>.\+:\|' .
|
||||
\ '\<\(var\)\=def\>.\+=' . '\)'
|
||||
" }}}
|
||||
" Save: current position {{{1
|
||||
let cl = line (".")
|
||||
let cc = col (".")
|
||||
let cs = getline(".")
|
||||
" if it is :beginfig or :endfig use zero indent
|
||||
if cs =~ '^\s*\(begin\|end\)fig\>'
|
||||
return 0
|
||||
endif
|
||||
" }}}
|
||||
" Initialise: ind variable {{{1
|
||||
" search previous item not in current line
|
||||
let p_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
while p_semicol_l == cl
|
||||
let p_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
endwhile
|
||||
" if this is first item in program use zero indent
|
||||
if !p_semicol_l
|
||||
return 0
|
||||
endif
|
||||
" if this is multiline item, remember first indent
|
||||
if MetaNextNonblankNoncomment(p_semicol_l+1) < cl
|
||||
let ind = indent(MetaNextNonblankNoncomment(p_semicol_l+1))
|
||||
" else --- search pre-previous item for search first line in previous item
|
||||
else
|
||||
" search pre-previous item not in current line
|
||||
let pp_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
while pp_semicol_l == p_semicol_l
|
||||
let pp_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
endwhile
|
||||
" if we find pre-previous item, remember indent of previous item
|
||||
" else --- remember zero
|
||||
if pp_semicol_l
|
||||
let ind = indent(MetaNextNonblankNoncomment(line(".")+1))
|
||||
else
|
||||
let ind = 0
|
||||
endif
|
||||
endif
|
||||
" }}}
|
||||
" Increase Indent: {{{1
|
||||
" if it is an internal/external :for or :if statements {{{2
|
||||
let pnn_s = getline(MetaPrevNonblankNoncomment(cl-1))
|
||||
if pnn_s =~ '\<\(for\|if\)\>.\+:\s*\($\|%\)'
|
||||
let ind = match(pnn_s, '\<\(for\|if\)\>.\+:\s*\($\|%\)') + &sw
|
||||
" }}}
|
||||
" if it is a :def, :vardef, :beginfig, :begingroup, :else, :elseif {{{2
|
||||
elseif pnn_s =~ '^\s*\(' .
|
||||
\ '\(var\)\=def\|' .
|
||||
\ 'begin\(group\|fig\s*(\s*\d\+\s*)\)\|' .
|
||||
\ 'else\(if\)\=' . '\)\>'
|
||||
let ind = ind + &sw
|
||||
" }}}
|
||||
" if it is a broken line {{{2
|
||||
elseif pnn_s !~ end_of_item.'\s*\($\|%\)'
|
||||
let ind = ind + (2 * &sw)
|
||||
endif
|
||||
" }}}
|
||||
" }}}
|
||||
" Decrease Indent: {{{1
|
||||
" if this is :endfor or :enddef statements {{{2
|
||||
" this is correct because :def cannot be inside :for
|
||||
if cs =~ '\<end\(for\|def\)\=\>'
|
||||
call MetaSearchNoncomment('\<for\>.\+:\s*\($\|%\)' . '\|' .
|
||||
\ '^\s*\(var\)\=def\>',"bW")
|
||||
if col(".") > 1
|
||||
let ind = col(".") - 1
|
||||
else
|
||||
let ind = indent(".")
|
||||
endif
|
||||
" }}}
|
||||
" if this is :fi, :else, :elseif statements {{{2
|
||||
elseif cs =~ '\<\(else\(if\)\=\|fi\)\>'
|
||||
call MetaSearchNoncomment('\<if\>.\+:\s*\($\|%\)',"bW")
|
||||
let ind = col(".") - 1
|
||||
" }}}
|
||||
" if this is :endgroup statement {{{2
|
||||
elseif cs =~ '^\s*endgroup\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
" }}}
|
||||
" }}}
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
" Main function {{{
|
||||
"
|
||||
" Note: Every rule of indentation in MetaPost is very subjective. We might get
|
||||
" creative, but things get murky very soon (there are too many corner cases).
|
||||
" So, we provide a means for the user to decide what to do when this script
|
||||
" doesn't get it. We use a simple idea: use '%>', '%<' and '%=' to explicitly
|
||||
" control indentation. The '<' and '>' symbols may be repeated many times
|
||||
" (e.g., '%>>' will cause the next line to be indented twice).
|
||||
"
|
||||
" By using '%>...', '%<...' and '%=', the indentation the user wants is
|
||||
" preserved by commands like gg=G, even if it does not follow the rules of
|
||||
" this script.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" shiftwidth=4
|
||||
" def foo =
|
||||
" makepen(subpath(T-n,t) of r %>
|
||||
" shifted .5down %>
|
||||
" --subpath(t,T) of r shifted .5up -- cycle) %<<
|
||||
" withcolor black
|
||||
" enddef
|
||||
"
|
||||
" The default indentation of the previous example would be:
|
||||
"
|
||||
" def foo =
|
||||
" makepen(subpath(T-n,t) of r
|
||||
" shifted .5down
|
||||
" --subpath(t,T) of r shifted .5up -- cycle)
|
||||
" withcolor black
|
||||
" enddef
|
||||
"
|
||||
" Personally, I prefer the latter, but anyway...
|
||||
function! GetMetaPostIndentIntern()
|
||||
|
||||
" This is the reference line relative to which the current line is indented
|
||||
" (but see below).
|
||||
let lnum = s:PrevNonBlankNonComment(v:lnum)
|
||||
|
||||
" At the start of the file use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let prev_text = getline(lnum)
|
||||
|
||||
" User-defined overrides take precedence over anything else.
|
||||
" See above for an example.
|
||||
let j = match(prev_text, '%[<>=]')
|
||||
if j > 0
|
||||
let i = strlen(matchstr(prev_text, '%>\+', j)) - 1
|
||||
if i > 0
|
||||
return indent(lnum) + i * shiftwidth()
|
||||
endif
|
||||
|
||||
let i = strlen(matchstr(prev_text, '%<\+', j)) - 1
|
||||
if i > 0
|
||||
return max([indent(lnum) - i * shiftwidth(), 0])
|
||||
endif
|
||||
|
||||
if match(prev_text, '%=', j)
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the reference line ends with an open tag, indent.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" if c:
|
||||
" 0
|
||||
" else:
|
||||
" 1
|
||||
" fi if c2: % Note that this line has weight equal to zero.
|
||||
" ... % This line will be indented
|
||||
if s:LastTagIsOpen(prev_text)
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum) + shiftwidth())
|
||||
endif
|
||||
|
||||
" Lines with a positive weight are unbalanced and should likely be indented.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" def f = enddef for i = 1 upto 5: if x[i] > 0: 1 else: 2 fi
|
||||
" ... % This line will be indented (because of the unterminated `for`)
|
||||
if s:Weight(prev_text) > 0
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum) + shiftwidth())
|
||||
endif
|
||||
|
||||
" Unterminated statements cause indentation to kick in.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" draw unitsquare
|
||||
" withcolor black; % This line is indented because of `draw`.
|
||||
" x := a + b + c
|
||||
" + d + e; % This line is indented because of `:=`.
|
||||
"
|
||||
let i = s:LastValidMatchEnd(prev_text, g:mp_statement, 0)
|
||||
if i >= 0 " Does the line contain a statement?
|
||||
if s:ValidMatchEnd(prev_text, ';', i) < 0 " Is the statement unterminated?
|
||||
return indent(lnum) + shiftwidth()
|
||||
else
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum))
|
||||
endif
|
||||
endif
|
||||
|
||||
" Deal with the special case of a statement spanning multiple lines. If the
|
||||
" current reference line L ends with a semicolon, search backwards for
|
||||
" another semicolon or a statement keyword. If the latter is found first,
|
||||
" its line is used as the reference line for indenting the current line
|
||||
" instead of L.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" if cond:
|
||||
" draw if a: z0 else: z1 fi
|
||||
" shifted S
|
||||
" scaled T; % L
|
||||
"
|
||||
" for i = 1 upto 3: % <-- Current line: this gets the same indent as `draw ...`
|
||||
"
|
||||
" NOTE: we get here if and only if L does not contain a statement (among
|
||||
" those listed in g:mp_statement).
|
||||
if s:ValidMatchEnd(prev_text, ';'.s:eol, 0) >= 0 " L ends with a semicolon
|
||||
let stm_lnum = s:PrevNonBlankNonComment(lnum)
|
||||
while stm_lnum > 0
|
||||
let prev_text = getline(stm_lnum)
|
||||
let sc_pos = s:LastValidMatchEnd(prev_text, ';', 0)
|
||||
let stm_pos = s:ValidMatchEnd(prev_text, g:mp_statement, sc_pos)
|
||||
if stm_pos > sc_pos
|
||||
let lnum = stm_lnum
|
||||
break
|
||||
elseif sc_pos > stm_pos
|
||||
break
|
||||
endif
|
||||
let stm_lnum = s:PrevNonBlankNonComment(stm_lnum)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum))
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" zipPlugin.vim: Handles browsing zipfiles
|
||||
" PLUGIN PORTION
|
||||
" Date: Jun 07, 2013
|
||||
" Date: Sep 13, 2016
|
||||
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
|
||||
" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
@@ -20,14 +20,14 @@
|
||||
if &cp || exists("g:loaded_zipPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zipPlugin = "v27"
|
||||
let g:loaded_zipPlugin = "v28"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Options: {{{1
|
||||
if !exists("g:zipPlugin_ext")
|
||||
let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,*.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,*.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,*.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx'
|
||||
let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
@@ -34,7 +34,7 @@ syn match aveNumber "[+-]\=\<[0-9]\+\>"
|
||||
" Operator
|
||||
|
||||
syn keyword aveOperator or and max min xor mod by
|
||||
" 'not' is a kind of a problem: Its an Operator as well as a method
|
||||
" 'not' is a kind of a problem: It's an Operator as well as a method
|
||||
" 'not' is only marked as an Operator if not applied as method
|
||||
syn match aveOperator "[^\.]not[^a-zA-Z]"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2016 Aug 30
|
||||
" Last Change: 2016 Sep 27
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -39,7 +39,7 @@ let s:unsupported = [
|
||||
let &cpo=s:cpo
|
||||
|
||||
" Match uri's
|
||||
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
||||
syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
||||
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+'
|
||||
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+'
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.98
|
||||
" Last Change: 2016 Aug. 29
|
||||
" Version: 0.99
|
||||
" Last Change: 2016 Sep. 23
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
" Version 0.1 (April 2000) was based on the fortran 77 syntax file by Mario Eusebio and
|
||||
" Preben Guldberg. Since then, useful suggestions and contributions have been made,
|
||||
" in chronological order, by:
|
||||
" Version 0.1 (April 2000) for Fortran 95 was based on the Fortran 77 syntax file by
|
||||
" Mario Eusebio and Preben Guldberg. Since then, useful suggestions and contributions
|
||||
" have been made, in chronological order, by:
|
||||
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi and Vishnu V. Krishnan.
|
||||
" Stefano Zaghi, Vishnu V. Krishnan and Judicaël Grasset
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -368,7 +368,7 @@ else
|
||||
endif
|
||||
|
||||
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell
|
||||
syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=\s.*$"
|
||||
syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=&\=\s.*$"
|
||||
|
||||
"cpp is often used with Fortran
|
||||
syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*"
|
||||
|
||||
+241
-130
@@ -1,184 +1,295 @@
|
||||
" Vim syntax file
|
||||
" Language: Metafont
|
||||
" Maintainer: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: April 25, 2001
|
||||
" Language: METAFONT
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: 2016 Oct 1
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook'
|
||||
syn iskeyword @,_
|
||||
|
||||
" METAFONT 'primitives' as defined in chapter 25 of 'The METAFONTbook'
|
||||
" Page 210: 'boolean expressions'
|
||||
syn keyword mfBoolExp true false known unknown odd charexists not and or
|
||||
syn keyword mfBoolExp and charexists false known not odd or true unknown
|
||||
|
||||
" Page 210: 'numeric expression'
|
||||
syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber
|
||||
syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart
|
||||
syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor
|
||||
syn keyword mfNumExp uniformdeviate
|
||||
syn keyword mfNumExp ASCII angle cosd directiontime floor hex length
|
||||
syn keyword mfNumExp mexp mlog normaldeviate oct sind sqrt totalweight
|
||||
syn keyword mfNumExp turningnumber uniformdeviate xpart xxpart xypart
|
||||
syn keyword mfNumExp ypart yxpart yypart
|
||||
|
||||
" Page 211: 'internal quantities'
|
||||
syn keyword mfInternal tracingtitles tracingequations tracingcapsules
|
||||
syn keyword mfInternal tracingchoices tracingspecs tracingpens
|
||||
syn keyword mfInternal tracingcommands tracingrestores tracingmacros
|
||||
syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats
|
||||
syn keyword mfInternal pausing showstopping fontmaking proofing
|
||||
syn keyword mfInternal turningcheck warningcheck smoothing autorounding
|
||||
syn keyword mfInternal granularity fillin year month day time
|
||||
syn keyword mfInternal charcode charext charwd charht chardp charic
|
||||
syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset
|
||||
syn keyword mfInternal boundarychar
|
||||
syn keyword mfInternal autorounding boundarychar charcode chardp chardx
|
||||
syn keyword mfInternal chardy charext charht charic charwd day designsize
|
||||
syn keyword mfInternal fillin fontmaking granularity hppp jobname month
|
||||
syn keyword mfInternal pausing proofing showstopping smoothing time
|
||||
syn keyword mfInternal tracingcapsules tracingchoices tracingcommands
|
||||
syn keyword mfInternal tracingedges tracingequations tracingmacros
|
||||
syn keyword mfInternal tracingonline tracingoutput tracingpens
|
||||
syn keyword mfInternal tracingrestores tracingspecs tracingstats
|
||||
syn keyword mfInternal tracingtitles turningcheck vppp warningcheck
|
||||
syn keyword mfInternal xoffset year yoffset
|
||||
|
||||
" Page 212: 'pair expressions'
|
||||
syn keyword mfPairExp point of precontrol postcontrol penoffset rotated
|
||||
syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled
|
||||
syn keyword mfPairExp zscaled
|
||||
syn keyword mfPairExp of penoffset point postcontrol precontrol rotated
|
||||
syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled
|
||||
syn keyword mfPairExp zscaled
|
||||
|
||||
" Page 213: 'path expressions'
|
||||
syn keyword mfPathExp makepath reverse subpath curl tension atleast
|
||||
syn keyword mfPathExp controls cycle
|
||||
syn keyword mfPathExp atleast controls curl cycle makepath reverse
|
||||
syn keyword mfPathExp subpath tension
|
||||
|
||||
" Page 214: 'pen expressions'
|
||||
syn keyword mfPenExp nullpen pencircle makepen
|
||||
syn keyword mfPenExp makepen nullpen pencircle
|
||||
|
||||
" Page 214: 'picutre expressions'
|
||||
syn keyword mfPicExp nullpicture
|
||||
" Page 214: 'picture expressions'
|
||||
syn keyword mfPicExp nullpicture
|
||||
|
||||
" Page 214: 'string expressions'
|
||||
syn keyword mfStringExp jobname readstring str char decimal substring
|
||||
syn keyword mfStringExp char decimal readstring str substring
|
||||
|
||||
" Page 217: 'commands and statements'
|
||||
syn keyword mfCommand end dump save interim newinternal randomseed let
|
||||
syn keyword mfCommand delimiters outer everyjob show showvariable showtoken
|
||||
syn keyword mfCommand showdependencies showstats message errmessage errhelp
|
||||
syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode
|
||||
syn keyword mfCommand addto also contour doublepath withpen withweight cull
|
||||
syn keyword mfCommand keeping dropping display inwindow openwindow at from to
|
||||
syn keyword mfCommand shipout special numspecial
|
||||
syn keyword mfCommand addto also at batchmode contour cull delimiters
|
||||
syn keyword mfCommand display doublepath dropping dump end errhelp
|
||||
syn keyword mfCommand errmessage errorstopmode everyjob from interim
|
||||
syn keyword mfCommand inwindow keeping let message newinternal
|
||||
syn keyword mfCommand nonstopmode numspecial openwindow outer randomseed
|
||||
syn keyword mfCommand save scrollmode shipout show showdependencies
|
||||
syn keyword mfCommand showstats showtoken showvariable special to withpen
|
||||
syn keyword mfCommand withweight
|
||||
|
||||
" Page 56: 'types'
|
||||
syn keyword mfType boolean numeric pair path pen picture string transform
|
||||
syn keyword mfType boolean numeric pair path pen picture string
|
||||
syn keyword mfType transform
|
||||
|
||||
" Page 155: 'grouping'
|
||||
syn keyword mfStatement begingroup endgroup
|
||||
syn keyword mfStatement begingroup endgroup
|
||||
|
||||
" Page 165: 'definitions'
|
||||
syn keyword mfDefinition enddef def expr suffix text primary secondary
|
||||
syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef
|
||||
syn keyword mfDefinition def enddef expr primary primarydef secondary
|
||||
syn keyword mfDefinition secondarydef suffix tertiary tertiarydef text
|
||||
syn keyword mfDefinition vardef
|
||||
|
||||
" Page 169: 'conditions and loops'
|
||||
syn keyword mfCondition if fi else elseif endfor for forsuffixes forever
|
||||
syn keyword mfCondition step until exitif
|
||||
syn keyword mfCondition else elseif endfor exitif fi for forever
|
||||
syn keyword mfCondition forsuffixes if step until
|
||||
|
||||
" Other primitives listed in the index
|
||||
syn keyword mfPrimitive charlist endinput expandafter extensible
|
||||
syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes
|
||||
syn keyword mfPrimitive kern ligtable quote scantokens skipto
|
||||
syn keyword mfPrimitive charlist endinput expandafter extensible fontdimen
|
||||
syn keyword mfPrimitive headerbyte inner input intersectiontimes kern
|
||||
syn keyword mfPrimitive ligtable quote scantokens skipto
|
||||
|
||||
" Implicit suffix parameters
|
||||
syn match mfSuffixParam "@#\|#@\|@"
|
||||
|
||||
" These are just tags, but given their special status, we
|
||||
" highlight them as variables
|
||||
syn keyword mfVariable x y
|
||||
|
||||
" Keywords defined by plain.mf (defined on pp.262-278)
|
||||
if !exists("plain_mf_macros")
|
||||
let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful
|
||||
" metapost.vim does so to turn off Metafont macros
|
||||
if get(g:, "plain_mf_macros", 1)
|
||||
syn keyword mfDef addto_currentpicture beginchar capsule_def
|
||||
syn keyword mfDef change_width clear_pen_memory clearit clearpen
|
||||
syn keyword mfDef clearxy culldraw cullit cutdraw
|
||||
syn keyword mfDef define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mfDef define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mfDef define_horizontal_corrected_pixels define_pixels
|
||||
syn keyword mfDef define_whole_blacker_pixels define_whole_pixels
|
||||
syn keyword mfDef define_whole_vertical_blacker_pixels
|
||||
syn keyword mfDef define_whole_vertical_pixels downto draw drawdot
|
||||
syn keyword mfDef endchar erase exitunless fill filldraw fix_units
|
||||
syn keyword mfDef flex font_coding_scheme font_extra_space
|
||||
syn keyword mfDef font_identifier font_normal_shrink
|
||||
syn keyword mfDef font_normal_space font_normal_stretch font_quad
|
||||
syn keyword mfDef font_size font_slant font_x_height gfcorners gobble
|
||||
syn keyword mfDef hide imagerules interact italcorr killtext
|
||||
syn keyword mfDef loggingall lowres_fix makebox makegrid maketicks
|
||||
syn keyword mfDef mode_def mode_setup nodisplays notransforms numtok
|
||||
syn keyword mfDef openit penrazor pensquare penstroke pickup
|
||||
syn keyword mfDef proofoffset proofrule range reflectedabout
|
||||
syn keyword mfDef rotatedaround screenchars screenrule screenstrokes
|
||||
syn keyword mfDef shipit showit smode stop superellipse takepower
|
||||
syn keyword mfDef tracingall tracingnone undraw undrawdot unfill
|
||||
syn keyword mfDef unfilldraw upto z
|
||||
syn match mfDef "???"
|
||||
syn keyword mfVardef bot byte ceiling counterclockwise cutoff decr dir
|
||||
syn keyword mfVardef direction directionpoint grayfont hround incr
|
||||
syn keyword mfVardef interpath inverse labelfont labels lft magstep
|
||||
" Note: nodot is not a vardef, it is used as in makelabel.lft.nodot("5",z5)
|
||||
" (METAFONT only)
|
||||
syn keyword mfVardef makelabel max min nodot penlabels penpos
|
||||
syn keyword mfVardef proofrulethickness round rt savepen slantfont solve
|
||||
syn keyword mfVardef tensepath titlefont top unitvector vround whatever
|
||||
syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>"
|
||||
syn keyword mfPrimaryDef div dotprod gobbled mod
|
||||
syn keyword mfSecondaryDef intersectionpoint
|
||||
syn keyword mfTertiaryDef softjoin thru
|
||||
syn keyword mfNewInternal blacker currentwindow displaying eps epsilon
|
||||
syn keyword mfNewInternal infinity join_radius number_of_modes o_correction
|
||||
syn keyword mfNewInternal pen_bot pen_lft pen_rt pen_top pixels_per_inch
|
||||
syn keyword mfNewInternal screen_cols screen_rows tolerance
|
||||
" Predefined constants
|
||||
syn keyword mfConstant base_name base_version blankpicture ditto down
|
||||
syn keyword mfConstant fullcircle halfcircle identity left lowres origin
|
||||
syn keyword mfConstant penspeck proof quartercircle right rulepen smoke
|
||||
syn keyword mfConstant unitpixel unitsquare up
|
||||
" Other predefined variables
|
||||
syn keyword mfVariable aspect_ratio currentpen extra_beginchar
|
||||
syn keyword mfVariable extra_endchar currentpen_path currentpicture
|
||||
syn keyword mfVariable currenttransform d extra_setup h localfont mag mode
|
||||
syn keyword mfVariable mode_name w
|
||||
" let statements:
|
||||
syn keyword mfnumExp abs
|
||||
syn keyword mfPairExp rotatedabout
|
||||
syn keyword mfCommand bye relax
|
||||
endif
|
||||
if plain_mf_macros
|
||||
syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name
|
||||
syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte
|
||||
syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit
|
||||
syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit
|
||||
syn keyword mfMacro currentpen currentpen_path currentpicture
|
||||
syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr
|
||||
syn keyword mfMacro define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mfMacro define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mfMacro define_horizontal_corrected_pixels define_pixels
|
||||
syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels
|
||||
syn keyword mfMacro define_whole_vertical_blacker_pixels
|
||||
syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint
|
||||
syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot
|
||||
syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar
|
||||
syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex
|
||||
syn keyword mfMacro font_coding_scheme font_extra_space font_identifier
|
||||
syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch
|
||||
syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height
|
||||
syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h
|
||||
syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity
|
||||
syn keyword mfMacro interact interpath intersectionpoint inverse italcorr
|
||||
syn keyword mfMacro join_radius killtext labelfont labels left lft localfont
|
||||
syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid
|
||||
syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name
|
||||
syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok
|
||||
syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top
|
||||
syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke
|
||||
syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule
|
||||
syn keyword mfMacro proofrulethickness quartercircle range reflectedabout
|
||||
syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen
|
||||
syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule
|
||||
syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin
|
||||
syn keyword mfMacro solve stop superellipse takepower tensepath titlefont
|
||||
syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot
|
||||
syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto
|
||||
syn keyword mfMacro vround w whatever
|
||||
|
||||
" By default, METAFONT loads modes.mf, too
|
||||
if get(g:, "plain_mf_modes", 1)
|
||||
syn keyword mfConstant APSSixMed AgfaFourZeroZero AgfaThreeFourZeroZero
|
||||
syn keyword mfConstant AtariNineFive AtariNineSix AtariSLMEightZeroFour
|
||||
syn keyword mfConstant AtariSMOneTwoFour CItohEightFiveOneZero
|
||||
syn keyword mfConstant CItohThreeOneZero CanonBJCSixZeroZero CanonCX
|
||||
syn keyword mfConstant CanonEX CanonLBPLX CanonLBPTen CanonSX ChelgraphIBX
|
||||
syn keyword mfConstant CompugraphicEightSixZeroZero
|
||||
syn keyword mfConstant CompugraphicNineSixZeroZero DD DEClarge DECsmall
|
||||
syn keyword mfConstant DataDiscNew EightThree EpsonAction
|
||||
syn keyword mfConstant EpsonLQFiveZeroZeroLo EpsonLQFiveZeroZeroMed
|
||||
syn keyword mfConstant EpsonMXFX EpsonSQEightSevenZero EpsonStylusPro
|
||||
syn keyword mfConstant EpsonStylusProHigh EpsonStylusProLow
|
||||
syn keyword mfConstant EpsonStylusProMed FourFour GThreefax HPDeskJet
|
||||
syn keyword mfConstant HPLaserJetIIISi IBMFourTwoFiveZero IBMFourTwoOneSix
|
||||
syn keyword mfConstant IBMFourTwoThreeZero IBMFourZeroOneNine
|
||||
syn keyword mfConstant IBMFourZeroThreeNine IBMFourZeroTwoNine
|
||||
syn keyword mfConstant IBMProPrinter IBMSixOneFiveFour IBMSixSixSevenZero
|
||||
syn keyword mfConstant IBMThreeEightOneTwo IBMThreeEightTwoZero
|
||||
syn keyword mfConstant IBMThreeOneNineThree IBMThreeOneSevenNine
|
||||
syn keyword mfConstant IBMUlfHolleberg LASevenFive LNOthreR LNOthree
|
||||
syn keyword mfConstant LNZeroOne LNZeroThree LPSFourZero LPSTwoZero
|
||||
syn keyword mfConstant LexmarkFourZeroThreeNine LexmarkOptraR
|
||||
syn keyword mfConstant LexmarkOptraS LinotypeLThreeThreeZero
|
||||
syn keyword mfConstant LinotypeOneZeroZero LinotypeOneZeroZeroLo
|
||||
syn keyword mfConstant LinotypeThreeZeroZeroHi MacTrueSize NeXTprinter
|
||||
syn keyword mfConstant NeXTscreen NecTwoZeroOne Newgen NineOne
|
||||
syn keyword mfConstant OCESixSevenFiveZeroPS OneTwoZero OneZeroZero
|
||||
syn keyword mfConstant PrintwareSevenTwoZeroIQ Prism QMSOneSevenTwoFive
|
||||
syn keyword mfConstant QMSOneSevenZeroZero QMSTwoFourTwoFive RicohA
|
||||
syn keyword mfConstant RicohFortyEighty RicohFourZeroEightZero RicohLP
|
||||
syn keyword mfConstant SparcPrinter StarNLOneZero VAXstation VTSix
|
||||
syn keyword mfConstant VarityperFiveZeroSixZeroW
|
||||
syn keyword mfConstant VarityperFourThreeZeroZeroHi
|
||||
syn keyword mfConstant VarityperFourThreeZeroZeroLo
|
||||
syn keyword mfConstant VarityperFourTwoZeroZero VarityperSixZeroZero
|
||||
syn keyword mfConstant XeroxDocutech XeroxEightSevenNineZero
|
||||
syn keyword mfConstant XeroxFourZeroFiveZero XeroxNineSevenZeroZero
|
||||
syn keyword mfConstant XeroxPhaserSixTwoZeroZeroDP XeroxThreeSevenZeroZero
|
||||
syn keyword mfConstant Xerox_world agfafzz agfatfzz amiga aps apssixhi
|
||||
syn keyword mfConstant aselect atariezf atarinf atarins atariotf bitgraph
|
||||
syn keyword mfConstant bjtenex bjtzzex bjtzzl bjtzzs boise canonbjc
|
||||
syn keyword mfConstant canonex canonlbp cg cgl cgnszz citohtoz corona crs
|
||||
syn keyword mfConstant cthreeten cx datadisc declarge decsmall deskjet
|
||||
syn keyword mfConstant docutech dover dp dpdfezzz eighthre elvira epscszz
|
||||
syn keyword mfConstant epsdraft epsdrft epsdrftl epsfast epsfastl epshi
|
||||
syn keyword mfConstant epslo epsmed epsmedl epson epsonact epsonfx epsonl
|
||||
syn keyword mfConstant epsonlo epsonlol epsonlq epsonsq epstylus epstylwr
|
||||
syn keyword mfConstant epstyplo epstypmd epstypml epstypro epswlo epswlol
|
||||
syn keyword mfConstant esphi fourfour gpx gtfax gtfaxhi gtfaxl gtfaxlo
|
||||
syn keyword mfConstant gtfaxlol help hifax highfax hplaser hprugged ibm_a
|
||||
syn keyword mfConstant ibmd ibmega ibmegal ibmfzon ibmfztn ibmpp ibmppl
|
||||
syn keyword mfConstant ibmsoff ibmteot ibmtetz ibmtont ibmtosn ibmtosnl
|
||||
syn keyword mfConstant ibmvga ibx imagen imagewriter itoh itohl itohtoz
|
||||
syn keyword mfConstant itohtozl iw jetiiisi kyocera laserjet laserjetfive
|
||||
syn keyword mfConstant laserjetfivemp laserjetfour laserjetfourthousand
|
||||
syn keyword mfConstant laserjetfourzerozerozero laserjethi laserjetlo
|
||||
syn keyword mfConstant laserjettwoonezerozero
|
||||
syn keyword mfConstant laserjettwoonezerozerofastres lasermaster
|
||||
syn keyword mfConstant laserwriter lasf lexmarkr lexmarks lexmarku
|
||||
syn keyword mfConstant linohalf linohi linolo linolttz linoone linosuper
|
||||
syn keyword mfConstant linothree linothreelo linotzzh ljfive ljfivemp
|
||||
syn keyword mfConstant ljfour ljfzzz ljfzzzfr ljlo ljtozz ljtozzfr lmaster
|
||||
syn keyword mfConstant lnotr lnzo lps lpstz lqhires lqlores lqmed lqmedl
|
||||
syn keyword mfConstant lqmedres lview lviewl lwpro macmag mactrue modes_mf
|
||||
syn keyword mfConstant ncd nec nechi neclm nectzo newdd newddl nexthi
|
||||
syn keyword mfConstant nextscreen nextscrn nineone nullmode ocessfz
|
||||
syn keyword mfConstant okidata okidatal okifourten okifte okihi onetz
|
||||
syn keyword mfConstant onezz pcprevw pcscreen phaser phaserfs phasertf
|
||||
syn keyword mfConstant phasertfl phasertl pixpt printware prntware
|
||||
syn keyword mfConstant proprinter qms qmsesz qmsostf qmsoszz qmstftf ricoh
|
||||
syn keyword mfConstant ricoha ricohlp ricohsp sherpa sparcptr starnlt
|
||||
syn keyword mfConstant starnltl styletwo stylewr stylewri stylewriter sun
|
||||
syn keyword mfConstant supre swtwo toshiba ultre varityper vs vtftzz
|
||||
syn keyword mfConstant vtftzzhi vtftzzlo vtfzszw vtszz xpstzz xpstzzl
|
||||
syn keyword mfConstant xrxesnz xrxfzfz xrxnszz xrxtszz
|
||||
syn keyword mfDef BCPL_string coding_scheme font_face_byte
|
||||
syn keyword mfDef font_family landscape
|
||||
syn keyword mfDef mode_extra_info mode_help mode_param
|
||||
syn keyword mfNewInternal blacker_min
|
||||
endif
|
||||
|
||||
" Some other basic macro names, e.g., from cmbase, logo, etc.
|
||||
if !exists("other_mf_macros")
|
||||
let other_mf_macros = 1 " Set this to '0' if your code gets too colourful
|
||||
" metapost.vim does so to turn off Metafont macros
|
||||
endif
|
||||
if other_mf_macros
|
||||
syn keyword mfMacro beginlogochar
|
||||
if get(g:, "other_mf_macros", 1)
|
||||
syn keyword mfDef beginlogochar
|
||||
syn keyword mfDef font_setup
|
||||
syn keyword mfPrimitive generate
|
||||
endif
|
||||
|
||||
" Numeric tokens
|
||||
syn match mfNumeric "[-]\=\d\+"
|
||||
syn match mfNumeric "[-]\=\.\d\+"
|
||||
syn match mfNumeric "[-]\=\d\+\.\d\+"
|
||||
syn match mfNumeric "[-]\=\d\+"
|
||||
syn match mfNumeric "[-]\=\.\d\+"
|
||||
syn match mfNumeric "[-]\=\d\+\.\d\+"
|
||||
|
||||
" Metafont lengths
|
||||
syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>"
|
||||
syn match mfLength "\<[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>"
|
||||
syn match mfLength "\<[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>"
|
||||
syn match mfLength "\<[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>"
|
||||
|
||||
" Metafont coordinates and points
|
||||
syn match mfCoord "\<[xy]\d\+\>"
|
||||
syn match mfPoint "\<z\d\+\>"
|
||||
" METAFONT lengths
|
||||
syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>"
|
||||
syn match mfLength "[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
|
||||
syn match mfLength "[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
|
||||
syn match mfLength "[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
|
||||
|
||||
" String constants
|
||||
syn region mfString start=+"+ end=+"+
|
||||
syn match mfOpenString /"[^"]*/
|
||||
syn region mfString oneline keepend start=+"+ end=+"+
|
||||
|
||||
" Comments:
|
||||
syn match mfComment "%.*$"
|
||||
syn keyword mfTodoComment contained TODO FIXME XXX DEBUG NOTE
|
||||
syn match mfComment "%.*$" contains=mfTodoComment,@Spell
|
||||
|
||||
" synchronizing
|
||||
syn sync maxlines=50
|
||||
|
||||
" Define the default highlighting
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link mfBoolExp Statement
|
||||
hi def link mfNumExp Statement
|
||||
hi def link mfInternal Identifier
|
||||
hi def link mfPairExp Statement
|
||||
hi def link mfPathExp Statement
|
||||
hi def link mfPenExp Statement
|
||||
hi def link mfPicExp Statement
|
||||
hi def link mfStringExp Statement
|
||||
hi def link mfCommand Statement
|
||||
hi def link mfType Type
|
||||
hi def link mfStatement Statement
|
||||
hi def link mfDefinition Statement
|
||||
hi def link mfCondition Conditional
|
||||
hi def link mfPrimitive Statement
|
||||
hi def link mfMacro Macro
|
||||
hi def link mfCoord Identifier
|
||||
hi def link mfPoint Identifier
|
||||
hi def link mfNumeric Number
|
||||
hi def link mfLength Number
|
||||
hi def link mfComment Comment
|
||||
hi def link mfString String
|
||||
|
||||
hi def link mfBoolExp Statement
|
||||
hi def link mfNumExp Statement
|
||||
hi def link mfPairExp Statement
|
||||
hi def link mfPathExp Statement
|
||||
hi def link mfPenExp Statement
|
||||
hi def link mfPicExp Statement
|
||||
hi def link mfStringExp Statement
|
||||
hi def link mfInternal Identifier
|
||||
hi def link mfCommand Statement
|
||||
hi def link mfType Type
|
||||
hi def link mfStatement Statement
|
||||
hi def link mfDefinition Statement
|
||||
hi def link mfCondition Conditional
|
||||
hi def link mfPrimitive Statement
|
||||
hi def link mfDef Function
|
||||
hi def link mfVardef mfDef
|
||||
hi def link mfPrimaryDef mfDef
|
||||
hi def link mfSecondaryDef mfDef
|
||||
hi def link mfTertiaryDef mfDef
|
||||
hi def link mfCoord Identifier
|
||||
hi def link mfPoint Identifier
|
||||
hi def link mfNumeric Number
|
||||
hi def link mfLength Number
|
||||
hi def link mfComment Comment
|
||||
hi def link mfString String
|
||||
hi def link mfOpenString Todo
|
||||
hi def link mfSuffixParam Label
|
||||
hi def link mfNewInternal mfInternal
|
||||
hi def link mfVariable Identifier
|
||||
hi def link mfConstant Constant
|
||||
hi def link mfTodoComment Todo
|
||||
|
||||
let b:current_syntax = "mf"
|
||||
|
||||
" vim: ts=8
|
||||
" vim:sw=2
|
||||
|
||||
+740
-90
@@ -1,115 +1,765 @@
|
||||
" Vim syntax file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: April 30, 2001
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: 2016 Oct 01
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost
|
||||
let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Read the Metafont syntax to start with
|
||||
if exists("g:plain_mf_macros")
|
||||
let s:plain_mf_macros = g:plain_mf_macros
|
||||
endif
|
||||
if exists("g:plain_mf_modes")
|
||||
let s:plain_mf_modes = g:plain_mf_modes
|
||||
endif
|
||||
if exists("g:other_mf_macros")
|
||||
let s:other_mf_macros = g:other_mf_macros
|
||||
endif
|
||||
|
||||
let g:plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost
|
||||
let g:plain_mf_modes = 0 " No METAFONT modes
|
||||
let g:other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither
|
||||
|
||||
" Read the METAFONT syntax to start with
|
||||
runtime! syntax/mf.vim
|
||||
unlet b:current_syntax " Necessary for syn include below
|
||||
|
||||
" MetaPost has TeX inserts for typeset labels
|
||||
" verbatimtex, btex, and etex will be treated as keywords
|
||||
syn match mpTeXbegin "\(verbatimtex\|btex\)"
|
||||
syn match mpTeXend "etex"
|
||||
syn region mpTeXinsert start="\(verbatimtex\|btex\)"hs=e+1 end="etex"he=s-1 contains=mpTeXbegin,mpTeXend keepend
|
||||
" Restore the value of existing global variables
|
||||
if exists("s:plain_mf_macros")
|
||||
let g:plain_mf_macros = s:plain_mf_macros
|
||||
else
|
||||
unlet g:plain_mf_macros
|
||||
endif
|
||||
if exists("s:plain_mf_modes")
|
||||
let g:plain_mf_modes = s:plain_mf_modes
|
||||
else
|
||||
unlet g:plain_mf_modes
|
||||
endif
|
||||
if exists("s:other_mf_macros")
|
||||
let g:other_mf_macros = s:other_mf_macros
|
||||
else
|
||||
unlet g:other_mf_macros
|
||||
endif
|
||||
|
||||
" MetaPost primitives not found in Metafont
|
||||
syn keyword mpInternal bluepart clip color dashed fontsize greenpart infont
|
||||
syn keyword mpInternal linecap linejoin llcorner lrcorner miterlimit mpxbreak
|
||||
syn keyword mpInternal prologues redpart setbounds tracinglostchars
|
||||
syn keyword mpInternal truecorners ulcorner urcorner withcolor
|
||||
" Use TeX highlighting inside verbatimtex/btex... etex
|
||||
syn include @MPTeX syntax/tex.vim
|
||||
unlet b:current_syntax
|
||||
" These are defined as keywords rather than using matchgroup
|
||||
" in order to make them available to syntaxcomplete.
|
||||
syn keyword mpTeXdelim btex etex verbatimtex contained
|
||||
syn region mpTeXinsert
|
||||
\ start=/\<verbatimtex\>\|\<btex\>/rs=e+1
|
||||
\ end=/\<etex\>/re=s-1 keepend
|
||||
\ contains=@MPTeX,mpTeXdelim
|
||||
|
||||
" Metafont primitives not found in MetaPost
|
||||
syn keyword notDefined autorounding chardx chardy fillin granularity hppp
|
||||
syn keyword notDefined proofing smoothing tracingedges tracingpens
|
||||
syn keyword notDefined turningcheck vppp xoffset yoffset
|
||||
" iskeyword must be set after the syn include above, because tex.vim sets `syn
|
||||
" iskeyword`. Note that keywords do not contain numbers (numbers are
|
||||
" subscripts)
|
||||
syntax iskeyword @,_
|
||||
|
||||
" MetaPost primitives not found in METAFONT
|
||||
syn keyword mpBoolExp bounded clipped filled stroked textual arclength
|
||||
syn keyword mpNumExp arctime blackpart bluepart colormodel cyanpart
|
||||
syn keyword mpNumExp fontsize greenpart greypart magentapart redpart
|
||||
syn keyword mpPairExp yellowpart llcorner lrcorner ulcorner urcorner
|
||||
" envelope is seemingly undocumented, but it exists since mpost 1.003.
|
||||
" The syntax is: envelope <polygonal pen> of <path primary>. For example,
|
||||
" path p;
|
||||
" p := envelope pensquare of (up--left);
|
||||
" (Thanks to Daniel H. Luecking for the example!)
|
||||
syn keyword mpPathExp envelope pathpart
|
||||
syn keyword mpPenExp penpart
|
||||
syn keyword mpPicExp dashpart glyph infont
|
||||
syn keyword mpStringExp fontpart readfrom textpart
|
||||
syn keyword mpType cmykcolor color rgbcolor
|
||||
" Other MetaPost primitives listed in the manual
|
||||
syn keyword mpPrimitive mpxbreak within
|
||||
" Internal quantities not found in METAFONT
|
||||
" (Table 6 in MetaPost: A User's Manual)
|
||||
syn keyword mpInternal defaultcolormodel hour minute linecap linejoin
|
||||
syn keyword mpInternal miterlimit mpprocset mpversion numberprecision
|
||||
syn keyword mpInternal numbersystem outputfilename outputformat
|
||||
syn keyword mpInternal outputformatoptions outputtemplate prologues
|
||||
syn keyword mpInternal restoreclipcolor tracinglostchars troffmode
|
||||
syn keyword mpInternal truecorners
|
||||
" List of commands not found in METAFONT (from MetaPost: A User's Manual)
|
||||
syn keyword mpCommand clip closefrom dashed filenametemplate fontmapfile
|
||||
syn keyword mpCommand fontmapline setbounds withcmykcolor withcolor
|
||||
syn keyword mpCommand withgreyscale withoutcolor withpostscript
|
||||
syn keyword mpCommand withprescript withrgbcolor write
|
||||
" METAFONT internal variables not found in MetaPost
|
||||
syn keyword notDefined autorounding chardx chardy fillin granularity
|
||||
syn keyword notDefined proofing smoothing tracingedges tracingpens
|
||||
syn keyword notDefined turningcheck xoffset yoffset
|
||||
" Suffix defined only in METAFONT:
|
||||
syn keyword notDefined nodot
|
||||
" Other not implemented primitives (see MetaPost: A User's Manual, §C.1)
|
||||
syn keyword notDefined cull display openwindow numspecial totalweight
|
||||
syn keyword notDefined withweight
|
||||
|
||||
" Keywords defined by plain.mp
|
||||
if !exists("plain_mp_macros")
|
||||
let plain_mp_macros = 1 " Set this to '0' if your source gets too colourful
|
||||
endif
|
||||
if plain_mp_macros
|
||||
syn keyword mpMacro ahangle ahlength background bbox bboxmargin beginfig
|
||||
syn keyword mpMacro beveled black blue buildcycle butt center cutafter
|
||||
syn keyword mpMacro cutbefore cuttings dashpattern defaultfont defaultpen
|
||||
syn keyword mpMacro defaultscale dotlabel dotlabels drawarrow drawdblarrow
|
||||
syn keyword mpMacro drawoptions endfig evenly extra_beginfig extra_endfig
|
||||
syn keyword mpMacro green label labeloffset mitered red rounded squared
|
||||
syn keyword mpMacro thelabel white base_name base_version
|
||||
syn keyword mpMacro upto downto exitunless relax gobble gobbled
|
||||
syn keyword mpMacro interact loggingall tracingall tracingnone
|
||||
syn keyword mpMacro eps epsilon infinity right left up down origin
|
||||
syn keyword mpMacro quartercircle halfcircle fullcircle unitsquare identity
|
||||
syn keyword mpMacro blankpicture withdots ditto EOF pensquare penrazor
|
||||
syn keyword mpMacro penspeck whatever abs round ceiling byte dir unitvector
|
||||
syn keyword mpMacro inverse counterclockwise tensepath mod div dotprod
|
||||
syn keyword mpMacro takepower direction directionpoint intersectionpoint
|
||||
syn keyword mpMacro softjoin incr decr reflectedabout rotatedaround
|
||||
syn keyword mpMacro rotatedabout min max flex superellipse interpath
|
||||
syn keyword mpMacro magstep currentpen currentpen_path currentpicture
|
||||
syn keyword mpMacro fill draw filldraw drawdot unfill undraw unfilldraw
|
||||
syn keyword mpMacro undrawdot erase cutdraw image pickup numeric_pickup
|
||||
syn keyword mpMacro pen_lft pen_rt pen_top pen_bot savepen clearpen
|
||||
syn keyword mpMacro clear_pen_memory lft rt top bot ulft urt llft lrt
|
||||
syn keyword mpMacro penpos penstroke arrowhead makelabel labels penlabel
|
||||
syn keyword mpMacro range numtok thru clearxy clearit clearpen pickup
|
||||
syn keyword mpMacro shipit bye hide stop solve
|
||||
if get(g:, "plain_mp_macros", 1) || get(g:, "mp_metafun_macros", 0)
|
||||
syn keyword mpDef beginfig clear_pen_memory clearit clearpen clearpen
|
||||
syn keyword mpDef clearxy colorpart cutdraw downto draw drawarrow
|
||||
syn keyword mpDef drawdblarrow drawdot drawoptions endfig erase
|
||||
syn keyword mpDef exitunless fill filldraw flex gobble hide interact
|
||||
syn keyword mpDef label loggingall makelabel numtok penstroke pickup
|
||||
syn keyword mpDef range reflectedabout rotatedaround shipit
|
||||
syn keyword mpDef stop superellipse takepower tracingall tracingnone
|
||||
syn keyword mpDef undraw undrawdot unfill unfilldraw upto
|
||||
syn match mpDef "???"
|
||||
syn keyword mpVardef arrowhead bbox bot buildcycle byte ceiling center
|
||||
syn keyword mpVardef counterclockwise decr dir direction directionpoint
|
||||
syn keyword mpVardef dotlabel dotlabels image incr interpath inverse
|
||||
syn keyword mpVardef labels lft magstep max min penlabels penpos round
|
||||
syn keyword mpVardef rt savepen solve tensepath thelabel top unitvector
|
||||
syn keyword mpVardef whatever z
|
||||
syn keyword mpPrimaryDef div dotprod gobbled mod
|
||||
syn keyword mpSecondaryDef intersectionpoint
|
||||
syn keyword mpTertiaryDef cutafter cutbefore softjoin thru
|
||||
syn keyword mpNewInternal ahangle ahlength bboxmargin beveled butt defaultpen
|
||||
syn keyword mpNewInternal defaultscale dotlabeldiam eps epsilon infinity
|
||||
syn keyword mpNewInternal join_radius labeloffset mitered pen_bot pen_lft
|
||||
syn keyword mpNewInternal pen_rt pen_top rounded squared tolerance
|
||||
" Predefined constants
|
||||
syn keyword mpConstant EOF background base_name base_version black
|
||||
syn keyword mpConstant blankpicture blue ditto down evenly fullcircle
|
||||
syn keyword mpConstant green halfcircle identity left origin penrazor
|
||||
syn keyword mpConstant penspeck pensquare quartercircle red right
|
||||
syn keyword mpConstant unitsquare up white withdots
|
||||
" Other predefined variables
|
||||
syn keyword mpVariable currentpen currentpen_path currentpicture cuttings
|
||||
syn keyword mpVariable defaultfont extra_beginfig extra_endfig
|
||||
syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\>/
|
||||
syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\.\%(lft\|rt\|bot\|top\|ulft\|urt\|llft\|lrt\)\>/
|
||||
" let statements:
|
||||
syn keyword mpnumExp abs
|
||||
syn keyword mpDef rotatedabout
|
||||
syn keyword mpCommand bye relax
|
||||
" on and off are not technically keywords, but it is nice to highlight them
|
||||
" inside dashpattern().
|
||||
syn keyword mpOnOff off on contained
|
||||
syn keyword mpDash dashpattern contained
|
||||
syn region mpDashPattern
|
||||
\ start="dashpattern\s*"
|
||||
\ end=")"he=e-1
|
||||
\ contains=mfNumeric,mfLength,mpOnOff,mpDash
|
||||
endif
|
||||
|
||||
" Keywords defined by mfplain.mp
|
||||
if !exists("mfplain_mp_macros")
|
||||
let mfplain_mp_macros = 0 " Set this to '1' to include these macro names
|
||||
endif
|
||||
if mfplain_mp_macros
|
||||
syn keyword mpMacro beginchar blacker capsule_def change_width
|
||||
syn keyword mpMacro define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mpMacro define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mpMacro define_horizontal_corrected_pixels
|
||||
syn keyword mpMacro define_pixels define_whole_blacker_pixels
|
||||
syn keyword mpMacro define_whole_vertical_blacker_pixels
|
||||
syn keyword mpMacro define_whole_vertical_pixels endchar
|
||||
syn keyword mpMacro extra_beginchar extra_endchar extra_setup
|
||||
syn keyword mpMacro font_coding_scheme font_extra_space font_identifier
|
||||
syn keyword mpMacro font_normal_shrink font_normal_space
|
||||
syn keyword mpMacro font_normal_stretch font_quad font_size
|
||||
syn keyword mpMacro font_slant font_x_height italcorr labelfont
|
||||
syn keyword mpMacro makebox makegrid maketicks mode_def mode_setup
|
||||
syn keyword mpMacro o_correction proofrule proofrulethickness rulepen smode
|
||||
|
||||
if get(g:, "mfplain_mp_macros", 0)
|
||||
syn keyword mpDef beginchar capsule_def change_width
|
||||
syn keyword mpDef define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mpDef define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mpDef define_horizontal_corrected_pixels define_pixels
|
||||
syn keyword mpDef define_whole_blacker_pixels define_whole_pixels
|
||||
syn keyword mpDef define_whole_vertical_blacker_pixels
|
||||
syn keyword mpDef define_whole_vertical_pixels endchar
|
||||
syn keyword mpDef font_coding_scheme font_extra_space font_identifier
|
||||
syn keyword mpDef font_normal_shrink font_normal_space
|
||||
syn keyword mpDef font_normal_stretch font_quad font_size font_slant
|
||||
syn keyword mpDef font_x_height italcorr labelfont lowres_fix makebox
|
||||
syn keyword mpDef makegrid maketicks mode_def mode_setup proofrule
|
||||
syn keyword mpDef smode
|
||||
syn keyword mpVardef hround proofrulethickness vround
|
||||
syn keyword mpNewInternal blacker o_correction
|
||||
syn keyword mpVariable extra_beginchar extra_endchar extra_setup rulepen
|
||||
" plus some no-ops, also from mfplain.mp
|
||||
syn keyword mpMacro cullit currenttransform gfcorners grayfont hround
|
||||
syn keyword mpMacro imagerules lowres_fix nodisplays notransforms openit
|
||||
syn keyword mpMacro proofoffset screenchars screenrule screenstrokes
|
||||
syn keyword mpMacro showit slantfont titlefont unitpixel vround
|
||||
syn keyword mpDef cull cullit gfcorners imagerules nodisplays
|
||||
syn keyword mpDef notransforms openit proofoffset screenchars
|
||||
syn keyword mpDef screenrule screenstrokes showit
|
||||
syn keyword mpVardef grayfont slantfont titlefont
|
||||
syn keyword mpVariable currenttransform
|
||||
syn keyword mpConstant unitpixel
|
||||
" These are not listed in the MetaPost manual, and some are ignored by
|
||||
" MetaPost, but are nonetheless defined in mfplain.mp
|
||||
syn keyword mpDef killtext
|
||||
syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>"
|
||||
syn keyword mpVariable aspect_ratio localfont mag mode mode_name
|
||||
syn keyword mpVariable proofcolor
|
||||
syn keyword mpConstant lowres proof smoke
|
||||
syn keyword mpNewInternal autorounding bp_per_pixel granularity
|
||||
syn keyword mpNewInternal number_of_modes proofing smoothing turningcheck
|
||||
endif
|
||||
|
||||
" Keywords defined by other macro packages, e.g., boxes.mp
|
||||
if !exists("other_mp_macros")
|
||||
let other_mp_macros = 1 " Set this to '0' if your source gets too colourful
|
||||
endif
|
||||
if other_mp_macros
|
||||
syn keyword mpMacro circmargin defaultdx defaultdy
|
||||
syn keyword mpMacro boxit boxjoin bpath circleit drawboxed drawboxes
|
||||
syn keyword mpMacro drawunboxed fixpos fixsize pic
|
||||
" Keywords defined by all base macro packages:
|
||||
" - (r)boxes.mp
|
||||
" - format.mp
|
||||
" - graph.mp
|
||||
" - marith.mp
|
||||
" - sarith.mp
|
||||
" - string.mp
|
||||
" - TEX.mp
|
||||
if get(g:, "other_mp_macros", 1)
|
||||
" boxes and rboxes
|
||||
syn keyword mpDef boxjoin drawboxed drawboxes drawunboxed
|
||||
syn keyword mpNewInternal circmargin defaultdx defaultdy rbox_radius
|
||||
syn keyword mpVardef boxit bpath circleit fixpos fixsize generic_declare
|
||||
syn keyword mpVardef generic_redeclare generisize pic rboxit str_prefix
|
||||
" format
|
||||
syn keyword mpVardef Mformat format init_numbers roundd
|
||||
syn keyword mpVariable Fe_base Fe_plus
|
||||
syn keyword mpConstant Ten_to
|
||||
" graph
|
||||
syn keyword mpDef Gfor Gxyscale OUT auto begingraph endgraph gdata
|
||||
syn keyword mpDef gdraw gdrawarrow gdrawdblarrow gfill plot
|
||||
syn keyword mpVardef augment autogrid frame gdotlabel glabel grid itick
|
||||
syn keyword mpVardef otick
|
||||
syn keyword mpVardef Mreadpath setcoords setrange
|
||||
syn keyword mpNewInternal Gmarks Gminlog Gpaths linear log
|
||||
syn keyword mpVariable Autoform Gemarks Glmarks Gumarks
|
||||
syn keyword mpConstant Gtemplate
|
||||
syn match mpVariable /Gmargin\.\%(low\|high\)/
|
||||
" marith
|
||||
syn keyword mpVardef Mabs Meform Mexp Mexp_str Mlog Mlog_Str Mlog_str
|
||||
syn keyword mpPrimaryDef Mdiv Mmul
|
||||
syn keyword mpSecondaryDef Madd Msub
|
||||
syn keyword mpTertiaryDef Mleq
|
||||
syn keyword mpNewInternal Mten Mzero
|
||||
" sarith
|
||||
syn keyword mpVardef Sabs Scvnum
|
||||
syn keyword mpPrimaryDef Sdiv Smul
|
||||
syn keyword mpSecondaryDef Sadd Ssub
|
||||
syn keyword mpTertiaryDef Sleq Sneq
|
||||
" string
|
||||
syn keyword mpVardef cspan isdigit loptok
|
||||
" TEX
|
||||
syn keyword mpVardef TEX TEXPOST TEXPRE
|
||||
endif
|
||||
|
||||
" Up to date as of 23-Sep-2016.
|
||||
if get(g:, "mp_metafun_macros", 0)
|
||||
" These keywords have been added manually.
|
||||
syn keyword mpPrimitive runscript
|
||||
|
||||
" The following MetaFun keywords have been extracted automatically from
|
||||
" ConTeXt source code. They include all "public" macros (where a macro is
|
||||
" considered public if and only if it does not start with _, mfun_, mlib_, or
|
||||
" do_, and it does not end with _), all "public" unsaved variables, and all
|
||||
" `let` statements.
|
||||
|
||||
" mp-abck.mpiv
|
||||
syn keyword mpDef abck_grid_line anchor_box box_found boxfilloptions
|
||||
syn keyword mpDef boxgridoptions boxlineoptions draw_multi_pars
|
||||
syn keyword mpDef draw_multi_side draw_multi_side_path freeze_box
|
||||
syn keyword mpDef initialize_box initialize_box_pos
|
||||
syn keyword mpDef multi_side_draw_options show_multi_kind
|
||||
syn keyword mpDef show_multi_pars
|
||||
syn keyword mpVardef abck_baseline_grid abck_draw_path abck_graphic_grid
|
||||
syn keyword mpVariable boxdashtype boxfilloffset boxfilltype
|
||||
syn keyword mpVariable boxgriddirection boxgriddistance boxgridshift
|
||||
syn keyword mpVariable boxgridtype boxgridwidth boxlineoffset
|
||||
syn keyword mpVariable boxlineradius boxlinetype boxlinewidth multikind
|
||||
syn keyword mpConstant context_abck
|
||||
" mp-apos.mpiv
|
||||
syn keyword mpDef anch_sidebars_draw boxfilloptions boxlineoptions
|
||||
syn keyword mpDef connect_positions
|
||||
syn keyword mpConstant context_apos
|
||||
" mp-asnc.mpiv
|
||||
syn keyword mpDef FlushSyncTasks ProcessSyncTask ResetSyncTasks
|
||||
syn keyword mpDef SetSyncColor SetSyncThreshold SyncTask
|
||||
syn keyword mpVardef PrepareSyncTasks SyncBox TheSyncColor
|
||||
syn keyword mpVardef TheSyncThreshold
|
||||
syn keyword mpVariable CurrentSyncClass NOfSyncPaths SyncColor
|
||||
syn keyword mpVariable SyncLeftOffset SyncPaths SyncTasks SyncThreshold
|
||||
syn keyword mpVariable SyncThresholdMethod SyncWidth
|
||||
syn keyword mpConstant context_asnc
|
||||
" mp-back.mpiv
|
||||
syn keyword mpDef some_double_back some_hash
|
||||
syn keyword mpVariable back_nillcolor
|
||||
syn keyword mpConstant context_back
|
||||
" mp-bare.mpiv
|
||||
syn keyword mpVardef colordecimals rawtextext
|
||||
syn keyword mpPrimaryDef infont
|
||||
syn keyword mpConstant context_bare
|
||||
" mp-base.mpiv
|
||||
" This is essentially plain.mp with only a few keywords added
|
||||
syn keyword mpNumExp graypart
|
||||
syn keyword mpType graycolor greycolor
|
||||
syn keyword mpConstant cyan magenta yellow
|
||||
" mp-butt.mpiv
|
||||
syn keyword mpDef predefinedbutton some_button
|
||||
syn keyword mpConstant context_butt
|
||||
" mp-char.mpiv
|
||||
syn keyword mpDef flow_begin_chart flow_begin_sub_chart
|
||||
syn keyword mpDef flow_chart_draw_comment flow_chart_draw_exit
|
||||
syn keyword mpDef flow_chart_draw_label flow_chart_draw_text
|
||||
syn keyword mpDef flow_clip_chart flow_collapse_points
|
||||
syn keyword mpDef flow_connect_bottom_bottom flow_connect_bottom_left
|
||||
syn keyword mpDef flow_connect_bottom_right flow_connect_bottom_top
|
||||
syn keyword mpDef flow_connect_left_bottom flow_connect_left_left
|
||||
syn keyword mpDef flow_connect_left_right flow_connect_left_top
|
||||
syn keyword mpDef flow_connect_right_bottom flow_connect_right_left
|
||||
syn keyword mpDef flow_connect_right_right flow_connect_right_top
|
||||
syn keyword mpDef flow_connect_top_bottom flow_connect_top_left
|
||||
syn keyword mpDef flow_connect_top_right flow_connect_top_top
|
||||
syn keyword mpDef flow_draw_connection flow_draw_connection_point
|
||||
syn keyword mpDef flow_draw_midpoint flow_draw_shape
|
||||
syn keyword mpDef flow_draw_test_area flow_draw_test_shape
|
||||
syn keyword mpDef flow_draw_test_shapes flow_end_chart
|
||||
syn keyword mpDef flow_end_sub_chart flow_flush_connections
|
||||
syn keyword mpDef flow_flush_picture flow_flush_pictures
|
||||
syn keyword mpDef flow_flush_shape flow_flush_shapes
|
||||
syn keyword mpDef flow_initialize_grid flow_new_chart flow_new_shape
|
||||
syn keyword mpDef flow_scaled_to_grid flow_show_connection
|
||||
syn keyword mpDef flow_show_connections flow_show_shapes
|
||||
syn keyword mpDef flow_xy_offset flow_y_pos
|
||||
syn keyword mpVardef flow_connection_path flow_down_on_grid
|
||||
syn keyword mpVardef flow_down_to_grid flow_i_point flow_left_on_grid
|
||||
syn keyword mpVardef flow_left_to_grid flow_offset
|
||||
syn keyword mpVardef flow_points_initialized flow_right_on_grid
|
||||
syn keyword mpVardef flow_right_to_grid flow_smooth_connection
|
||||
syn keyword mpVardef flow_trim_points flow_trimmed flow_up_on_grid
|
||||
syn keyword mpVardef flow_up_to_grid flow_valid_connection
|
||||
syn keyword mpVardef flow_x_on_grid flow_xy_bottom flow_xy_left
|
||||
syn keyword mpVardef flow_xy_on_grid flow_xy_right flow_xy_top
|
||||
syn keyword mpVardef flow_y_on_grid
|
||||
syn keyword mpVariable flow_arrowtip flow_chart_background_color
|
||||
syn keyword mpVariable flow_chart_offset flow_comment_offset
|
||||
syn keyword mpVariable flow_connection_arrow_size
|
||||
syn keyword mpVariable flow_connection_dash_size
|
||||
syn keyword mpVariable flow_connection_line_color
|
||||
syn keyword mpVariable flow_connection_line_width
|
||||
syn keyword mpVariable flow_connection_smooth_size flow_connections
|
||||
syn keyword mpVariable flow_cpath flow_dash_pattern flow_dashline
|
||||
syn keyword mpVariable flow_exit_offset flow_forcevalid flow_grid_height
|
||||
syn keyword mpVariable flow_grid_width flow_label_offset flow_max_x
|
||||
syn keyword mpVariable flow_max_y flow_peepshape flow_reverse_connection
|
||||
syn keyword mpVariable flow_reverse_y flow_shape_action flow_shape_archive
|
||||
syn keyword mpVariable flow_shape_decision flow_shape_down
|
||||
syn keyword mpVariable flow_shape_fill_color flow_shape_height
|
||||
syn keyword mpVariable flow_shape_left flow_shape_line_color
|
||||
syn keyword mpVariable flow_shape_line_width flow_shape_loop
|
||||
syn keyword mpVariable flow_shape_multidocument flow_shape_node
|
||||
syn keyword mpVariable flow_shape_procedure flow_shape_product
|
||||
syn keyword mpVariable flow_shape_right flow_shape_singledocument
|
||||
syn keyword mpVariable flow_shape_subprocedure flow_shape_up
|
||||
syn keyword mpVariable flow_shape_wait flow_shape_width
|
||||
syn keyword mpVariable flow_show_all_points flow_show_con_points
|
||||
syn keyword mpVariable flow_show_mid_points flow_showcrossing flow_smooth
|
||||
syn keyword mpVariable flow_touchshape flow_xypoint flow_zfactor
|
||||
syn keyword mpConstant context_flow
|
||||
" mp-chem.mpiv
|
||||
syn keyword mpDef chem_init_all chem_reset chem_start_structure
|
||||
syn keyword mpDef chem_transformed
|
||||
syn keyword mpVardef chem_ad chem_adj chem_align chem_arrow chem_au
|
||||
syn keyword mpVardef chem_b chem_bb chem_bd chem_bw chem_c chem_cc
|
||||
syn keyword mpVardef chem_ccd chem_cd chem_crz chem_cz chem_dash chem_db
|
||||
syn keyword mpVardef chem_diff chem_dir chem_do chem_dr chem_draw
|
||||
syn keyword mpVardef chem_drawarrow chem_eb chem_ed chem_ep chem_er
|
||||
syn keyword mpVardef chem_es chem_et chem_fill chem_hb chem_init_some
|
||||
syn keyword mpVardef chem_label chem_ldb chem_ldd chem_line chem_lr
|
||||
syn keyword mpVardef chem_lrb chem_lrbd chem_lrd chem_lrh chem_lrn
|
||||
syn keyword mpVardef chem_lrt chem_lrz chem_lsr chem_lsub chem_mark
|
||||
syn keyword mpVardef chem_marked chem_mid chem_mids chem_midz chem_mir
|
||||
syn keyword mpVardef chem_mov chem_move chem_number chem_oe chem_off
|
||||
syn keyword mpVardef chem_pb chem_pe chem_r chem_r_fragment chem_rb
|
||||
syn keyword mpVardef chem_rbd chem_rd chem_rdb chem_rdd chem_restore
|
||||
syn keyword mpVardef chem_rh chem_rm chem_rn chem_rot chem_rr chem_rrb
|
||||
syn keyword mpVardef chem_rrbd chem_rrd chem_rrh chem_rrn chem_rrt
|
||||
syn keyword mpVardef chem_rrz chem_rsr chem_rsub chem_rt chem_rz chem_s
|
||||
syn keyword mpVardef chem_save chem_sb chem_sd chem_set chem_sr chem_ss
|
||||
syn keyword mpVardef chem_start_component chem_stop_component
|
||||
syn keyword mpVardef chem_stop_structure chem_sub chem_symbol chem_tb
|
||||
syn keyword mpVardef chem_text chem_z chem_zln chem_zlt chem_zn chem_zrn
|
||||
syn keyword mpVardef chem_zrt chem_zt
|
||||
syn keyword mpVariable chem_mark_pair chem_stack_mirror chem_stack_origin
|
||||
syn keyword mpVariable chem_stack_p chem_stack_previous
|
||||
syn keyword mpVariable chem_stack_rotation chem_trace_boundingbox
|
||||
syn keyword mpVariable chem_trace_nesting chem_trace_text
|
||||
syn keyword mpConstant context_chem
|
||||
" mp-core.mpiv
|
||||
syn keyword mpDef FlushSyncTasks ProcessSyncTask
|
||||
syn keyword mpDef RegisterLocalTextArea RegisterPlainTextArea
|
||||
syn keyword mpDef RegisterRegionTextArea RegisterTextArea
|
||||
syn keyword mpDef ResetLocalTextArea ResetSyncTasks ResetTextAreas
|
||||
syn keyword mpDef SaveTextAreas SetSyncColor SetSyncThreshold
|
||||
syn keyword mpDef SyncTask anchor_box box_found boxfilloptions
|
||||
syn keyword mpDef boxgridoptions boxlineoptions collapse_multi_pars
|
||||
syn keyword mpDef draw_box draw_multi_pars draw_par freeze_box
|
||||
syn keyword mpDef initialize_area initialize_area_par initialize_box
|
||||
syn keyword mpDef initialize_box_pos initialize_par
|
||||
syn keyword mpDef prepare_multi_pars relocate_multipars save_multipar
|
||||
syn keyword mpDef set_par_line_height show_multi_pars show_par
|
||||
syn keyword mpDef simplify_multi_pars sort_multi_pars
|
||||
syn keyword mpVardef InsideSavedTextArea InsideSomeSavedTextArea
|
||||
syn keyword mpVardef InsideSomeTextArea InsideTextArea PrepareSyncTasks
|
||||
syn keyword mpVardef SyncBox TextAreaH TextAreaW TextAreaWH TextAreaX
|
||||
syn keyword mpVardef TextAreaXY TextAreaY TheSyncColor TheSyncThreshold
|
||||
syn keyword mpVardef baseline_grid graphic_grid multi_par_at_top
|
||||
syn keyword mpVariable CurrentSyncClass NOfSavedTextAreas
|
||||
syn keyword mpVariable NOfSavedTextColumns NOfSyncPaths NOfTextAreas
|
||||
syn keyword mpVariable NOfTextColumns PlainTextArea RegionTextArea
|
||||
syn keyword mpVariable SavedTextColumns SyncColor SyncLeftOffset SyncPaths
|
||||
syn keyword mpVariable SyncTasks SyncThreshold SyncThresholdMethod
|
||||
syn keyword mpVariable SyncWidth TextAreas TextColumns
|
||||
syn keyword mpVariable auto_multi_par_hsize boxdashtype boxfilloffset
|
||||
syn keyword mpVariable boxfilltype boxgriddirection boxgriddistance
|
||||
syn keyword mpVariable boxgridshift boxgridtype boxgridwidth boxlineradius
|
||||
syn keyword mpVariable boxlinetype boxlinewidth check_multi_par_chain
|
||||
syn keyword mpVariable compensate_multi_par_topskip
|
||||
syn keyword mpVariable enable_multi_par_fallback force_multi_par_chain
|
||||
syn keyword mpVariable ignore_multi_par_page last_multi_par_shift lefthang
|
||||
syn keyword mpVariable local_multi_par_area multi_column_first_page_hack
|
||||
syn keyword mpVariable multi_par_pages multiloc multilocs multipar
|
||||
syn keyword mpVariable multipars multiref multirefs nofmultipars
|
||||
syn keyword mpVariable obey_multi_par_hang obey_multi_par_more
|
||||
syn keyword mpVariable one_piece_multi_par par_hang_after par_hang_indent
|
||||
syn keyword mpVariable par_indent par_left_skip par_line_height
|
||||
syn keyword mpVariable par_right_skip par_start_pos par_stop_pos
|
||||
syn keyword mpVariable par_strut_depth par_strut_height ppos righthang
|
||||
syn keyword mpVariable snap_multi_par_tops somehang span_multi_column_pars
|
||||
syn keyword mpVariable use_multi_par_region
|
||||
syn keyword mpConstant context_core
|
||||
syn keyword LET anchor_area anchor_par draw_area
|
||||
" mp-cows.mpiv
|
||||
syn keyword mpConstant context_cows cow
|
||||
" mp-crop.mpiv
|
||||
syn keyword mpDef page_marks_add_color page_marks_add_lines
|
||||
syn keyword mpDef page_marks_add_marking page_marks_add_number
|
||||
syn keyword mpVardef crop_color crop_gray crop_marks_cmyk
|
||||
syn keyword mpVardef crop_marks_cmykrgb crop_marks_gray crop_marks_lines
|
||||
syn keyword mpVariable crop_colors more page
|
||||
syn keyword mpConstant context_crop
|
||||
" mp-figs.mpiv
|
||||
syn keyword mpDef naturalfigure registerfigure
|
||||
syn keyword mpVardef figuredimensions figureheight figuresize
|
||||
syn keyword mpVardef figurewidth
|
||||
syn keyword mpConstant context_figs
|
||||
" mp-fobg.mpiv
|
||||
syn keyword mpDef DrawFoFrame
|
||||
syn keyword mpVardef equalpaths
|
||||
syn keyword mpPrimaryDef inset outset
|
||||
syn keyword mpVariable FoBackground FoBackgroundColor FoFrame FoLineColor
|
||||
syn keyword mpVariable FoLineStyle FoLineWidth FoSplit
|
||||
syn keyword mpConstant FoAll FoBottom FoDash FoDotted FoDouble FoGroove
|
||||
syn keyword mpConstant FoHidden FoInset FoLeft FoMedium FoNoColor FoNone
|
||||
syn keyword mpConstant FoOutset FoRidge FoRight FoSolid FoThick FoThin
|
||||
syn keyword mpConstant FoTop context_fobg
|
||||
" mp-form.mpiv
|
||||
syn keyword mpConstant context_form
|
||||
" mp-func.mpiv
|
||||
syn keyword mpDef constructedfunction constructedpairs
|
||||
syn keyword mpDef constructedpath curvedfunction curvedpairs
|
||||
syn keyword mpDef curvedpath function pathconnectors straightfunction
|
||||
syn keyword mpDef straightpairs straightpath
|
||||
syn keyword mpConstant context_func
|
||||
" mp-grap.mpiv
|
||||
syn keyword mpDef Gfor OUT auto begingraph circles crosses diamonds
|
||||
syn keyword mpDef downtriangles endgraph gdata gdraw gdrawarrow
|
||||
syn keyword mpDef gdrawdblarrow gfill graph_addto
|
||||
syn keyword mpDef graph_addto_currentpicture graph_comma
|
||||
syn keyword mpDef graph_coordinate_multiplication graph_draw
|
||||
syn keyword mpDef graph_draw_label graph_errorbar_text graph_fill
|
||||
syn keyword mpDef graph_generate_exponents
|
||||
syn keyword mpDef graph_generate_label_position
|
||||
syn keyword mpDef graph_generate_numbers graph_label_location
|
||||
syn keyword mpDef graph_scan_mark graph_scan_marks graph_setbounds
|
||||
syn keyword mpDef graph_suffix graph_tick_label
|
||||
syn keyword mpDef graph_with_pen_and_color graph_withlist
|
||||
syn keyword mpDef graph_xyscale lefttriangles makefunctionpath plot
|
||||
syn keyword mpDef plotsymbol points rainbow righttriangles smoothpath
|
||||
syn keyword mpDef squares stars uptriangles witherrorbars
|
||||
syn keyword mpVardef addtopath augment autogrid constant_fit
|
||||
syn keyword mpVardef constant_function det escaped_format exp
|
||||
syn keyword mpVardef exponential_fit exponential_function format
|
||||
syn keyword mpVardef formatted frame functionpath gaussian_fit
|
||||
syn keyword mpVardef gaussian_function gdotlabel glabel graph_Feform
|
||||
syn keyword mpVardef graph_Meform graph_arrowhead_extent graph_bounds
|
||||
syn keyword mpVardef graph_clear_bounds
|
||||
syn keyword mpVardef graph_convert_user_path_to_internal graph_cspan
|
||||
syn keyword mpVardef graph_draw_arrowhead graph_error graph_errorbars
|
||||
syn keyword mpVardef graph_exp graph_factor_and_exponent_to_string
|
||||
syn keyword mpVardef graph_gridline_picture graph_is_null
|
||||
syn keyword mpVardef graph_label_convert_user_to_internal graph_loptok
|
||||
syn keyword mpVardef graph_match_exponents graph_mlog
|
||||
syn keyword mpVardef graph_modified_exponent_ypart graph_pair_adjust
|
||||
syn keyword mpVardef graph_picture_conversion graph_post_draw
|
||||
syn keyword mpVardef graph_read_line graph_readpath graph_remap
|
||||
syn keyword mpVardef graph_scan_path graph_select_exponent_mark
|
||||
syn keyword mpVardef graph_select_mark graph_set_bounds
|
||||
syn keyword mpVardef graph_set_default_bounds graph_shapesize
|
||||
syn keyword mpVardef graph_stash_label graph_tick_mark_spacing
|
||||
syn keyword mpVardef graph_unknown_pair_bbox grid isdigit itick
|
||||
syn keyword mpVardef linear_fit linear_function ln logten lorentzian_fit
|
||||
syn keyword mpVardef lorentzian_function otick polynomial_fit
|
||||
syn keyword mpVardef polynomial_function power_law_fit
|
||||
syn keyword mpVardef power_law_function powten setcoords setrange
|
||||
syn keyword mpVardef sortpath strfmt tick varfmt
|
||||
syn keyword mpNewInternal Mzero doubleinfinity graph_log_minimum
|
||||
syn keyword mpNewInternal graph_minimum_number_of_marks largestmantissa
|
||||
syn keyword mpNewInternal linear lntwo log mlogten singleinfinity
|
||||
syn keyword mpVariable Autoform determinant fit_chi_squared
|
||||
syn keyword mpVariable graph_errorbar_picture graph_exp_marks
|
||||
syn keyword mpVariable graph_frame_pair_a graph_frame_pair_b
|
||||
syn keyword mpVariable graph_lin_marks graph_log_marks graph_modified_bias
|
||||
syn keyword mpVariable graph_modified_higher graph_modified_lower
|
||||
syn keyword mpVariable graph_shape r_s resistance_color resistance_name
|
||||
syn keyword mpConstant context_grap
|
||||
" mp-grid.mpiv
|
||||
syn keyword mpDef hlingrid hloggrid vlingrid vloggrid
|
||||
syn keyword mpVardef hlinlabel hlintext hlogtext linlin linlinpath
|
||||
syn keyword mpVardef linlog linlogpath loglin loglinpath loglog
|
||||
syn keyword mpVardef loglogpath processpath vlinlabel vlintext vlogtext
|
||||
syn keyword mpVariable fmt_initialize fmt_pictures fmt_precision
|
||||
syn keyword mpVariable fmt_separator fmt_zerocheck grid_eps
|
||||
syn keyword mpConstant context_grid
|
||||
" mp-grph.mpiv
|
||||
syn keyword mpDef beginfig begingraphictextfig data_mpo_file
|
||||
syn keyword mpDef data_mpy_file doloadfigure draw endfig
|
||||
syn keyword mpDef endgraphictextfig fill fixedplace graphictext
|
||||
syn keyword mpDef loadfigure new_graphictext normalwithshade number
|
||||
syn keyword mpDef old_graphictext outlinefill protectgraphicmacros
|
||||
syn keyword mpDef resetfig reversefill withdrawcolor withfillcolor
|
||||
syn keyword mpDef withshade
|
||||
syn keyword mpVariable currentgraphictext figureshift
|
||||
syn keyword mpConstant context_grph
|
||||
" mp-idea.mpiv
|
||||
syn keyword mpVardef bcomponent ccomponent gcomponent mcomponent
|
||||
syn keyword mpVardef rcomponent somecolor ycomponent
|
||||
" mp-luas.mpiv
|
||||
syn keyword mpDef luacall message
|
||||
syn keyword mpVardef MP lua lualist
|
||||
syn keyword mpConstant context_luas
|
||||
" mp-mlib.mpiv
|
||||
syn keyword mpDef autoalign bitmapimage circular_shade cmyk comment
|
||||
syn keyword mpDef defineshade eofill eofillup externalfigure figure
|
||||
syn keyword mpDef fillup label linear_shade multitonecolor namedcolor
|
||||
syn keyword mpDef nofill onlayer passarrayvariable passvariable
|
||||
syn keyword mpDef plain_label register resolvedcolor scantokens
|
||||
syn keyword mpDef set_circular_vector set_linear_vector shaded
|
||||
syn keyword mpDef spotcolor startpassingvariable stoppassingvariable
|
||||
syn keyword mpDef thelabel transparent[] usemetafunlabels
|
||||
syn keyword mpDef useplainlabels withcircularshade withlinearshade
|
||||
syn keyword mpDef withmask withproperties withshadecenter
|
||||
syn keyword mpDef withshadecolors withshadedirection withshadedomain
|
||||
syn keyword mpDef withshadefactor withshadefraction withshadeorigin
|
||||
syn keyword mpDef withshaderadius withshadestep withshadetransform
|
||||
syn keyword mpDef withshadevector withtransparency
|
||||
syn keyword mpVardef anchored checkbounds checkedbounds
|
||||
syn keyword mpVardef define_circular_shade define_linear_shade dotlabel
|
||||
syn keyword mpVardef escaped_format fmttext fontsize format formatted
|
||||
syn keyword mpVardef installlabel onetimefmttext onetimetextext
|
||||
syn keyword mpVardef outlinetext plain_thelabel properties rawfmttext
|
||||
syn keyword mpVardef rawtexbox rawtextext rule strfmt strut texbox
|
||||
syn keyword mpVardef textext thefmttext thelabel thetexbox thetextext
|
||||
syn keyword mpVardef tostring transparency_alternative_to_number
|
||||
syn keyword mpVardef validtexbox varfmt verbatim
|
||||
syn keyword mpPrimaryDef asgroup infont normalinfont shadedinto
|
||||
syn keyword mpPrimaryDef shownshadecenter shownshadedirection
|
||||
syn keyword mpPrimaryDef shownshadeorigin shownshadevector withshade
|
||||
syn keyword mpPrimaryDef withshademethod
|
||||
syn keyword mpNewInternal colorburntransparent colordodgetransparent
|
||||
syn keyword mpNewInternal colortransparent darkentransparent
|
||||
syn keyword mpNewInternal differencetransparent exclusiontransparent
|
||||
syn keyword mpNewInternal hardlighttransparent huetransparent
|
||||
syn keyword mpNewInternal lightentransparent luminositytransparent
|
||||
syn keyword mpNewInternal multiplytransparent normaltransparent
|
||||
syn keyword mpNewInternal overlaytransparent saturationtransparent
|
||||
syn keyword mpNewInternal screentransparent shadefactor softlighttransparent
|
||||
syn keyword mpNewInternal textextoffset
|
||||
syn keyword mpType property transparency
|
||||
syn keyword mpVariable currentoutlinetext shadeddown shadedleft
|
||||
syn keyword mpVariable shadedright shadedup shadeoffset trace_shades
|
||||
syn keyword mpConstant context_mlib
|
||||
" mp-page.mpiv
|
||||
syn keyword mpDef BoundCoverAreas BoundPageAreas Enlarged FakeRule
|
||||
syn keyword mpDef FakeWord LoadPageState OverlayBox RuleColor
|
||||
syn keyword mpDef SetAreaVariables SetPageArea SetPageBackPage
|
||||
syn keyword mpDef SetPageCoverPage SetPageField SetPageFrontPage
|
||||
syn keyword mpDef SetPageHsize SetPageHstep SetPageLocation
|
||||
syn keyword mpDef SetPagePage SetPageSpine SetPageVariables
|
||||
syn keyword mpDef SetPageVsize SetPageVstep StartCover StartPage
|
||||
syn keyword mpDef StopCover StopPage SwapPageState innerenlarged
|
||||
syn keyword mpDef llEnlarged lrEnlarged outerenlarged ulEnlarged
|
||||
syn keyword mpDef urEnlarged
|
||||
syn keyword mpVardef BackPageHeight BackPageWidth BackSpace BaseLineSkip
|
||||
syn keyword mpVardef BodyFontSize BottomDistance BottomHeight
|
||||
syn keyword mpVardef BottomSpace CoverHeight CoverWidth CurrentColumn
|
||||
syn keyword mpVardef CurrentHeight CurrentWidth CutSpace EmWidth
|
||||
syn keyword mpVardef ExHeight FooterDistance FooterHeight
|
||||
syn keyword mpVardef FrontPageHeight FrontPageWidth HSize HeaderDistance
|
||||
syn keyword mpVardef HeaderHeight InPageBody InnerEdgeDistance
|
||||
syn keyword mpVardef InnerEdgeWidth InnerMarginDistance InnerMarginWidth
|
||||
syn keyword mpVardef InnerSpaceWidth LastPageNumber LayoutColumnDistance
|
||||
syn keyword mpVardef LayoutColumnWidth LayoutColumns LeftEdgeDistance
|
||||
syn keyword mpVardef LeftEdgeWidth LeftMarginDistance LeftMarginWidth
|
||||
syn keyword mpVardef LineHeight MakeupHeight MakeupWidth NOfColumns
|
||||
syn keyword mpVardef NOfPages OnOddPage OnRightPage OuterEdgeDistance
|
||||
syn keyword mpVardef OuterEdgeWidth OuterMarginDistance OuterMarginWidth
|
||||
syn keyword mpVardef OuterSpaceWidth OverlayDepth OverlayHeight
|
||||
syn keyword mpVardef OverlayLineWidth OverlayOffset OverlayWidth
|
||||
syn keyword mpVardef PageDepth PageFraction PageNumber PageOffset
|
||||
syn keyword mpVardef PaperBleed PaperHeight PaperWidth PrintPaperHeight
|
||||
syn keyword mpVardef PrintPaperWidth RealPageNumber RightEdgeDistance
|
||||
syn keyword mpVardef RightEdgeWidth RightMarginDistance RightMarginWidth
|
||||
syn keyword mpVardef SpineHeight SpineWidth StrutDepth StrutHeight
|
||||
syn keyword mpVardef TextHeight TextWidth TopDistance TopHeight TopSkip
|
||||
syn keyword mpVardef TopSpace VSize defaultcolormodel
|
||||
syn keyword mpVariable Area BackPage CoverPage CurrentLayout Field
|
||||
syn keyword mpVariable FrontPage HorPos Hsize Hstep Location Page
|
||||
syn keyword mpVariable PageStateAvailable RuleDepth RuleDirection
|
||||
syn keyword mpVariable RuleFactor RuleH RuleHeight RuleOffset RuleOption
|
||||
syn keyword mpVariable RuleThickness RuleV RuleWidth Spine VerPos Vsize
|
||||
syn keyword mpVariable Vstep
|
||||
syn keyword mpConstant context_page
|
||||
" mp-shap.mpiv
|
||||
syn keyword mpDef drawline drawshape some_shape
|
||||
syn keyword mpDef start_predefined_shape_definition
|
||||
syn keyword mpDef stop_predefined_shape_definition
|
||||
syn keyword mpVardef drawpredefinedline drawpredefinedshape
|
||||
syn keyword mpVardef some_shape_path
|
||||
syn keyword mpVariable predefined_shapes predefined_shapes_xradius
|
||||
syn keyword mpVariable predefined_shapes_xxradius
|
||||
syn keyword mpVariable predefined_shapes_yradius
|
||||
syn keyword mpVariable predefined_shapes_yyradius
|
||||
syn keyword mpConstant context_shap
|
||||
" mp-step.mpiv
|
||||
syn keyword mpDef initialize_step_variables midbottomboundary
|
||||
syn keyword mpDef midtopboundary step_begin_cell step_begin_chart
|
||||
syn keyword mpDef step_cell_ali step_cell_bot step_cell_top
|
||||
syn keyword mpDef step_cells step_end_cell step_end_chart
|
||||
syn keyword mpDef step_text_bot step_text_mid step_text_top
|
||||
syn keyword mpDef step_texts
|
||||
syn keyword mpVariable cell_distance_x cell_distance_y cell_fill_color
|
||||
syn keyword mpVariable cell_line_color cell_line_width cell_offset
|
||||
syn keyword mpVariable chart_align chart_category chart_vertical
|
||||
syn keyword mpVariable line_distance line_height line_line_color
|
||||
syn keyword mpVariable line_line_width line_offset nofcells
|
||||
syn keyword mpVariable text_distance_set text_fill_color text_line_color
|
||||
syn keyword mpVariable text_line_width text_offset
|
||||
syn keyword mpConstant context_cell
|
||||
" mp-symb.mpiv
|
||||
syn keyword mpDef finishglyph prepareglyph
|
||||
syn keyword mpConstant lefttriangle midbar onebar righttriangle sidebar
|
||||
syn keyword mpConstant sublefttriangle subrighttriangle twobar
|
||||
" mp-text.mpiv
|
||||
syn keyword mpDef build_parshape
|
||||
syn keyword mpVardef found_point
|
||||
syn keyword mpVariable trace_parshape
|
||||
syn keyword mpConstant context_text
|
||||
" mp-tool.mpiv
|
||||
syn keyword mpCommand dump
|
||||
syn keyword mpDef addbackground b_color beginglyph break centerarrow
|
||||
syn keyword mpDef clearxy condition data_mpd_file detaileddraw
|
||||
syn keyword mpDef detailpaths dowithpath draw drawboundary
|
||||
syn keyword mpDef drawboundingbox drawcontrollines drawcontrolpoints
|
||||
syn keyword mpDef drawfill draworigin drawpath drawpathonly
|
||||
syn keyword mpDef drawpathwithpoints drawpoint drawpointlabels
|
||||
syn keyword mpDef drawpoints drawticks drawwholepath drawxticks
|
||||
syn keyword mpDef drawyticks endglyph fill finishsavingdata g_color
|
||||
syn keyword mpDef inner_boundingbox job_name leftarrow loadmodule
|
||||
syn keyword mpDef midarrowhead naturalizepaths newboolean newcolor
|
||||
syn keyword mpDef newnumeric newpair newpath newpicture newstring
|
||||
syn keyword mpDef newtransform normalcolors normaldraw normalfill
|
||||
syn keyword mpDef normalwithcolor outer_boundingbox pop_boundingbox
|
||||
syn keyword mpDef popboundingbox popcurrentpicture push_boundingbox
|
||||
syn keyword mpDef pushboundingbox pushcurrentpicture r_color readfile
|
||||
syn keyword mpDef recolor redraw refill register_dirty_chars
|
||||
syn keyword mpDef remapcolor remapcolors remappedcolor reprocess
|
||||
syn keyword mpDef resetarrows resetcolormap resetdrawoptions
|
||||
syn keyword mpDef resolvedcolor restroke retext rightarrow savedata
|
||||
syn keyword mpDef saveoptions scale_currentpicture set_ahlength
|
||||
syn keyword mpDef set_grid showgrid startplaincompatibility
|
||||
syn keyword mpDef startsavingdata stopplaincompatibility
|
||||
syn keyword mpDef stopsavingdata stripe_path_a stripe_path_n undashed
|
||||
syn keyword mpDef undrawfill untext visualizeddraw visualizedfill
|
||||
syn keyword mpDef visualizepaths withcolor withgray
|
||||
syn keyword mpDef xscale_currentpicture xshifted
|
||||
syn keyword mpDef xyscale_currentpicture yscale_currentpicture
|
||||
syn keyword mpDef yshifted
|
||||
syn keyword mpVardef acos acosh anglebetween area arrowhead
|
||||
syn keyword mpVardef arrowheadonpath arrowpath asciistring asin asinh
|
||||
syn keyword mpVardef atan basiccolors bbheight bbwidth bcomponent
|
||||
syn keyword mpVardef blackcolor bottomboundary boundingbox c_phantom
|
||||
syn keyword mpVardef ccomponent center cleanstring colorcircle
|
||||
syn keyword mpVardef colordecimals colordecimalslist colorlike colorpart
|
||||
syn keyword mpVardef colortype complementary complemented copylist cos
|
||||
syn keyword mpVardef cosh cot cotd curved ddddecimal dddecimal ddecimal
|
||||
syn keyword mpVardef decorated drawarrowpath epsed exp freedotlabel
|
||||
syn keyword mpVardef freelabel gcomponent getunstringed grayed greyed
|
||||
syn keyword mpVardef hsvtorgb infinite innerboundingbox interpolated inv
|
||||
syn keyword mpVardef invcos inverted invsin invtan laddered leftboundary
|
||||
syn keyword mpVardef leftpath leftrightpath listsize listtocurves
|
||||
syn keyword mpVardef listtolines ln log mcomponent new_on_grid
|
||||
syn keyword mpVardef outerboundingbox paired pen_size penpoint phantom
|
||||
syn keyword mpVardef pointarrow pow punked rangepath rcomponent
|
||||
syn keyword mpVardef redecorated repathed rightboundary rightpath
|
||||
syn keyword mpVardef rotation roundedsquare set_inner_boundingbox
|
||||
syn keyword mpVardef set_outer_boundingbox setunstringed shapedlist
|
||||
syn keyword mpVardef simplified sin sinh sortlist sqr straightpath tan
|
||||
syn keyword mpVardef tand tanh tensecircle thefreelabel topboundary
|
||||
syn keyword mpVardef tripled undecorated unitvector unspiked unstringed
|
||||
syn keyword mpVardef whitecolor ycomponent
|
||||
syn keyword mpPrimaryDef along blownup bottomenlarged cornered crossed
|
||||
syn keyword mpPrimaryDef enlarged enlonged leftenlarged llenlarged llmoved
|
||||
syn keyword mpPrimaryDef lrenlarged lrmoved on paralleled randomized
|
||||
syn keyword mpPrimaryDef randomizedcontrols randomshifted rightenlarged
|
||||
syn keyword mpPrimaryDef shortened sized smoothed snapped softened squeezed
|
||||
syn keyword mpPrimaryDef stretched superellipsed topenlarged ulenlarged
|
||||
syn keyword mpPrimaryDef ulmoved uncolored urenlarged urmoved xsized
|
||||
syn keyword mpPrimaryDef xstretched xyscaled xysized ysized ystretched zmod
|
||||
syn keyword mpSecondaryDef anglestriped intersection_point numberstriped
|
||||
syn keyword mpSecondaryDef peepholed
|
||||
syn keyword mpTertiaryDef cutends
|
||||
syn keyword mpNewInternal ahdimple ahvariant anglelength anglemethod
|
||||
syn keyword mpNewInternal angleoffset charscale cmykcolormodel graycolormodel
|
||||
syn keyword mpNewInternal greycolormodel maxdimensions metapostversion
|
||||
syn keyword mpNewInternal nocolormodel rgbcolormodel striped_normal_inner
|
||||
syn keyword mpNewInternal striped_normal_outer striped_reverse_inner
|
||||
syn keyword mpNewInternal striped_reverse_outer
|
||||
syn keyword mpType grayscale greyscale quadruplet triplet
|
||||
syn keyword mpVariable ahfactor collapse_data color_map drawoptionsfactor
|
||||
syn keyword mpVariable freedotlabelsize freelabeloffset grid grid_full
|
||||
syn keyword mpVariable grid_h grid_left grid_nx grid_ny grid_w grid_x
|
||||
syn keyword mpVariable grid_y intersection_found originlength
|
||||
syn keyword mpVariable plain_compatibility_data pointlabelfont
|
||||
syn keyword mpVariable pointlabelscale refillbackground savingdata
|
||||
syn keyword mpVariable savingdatadone swappointlabels ticklength tickstep
|
||||
syn keyword mpConstant CRLF DQUOTE PERCENT SPACE bcircle context_tool crlf
|
||||
syn keyword mpConstant darkblue darkcyan darkgray darkgreen darkmagenta
|
||||
syn keyword mpConstant darkred darkyellow downtriangle dquote freesquare
|
||||
syn keyword mpConstant fulldiamond fullsquare fulltriangle lcircle
|
||||
syn keyword mpConstant lefttriangle lightgray llcircle lltriangle lrcircle
|
||||
syn keyword mpConstant lrtriangle mpversion nocolor noline oddly
|
||||
syn keyword mpConstant originpath percent rcircle righttriangle space
|
||||
syn keyword mpConstant tcircle triangle ulcircle ultriangle unitcircle
|
||||
syn keyword mpConstant unitdiamond unittriangle uptriangle urcircle
|
||||
syn keyword mpConstant urtriangle
|
||||
endif " MetaFun macros
|
||||
|
||||
" Define the default highlighting
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link mpTeXinsert String
|
||||
hi def link mpTeXbegin Statement
|
||||
hi def link mpTeXend Statement
|
||||
hi def link mpInternal mfInternal
|
||||
hi def link mpMacro Macro
|
||||
|
||||
hi def link mpTeXdelim mpPrimitive
|
||||
hi def link mpBoolExp mfBoolExp
|
||||
hi def link mpNumExp mfNumExp
|
||||
hi def link mpPairExp mfPairExp
|
||||
hi def link mpPathExp mfPathExp
|
||||
hi def link mpPenExp mfPenExp
|
||||
hi def link mpPicExp mfPicExp
|
||||
hi def link mpStringExp mfStringExp
|
||||
hi def link mpInternal mfInternal
|
||||
hi def link mpCommand mfCommand
|
||||
hi def link mpType mfType
|
||||
hi def link mpPrimitive mfPrimitive
|
||||
hi def link mpDef mfDef
|
||||
hi def link mpVardef mpDef
|
||||
hi def link mpPrimaryDef mpDef
|
||||
hi def link mpSecondaryDef mpDef
|
||||
hi def link mpTertiaryDef mpDef
|
||||
hi def link mpNewInternal mpInternal
|
||||
hi def link mpVariable mfVariable
|
||||
hi def link mpConstant mfConstant
|
||||
hi def link mpOnOff mpPrimitive
|
||||
hi def link mpDash mpPrimitive
|
||||
|
||||
let b:current_syntax = "mp"
|
||||
|
||||
" vim: ts=8
|
||||
let &cpo = s:cpo_sav
|
||||
unlet! s:cpo_sav
|
||||
|
||||
" vim:sw=2
|
||||
|
||||
+16
-18
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Aug 14
|
||||
" Last Change: 2016 Sep 14
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -88,14 +88,14 @@ syn keyword pythonAsync async await
|
||||
" followed by decorator name, optional parenthesized list of arguments,
|
||||
" and the next line with either def, class, or another decorator.
|
||||
syn match pythonDecorator
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\%(([^)]*)\)\=\s*\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
|
||||
\ display nextgroup=pythonDecoratorName skipwhite
|
||||
|
||||
" A dot must be allowed because of @MyClass.myfunc decorators.
|
||||
" It must be preceded by a decorator symbol and on a separate line from
|
||||
" a function/class it decorates.
|
||||
syn match pythonDecoratorName
|
||||
\ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\%(([^)]*)\)\=\s*\n\)\@="
|
||||
\ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\)\@="
|
||||
\ contained display nextgroup=pythonFunction skipnl
|
||||
|
||||
" The zero-length non-grouping match of def or class before the function
|
||||
@@ -289,43 +289,41 @@ endif
|
||||
" Sync at the beginning of class, function, or method definition.
|
||||
syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*("
|
||||
|
||||
|
||||
" The default highlight links. Can be overridden later.
|
||||
hi def link pythonStatement Statement
|
||||
hi def link pythonConditional Conditional
|
||||
hi def link pythonStatement Statement
|
||||
hi def link pythonConditional Conditional
|
||||
hi def link pythonRepeat Repeat
|
||||
hi def link pythonOperator Operator
|
||||
hi def link pythonException Exception
|
||||
hi def link pythonException Exception
|
||||
hi def link pythonInclude Include
|
||||
hi def link pythonAsync Statement
|
||||
hi def link pythonDecorator Define
|
||||
hi def link pythonDecoratorName Function
|
||||
hi def link pythonAsync Statement
|
||||
hi def link pythonDecorator Define
|
||||
hi def link pythonDecoratorName Function
|
||||
hi def link pythonFunction Function
|
||||
hi def link pythonComment Comment
|
||||
hi def link pythonTodo Todo
|
||||
hi def link pythonTodo Todo
|
||||
hi def link pythonString String
|
||||
hi def link pythonRawString String
|
||||
hi def link pythonRawString String
|
||||
hi def link pythonQuotes String
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonEscape Special
|
||||
if !exists("python_no_number_highlight")
|
||||
hi def link pythonNumber Number
|
||||
endif
|
||||
if !exists("python_no_builtin_highlight")
|
||||
hi def link pythonBuiltin Function
|
||||
hi def link pythonBuiltin Function
|
||||
endif
|
||||
if !exists("python_no_exception_highlight")
|
||||
hi def link pythonExceptions Structure
|
||||
hi def link pythonExceptions Structure
|
||||
endif
|
||||
if exists("python_space_error_highlight")
|
||||
hi def link pythonSpaceError Error
|
||||
hi def link pythonSpaceError Error
|
||||
endif
|
||||
if !exists("python_no_doctest_highlight")
|
||||
hi def link pythonDoctest Special
|
||||
hi def link pythonDoctest Special
|
||||
hi def link pythonDoctestValue Define
|
||||
endif
|
||||
|
||||
|
||||
let b:current_syntax = "python"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
||||
@@ -381,7 +381,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \
|
||||
|
||||
" Here Strings: {{{1
|
||||
" =============
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if it's a posix
|
||||
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
|
||||
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
|
||||
endif
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
@rem :h --remote-silent for more details
|
||||
@rem
|
||||
@rem --servername VS_NET
|
||||
@rem This will create a new instance of vim called VS_NET. So if you
|
||||
open
|
||||
@rem This will create a new instance of vim called VS_NET. So if you open
|
||||
@rem multiple files from VS, they will use the same instance of Vim.
|
||||
@rem This allows you to have multiple copies of Vim running, but you can
|
||||
@rem control which one has VS files in it.
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
vimtutor <ENTER>
|
||||
|
||||
4. Если вы уверены в том, что запомнили эти шаги, выполните шаги от 1 до 3
|
||||
чтобы выйти снова запустить редактор.
|
||||
чтобы выйти и снова запустить редактор.
|
||||
|
||||
Замечание! :q! <ENTER> отбрасывает любые сделанные вами изменения. Через
|
||||
несколько уроков вы узнаете как сохранять изменения в файл.
|
||||
|
||||
+14
-14
@@ -722,40 +722,40 @@ The MS-DOS support was removed in patch 7.4.1399.
|
||||
After you've built the Vim binaries as described above, you're ready to
|
||||
install Vim on your system. However, if you've obtained the Vim sources
|
||||
using Git, Mercurial or by downloading them as a unix tar file, you must
|
||||
first create a "vim74" directory. If you instead downloaded the sources as
|
||||
first create a "vim80" directory. If you instead downloaded the sources as
|
||||
zip files, you can skip this setup as the zip archives already have the
|
||||
correct directory structure.
|
||||
|
||||
A. Create a Vim "runtime" subdirectory named "vim74"
|
||||
A. Create a Vim "runtime" subdirectory named "vim80"
|
||||
-----------------------------------------------------
|
||||
If you obtained your Vim sources as zip files, you can skip this step.
|
||||
Otherwise, continue reading.
|
||||
|
||||
Go to the directory that contains the Vim "src" and "runtime"
|
||||
directories and create a new subdirectory named "vim74".
|
||||
directories and create a new subdirectory named "vim80".
|
||||
|
||||
Copy the "runtime" files into "vim74":
|
||||
copy runtime\* vim74
|
||||
Copy the "runtime" files into "vim80":
|
||||
copy runtime\* vim80
|
||||
|
||||
B. Copy the new binaries into the "vim74" directory
|
||||
B. Copy the new binaries into the "vim80" directory
|
||||
----------------------------------------------------
|
||||
Regardless of how you installed the Vim sources, you need to copy the
|
||||
new binaries you created above into "vim74":
|
||||
new binaries you created above into "vim80":
|
||||
|
||||
copy src\*.exe vim74
|
||||
copy src\GvimExt\gvimext.dll vim74
|
||||
copy src\xxd\xxd.exe vim74
|
||||
copy src\*.exe vim80
|
||||
copy src\GvimExt\gvimext.dll vim80
|
||||
copy src\xxd\xxd.exe vim80
|
||||
|
||||
C. Move the "vim74" directory into the Vim installation subdirectory
|
||||
C. Move the "vim80" directory into the Vim installation subdirectory
|
||||
---------------------------------------------------------------------
|
||||
Move the "vim74" subdirectory into the subdirectory where you want Vim
|
||||
Move the "vim80" subdirectory into the subdirectory where you want Vim
|
||||
to be installed. Typically, this subdirectory will be named "vim".
|
||||
If you already have a "vim74" subdirectory in "vim", delete it first
|
||||
If you already have a "vim80" subdirectory in "vim", delete it first
|
||||
by running its uninstal.exe program.
|
||||
|
||||
D. Install Vim
|
||||
---------------
|
||||
"cd" to your Vim installation subdirectory "vim\vim74" and run the
|
||||
"cd" to your Vim installation subdirectory "vim\vim80" and run the
|
||||
"install.exe" program. It will ask you a number of questions about
|
||||
how you would like to have your Vim setup. Among these are:
|
||||
- You can tell it to write a "_vimrc" file with your preferences in the
|
||||
|
||||
@@ -75,8 +75,8 @@ static DBPrefsWindowController *_sharedPrefsWindowController = nil;
|
||||
// If the developer attached a window to this controller
|
||||
// in Interface Builder, it gets replaced with this one.
|
||||
NSPanel *window = [[[NSPanel alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
|
||||
styleMask:(NSTitledWindowMask |
|
||||
NSClosableWindowMask)
|
||||
styleMask:(NSWindowStyleMaskTitled |
|
||||
NSWindowStyleMaskClosable)
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES] autorelease];
|
||||
[window setHidesOnDeactivate:NO];
|
||||
@@ -349,7 +349,7 @@ static DBPrefsWindowController *_sharedPrefsWindowController = nil;
|
||||
{
|
||||
[viewAnimation stopAnimation];
|
||||
|
||||
if ([self shiftSlowsAnimation] && [[[self window] currentEvent] modifierFlags] & NSShiftKeyMask)
|
||||
if ([self shiftSlowsAnimation] && [[[self window] currentEvent] modifierFlags] & NSEventModifierFlagShift)
|
||||
[viewAnimation setDuration:1.25];
|
||||
else
|
||||
[viewAnimation setDuration:0.25];
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>110</string>
|
||||
<string>111</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -181,12 +181,28 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
CFPreferencesSetAppValue(CFSTR("NSRepeatCountBinding"),
|
||||
CFSTR(""),
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
|
||||
int tabMinWidthKey;
|
||||
int tabMaxWidthKey;
|
||||
int tabOptimumWidthKey;
|
||||
if (shouldUseYosemiteTabBarStyle()) {
|
||||
tabMinWidthKey = 120;
|
||||
tabMaxWidthKey = 0;
|
||||
tabOptimumWidthKey = 0;
|
||||
} else {
|
||||
tabMinWidthKey = 64;
|
||||
tabMaxWidthKey = 6*64;
|
||||
tabOptimumWidthKey = 132;
|
||||
}
|
||||
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:NO], MMNoWindowKey,
|
||||
[NSNumber numberWithInt:64], MMTabMinWidthKey,
|
||||
[NSNumber numberWithInt:6*64], MMTabMaxWidthKey,
|
||||
[NSNumber numberWithInt:132], MMTabOptimumWidthKey,
|
||||
[NSNumber numberWithInt:tabMinWidthKey],
|
||||
MMTabMinWidthKey,
|
||||
[NSNumber numberWithInt:tabMaxWidthKey],
|
||||
MMTabMaxWidthKey,
|
||||
[NSNumber numberWithInt:tabOptimumWidthKey],
|
||||
MMTabOptimumWidthKey,
|
||||
[NSNumber numberWithBool:YES], MMShowAddTabButtonKey,
|
||||
[NSNumber numberWithInt:2], MMTextInsetLeftKey,
|
||||
[NSNumber numberWithInt:1], MMTextInsetRightKey,
|
||||
@@ -502,7 +518,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
if (modifiedBuffers) {
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Quit",
|
||||
@"Dialog button")];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Cancel",
|
||||
@@ -532,7 +548,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
if (numWindows > 1 || numTabs > 1) {
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Quit",
|
||||
@"Dialog button")];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Cancel",
|
||||
@@ -1566,7 +1582,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
}
|
||||
|
||||
[alert setInformativeText:text];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
|
||||
[alert runModal];
|
||||
[alert release];
|
||||
@@ -1735,7 +1751,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
@"Unknown URL Scheme dialog, text"),
|
||||
[url host]]];
|
||||
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
[alert runModal];
|
||||
[alert release];
|
||||
}
|
||||
@@ -1853,7 +1869,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
// background, the runloop won't bother flushing the autorelease pool.
|
||||
// Triggering an NSEvent works around this.
|
||||
// http://www.mikeash.com/pyblog/more-fun-with-autorelease.html
|
||||
NSEvent* event = [NSEvent otherEventWithType:NSApplicationDefined
|
||||
NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined
|
||||
location:NSZeroPoint
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
|
||||
@@ -27,14 +27,15 @@
|
||||
// help mode' (the keyDown: event itself never reaches the text view). By
|
||||
// clearing the 'help key flag' this event will be treated like a normal
|
||||
// key event.
|
||||
if ((NSKeyDown == type || NSKeyUp == type) && (flags & NSHelpKeyMask)) {
|
||||
flags &= ~NSHelpKeyMask;
|
||||
if ((NSEventTypeKeyDown == type || NSEventTypeKeyUp == type) &&
|
||||
(flags & NSEventModifierFlagHelp)) {
|
||||
flags &= ~NSEventModifierFlagHelp;
|
||||
event = [NSEvent keyEventWithType:[event type]
|
||||
location:[event locationInWindow]
|
||||
modifierFlags:flags
|
||||
timestamp:[event timestamp]
|
||||
windowNumber:[event windowNumber]
|
||||
context:[event context]
|
||||
context:nil // [event context] is always nil
|
||||
characters:[event characters]
|
||||
charactersIgnoringModifiers:[event charactersIgnoringModifiers]
|
||||
isARepeat:[event isARepeat]
|
||||
|
||||
@@ -3173,13 +3173,13 @@ static int eventModifierFlagsToVimModMask(int modifierFlags)
|
||||
{
|
||||
int modMask = 0;
|
||||
|
||||
if (modifierFlags & NSShiftKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagShift)
|
||||
modMask |= MOD_MASK_SHIFT;
|
||||
if (modifierFlags & NSControlKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagControl)
|
||||
modMask |= MOD_MASK_CTRL;
|
||||
if (modifierFlags & NSAlternateKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagOption)
|
||||
modMask |= MOD_MASK_ALT;
|
||||
if (modifierFlags & NSCommandKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagCommand)
|
||||
modMask |= MOD_MASK_CMD;
|
||||
|
||||
return modMask;
|
||||
@@ -3189,11 +3189,11 @@ static int eventModifierFlagsToVimMouseModMask(int modifierFlags)
|
||||
{
|
||||
int modMask = 0;
|
||||
|
||||
if (modifierFlags & NSShiftKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagShift)
|
||||
modMask |= MOUSE_SHIFT;
|
||||
if (modifierFlags & NSControlKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagControl)
|
||||
modMask |= MOUSE_CTRL;
|
||||
if (modifierFlags & NSAlternateKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagOption)
|
||||
modMask |= MOUSE_ALT;
|
||||
|
||||
return modMask;
|
||||
|
||||
@@ -150,12 +150,12 @@ static const NSTrackingRectTag kTrackingRectTag = 0xBADFACE;
|
||||
}
|
||||
}
|
||||
|
||||
// Sends a fake NSMouseExited event to the view for its current tracking rect.
|
||||
// Sends a fake NSEventTypeMouseExited event to the view for its current tracking rect.
|
||||
- (void)_sendToolTipMouseExited
|
||||
{
|
||||
// Nothing matters except window, trackingNumber, and userData.
|
||||
int windowNumber = [[self window] windowNumber];
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseExited
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSEventTypeMouseExited
|
||||
location:NSMakePoint(0, 0)
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
@@ -167,12 +167,12 @@ static const NSTrackingRectTag kTrackingRectTag = 0xBADFACE;
|
||||
[trackingRectOwner_ mouseExited:fakeEvent];
|
||||
}
|
||||
|
||||
// Sends a fake NSMouseEntered event to the view for its current tracking rect.
|
||||
// Sends a fake NSEventTypeMouseEntered event to the view for its current tracking rect.
|
||||
- (void)_sendToolTipMouseEntered
|
||||
{
|
||||
// Nothing matters except window, trackingNumber, and userData.
|
||||
int windowNumber = [[self window] windowNumber];
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseEntered
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSEventTypeMouseEntered
|
||||
location:NSMakePoint(0, 0)
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
|
||||
@@ -910,7 +910,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
numColumns:width];
|
||||
[signImg drawInRect:r
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
} else if (DrawStringDrawType == type) {
|
||||
int bg = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -1412,10 +1412,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
|
||||
- (void)scrollRect:(NSRect)rect lineCount:(int)count
|
||||
{
|
||||
NSPoint destPoint = rect.origin;
|
||||
destPoint.y -= count * cellSize.height;
|
||||
|
||||
NSCopyBits(0, rect, destPoint);
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
}
|
||||
|
||||
- (void)deleteLinesFromRow:(int)row lineCount:(int)count
|
||||
|
||||
@@ -67,7 +67,7 @@ enum {
|
||||
// (another way would be to make the existing window large enough that the
|
||||
// title bar is off screen. but that doesn't work with multiple screens).
|
||||
self = [super initWithContentRect:[screen frame]
|
||||
styleMask:NSBorderlessWindowMask
|
||||
styleMask:NSWindowStyleMaskBorderless
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES
|
||||
// since we're passing [screen frame] above,
|
||||
|
||||
@@ -158,12 +158,13 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// ASCII chars in the range after space (0x20) and before backspace (0x7f).
|
||||
// Note that this implies that 'mmta' (if enabled) breaks input methods
|
||||
// when the Alt key is held.
|
||||
if ((flags & NSAlternateKeyMask) && [mmta boolValue] && [unmod length] == 1
|
||||
if ((flags & NSEventModifierFlagOption)
|
||||
&& [mmta boolValue] && [unmod length] == 1
|
||||
&& [unmod characterAtIndex:0] > 0x20) {
|
||||
ASLogDebug(@"MACMETA key, don't interpret it");
|
||||
string = unmod;
|
||||
} else if (imState && (flags & NSControlKeyMask)
|
||||
&& !(flags & (NSAlternateKeyMask|NSCommandKeyMask))
|
||||
} else if (imState && (flags & NSEventModifierFlagControl)
|
||||
&& !(flags & (NSEventModifierFlagOption|NSEventModifierFlagCommand))
|
||||
&& [unmod length] == 1
|
||||
&& ([unmod characterAtIndex:0] == '6' ||
|
||||
[unmod characterAtIndex:0] == '^')) {
|
||||
@@ -180,14 +181,15 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
[textView interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||
if (interpretKeyEventsSwallowedKey)
|
||||
string = nil;
|
||||
else if (flags & NSCommandKeyMask) {
|
||||
else if (flags & NSEventModifierFlagCommand) {
|
||||
// HACK! When Command is held we have to more or less guess whether
|
||||
// we should use characters or charactersIgnoringModifiers. The
|
||||
// following heuristic seems to work but it may have to change.
|
||||
// Note that the Shift and Alt flags may also need to be cleared
|
||||
// (see doKeyDown:keyCode:modifiers: in MMBackend).
|
||||
if ((flags & NSShiftKeyMask && !(flags & NSAlternateKeyMask))
|
||||
|| flags & NSControlKeyMask)
|
||||
if ((flags & NSEventModifierFlagShift
|
||||
&& !(flags & NSEventModifierFlagOption))
|
||||
|| flags & NSEventModifierFlagControl)
|
||||
string = unmod;
|
||||
}
|
||||
}
|
||||
@@ -339,12 +341,12 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// If desired, intepret Ctrl-Click as a right mouse click.
|
||||
BOOL translateCtrlClick = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMTranslateCtrlClickKey];
|
||||
flags = flags & NSDeviceIndependentModifierFlagsMask;
|
||||
flags = flags & NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
if (translateCtrlClick && button == 0 &&
|
||||
(flags == NSControlKeyMask ||
|
||||
flags == (NSControlKeyMask|NSAlphaShiftKeyMask))) {
|
||||
(flags == NSEventModifierFlagControl || flags ==
|
||||
(NSEventModifierFlagControl|NSEventModifierFlagCapsLock))) {
|
||||
button = 1;
|
||||
flags &= ~NSControlKeyMask;
|
||||
flags &= ~NSEventModifierFlagControl;
|
||||
}
|
||||
|
||||
[data appendBytes:&row length:sizeof(int)];
|
||||
@@ -853,7 +855,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
|
||||
// The low 16 bits are not used for modifier flags by NSEvent. Use
|
||||
// these bits for custom flags.
|
||||
flags &= NSDeviceIndependentModifierFlagsMask;
|
||||
flags &= NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
if ([currentEvent isARepeat])
|
||||
flags |= 1;
|
||||
|
||||
@@ -886,8 +888,8 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// HACK! Keys on the numeric key pad are treated as special keys by Vim
|
||||
// so we need to pass on key code and modifier flags in this situation.
|
||||
unsigned mods = [currentEvent modifierFlags];
|
||||
if (mods & NSNumericPadKeyMask) {
|
||||
flags = mods & NSDeviceIndependentModifierFlagsMask;
|
||||
if (mods & NSEventModifierFlagNumericPad) {
|
||||
flags = mods & NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
keyCode = [currentEvent keyCode];
|
||||
}
|
||||
|
||||
|
||||
@@ -1328,7 +1328,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
pt = [[windowController window] mouseLocationOutsideOfEventStream];
|
||||
}
|
||||
|
||||
NSEvent *event = [NSEvent mouseEventWithType:NSRightMouseDown
|
||||
NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeRightMouseDown
|
||||
location:pt
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
|
||||
+15
-8
@@ -127,10 +127,17 @@ enum {
|
||||
|
||||
if (shouldUseYosemiteTabBarStyle()) {
|
||||
CGFloat screenWidth = [[NSScreen mainScreen] frame].size.width;
|
||||
int tabMaxWidth = [ud integerForKey:MMTabMaxWidthKey];
|
||||
if (tabMaxWidth == 0)
|
||||
tabMaxWidth = screenWidth;
|
||||
int tabOptimumWidth = [ud integerForKey:MMTabOptimumWidthKey];
|
||||
if (tabOptimumWidth == 0)
|
||||
tabOptimumWidth = screenWidth;
|
||||
|
||||
[tabBarControl setStyleNamed:@"Yosemite"];
|
||||
[tabBarControl setCellMinWidth:120];
|
||||
[tabBarControl setCellMaxWidth:screenWidth];
|
||||
[tabBarControl setCellOptimumWidth:screenWidth];
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:tabMaxWidth];
|
||||
[tabBarControl setCellOptimumWidth:tabOptimumWidth];
|
||||
} else {
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:[ud integerForKey:MMTabMaxWidthKey]];
|
||||
@@ -190,11 +197,11 @@ enum {
|
||||
// weird behind the window resize throbber, so emulate the look of an
|
||||
// NSScrollView in the bottom right corner.
|
||||
if (![[self window] showsResizeIndicator] // XXX: make this a flag
|
||||
|| !([[self window] styleMask] & NSTexturedBackgroundWindowMask))
|
||||
|| !([[self window] styleMask] & NSWindowStyleMaskTexturedBackground))
|
||||
return;
|
||||
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
int sw = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
int sw = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
int sw = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
@@ -697,7 +704,7 @@ enum {
|
||||
|
||||
NSRect rect;
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
@@ -811,7 +818,7 @@ enum {
|
||||
{
|
||||
NSSize size = textViewSize;
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
@@ -833,7 +840,7 @@ enum {
|
||||
{
|
||||
NSRect rect = { {0, 0}, {contentSize.width, contentSize.height} };
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
|
||||
@@ -127,15 +127,15 @@
|
||||
|
||||
- (id)initWithVimController:(MMVimController *)controller
|
||||
{
|
||||
unsigned styleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSMiniaturizableWindowMask | NSResizableWindowMask
|
||||
| NSUnifiedTitleAndToolbarWindowMask
|
||||
| NSTexturedBackgroundWindowMask;
|
||||
unsigned styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
|
||||
| NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable
|
||||
| NSWindowStyleMaskUnifiedTitleAndToolbar
|
||||
| NSWindowStyleMaskTexturedBackground;
|
||||
|
||||
if ([[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMNoTitleBarWindowKey]) {
|
||||
// No title bar setting
|
||||
styleMask &= ~NSTitledWindowMask;
|
||||
styleMask &= ~NSWindowStyleMaskTitled;
|
||||
}
|
||||
|
||||
// NOTE: The content rect is only used the very first time MacVim is
|
||||
@@ -175,7 +175,7 @@
|
||||
[win setDelegate:self];
|
||||
[win setInitialFirstResponder:[vimView textView]];
|
||||
|
||||
if ([win styleMask] & NSTexturedBackgroundWindowMask) {
|
||||
if ([win styleMask] & NSWindowStyleMaskTexturedBackground) {
|
||||
// On Leopard, we want to have a textured window to have nice
|
||||
// looking tabs. But the textured window look implies rounded
|
||||
// corners, which looks really weird -- disable them. This is a
|
||||
@@ -1066,8 +1066,8 @@
|
||||
|
||||
// Decide whether too zoom horizontally or not (always zoom vertically).
|
||||
NSEvent *event = [NSApp currentEvent];
|
||||
BOOL cmdLeftClick = [event type] == NSLeftMouseUp &&
|
||||
[event modifierFlags] & NSCommandKeyMask;
|
||||
BOOL cmdLeftClick = [event type] == NSEventTypeLeftMouseUp &&
|
||||
[event modifierFlags] & NSEventModifierFlagCommand;
|
||||
BOOL zoomBoth = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMZoomBothKey];
|
||||
zoomBoth = (zoomBoth && !cmdLeftClick) || (!zoomBoth && cmdLeftClick);
|
||||
@@ -1179,7 +1179,7 @@
|
||||
[context setDuration:0.5*duration];
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] | NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForUnified];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1244,7 +1244,7 @@
|
||||
|
||||
fullScreenEnabled = NO;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] & ~NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForMetal];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1275,7 +1275,7 @@
|
||||
[context setDuration:0.5*duration];
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] & ~NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForMetal];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1323,7 +1323,7 @@
|
||||
|
||||
fullScreenEnabled = YES;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] | NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForUnified];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1513,7 +1513,7 @@
|
||||
BOOL tabBarVisible = ![[vimView tabBarControl] isHidden];
|
||||
BOOL toolbarHidden = [decoratedWindow toolbar] == nil;
|
||||
BOOL windowTextured = ([decoratedWindow styleMask] &
|
||||
NSTexturedBackgroundWindowMask) != 0;
|
||||
NSWindowStyleMaskTexturedBackground) != 0;
|
||||
BOOL hideSeparator = NO;
|
||||
|
||||
if (fullScreenEnabled || tabBarVisible)
|
||||
|
||||
+73
-10
@@ -9,8 +9,6 @@
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <asl.h>
|
||||
|
||||
|
||||
// Taken from /usr/include/AvailabilityMacros.h
|
||||
#ifndef MAC_OS_X_VERSION_10_7
|
||||
@@ -28,6 +26,9 @@
|
||||
#ifndef MAC_OS_X_VERSION_10_11
|
||||
# define MAC_OS_X_VERSION_10_11 101100
|
||||
#endif
|
||||
#ifndef MAC_OS_X_VERSION_10_12
|
||||
# define MAC_OS_X_VERSION_10_12 101200
|
||||
#endif
|
||||
|
||||
// Needed for pre-10.11 SDK
|
||||
#ifndef NSAppKitVersionNumber10_10
|
||||
@@ -37,6 +38,45 @@
|
||||
# define NSAppKitVersionNumber10_10_Max 1349
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
// Deprecated constants in 10.12 SDK
|
||||
# define NSAlertStyleCritical NSCriticalAlertStyle
|
||||
# define NSAlertStyleInformational NSInformationalAlertStyle
|
||||
# define NSAlertStyleWarning NSWarningAlertStyle
|
||||
# define NSCompositingOperationSourceOver NSCompositeSourceOver
|
||||
# define NSControlSizeRegular NSRegularControlSize
|
||||
# define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||
# define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
# define NSEventModifierFlagControl NSControlKeyMask
|
||||
# define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask
|
||||
# define NSEventModifierFlagHelp NSHelpKeyMask
|
||||
# define NSEventModifierFlagNumericPad NSNumericPadKeyMask
|
||||
# define NSEventModifierFlagOption NSAlternateKeyMask
|
||||
# define NSEventModifierFlagShift NSShiftKeyMask
|
||||
# define NSEventTypeApplicationDefined NSApplicationDefined
|
||||
# define NSEventTypeKeyDown NSKeyDown
|
||||
# define NSEventTypeKeyUp NSKeyUp
|
||||
# define NSEventTypeLeftMouseUp NSLeftMouseUp
|
||||
# define NSEventTypeMouseEntered NSMouseEntered
|
||||
# define NSEventTypeMouseExited NSMouseExited
|
||||
# define NSEventTypeRightMouseDown NSRightMouseDown
|
||||
# define NSWindowStyleMaskBorderless NSBorderlessWindowMask
|
||||
# define NSWindowStyleMaskClosable NSClosableWindowMask
|
||||
# define NSWindowStyleMaskFullScreen NSFullScreenWindowMask
|
||||
# define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
|
||||
# define NSWindowStyleMaskResizable NSResizableWindowMask
|
||||
# define NSWindowStyleMaskTexturedBackground NSTexturedBackgroundWindowMask
|
||||
# define NSWindowStyleMaskTitled NSTitledWindowMask
|
||||
# define NSWindowStyleMaskUnifiedTitleAndToolbar NSUnifiedTitleAndToolbarWindowMask
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
# import <asl.h>
|
||||
# define MM_USE_ASL
|
||||
#else
|
||||
# import <os/log.h>
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// This is the protocol MMBackend implements.
|
||||
@@ -360,7 +400,10 @@ extern int ASLogLevel;
|
||||
|
||||
void ASLInit();
|
||||
|
||||
#define ASLog(level, fmt, ...) \
|
||||
#if defined(MM_USE_ASL)
|
||||
|
||||
# define MM_ASL_LEVEL_DEFAULT ASL_LEVEL_NOTICE
|
||||
# define ASLog(level, fmt, ...) \
|
||||
if (level <= ASLogLevel) { \
|
||||
asl_log(NULL, NULL, level, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
@@ -369,10 +412,30 @@ void ASLInit();
|
||||
|
||||
// Note: These macros are used like ASLogErr(@"text num=%d", 42). Objective-C
|
||||
// style specifiers (%@) are supported.
|
||||
#define ASLogCrit(fmt, ...) ASLog(ASL_LEVEL_CRIT, fmt, ##__VA_ARGS__)
|
||||
#define ASLogErr(fmt, ...) ASLog(ASL_LEVEL_ERR, fmt, ##__VA_ARGS__)
|
||||
#define ASLogWarn(fmt, ...) ASLog(ASL_LEVEL_WARNING, fmt, ##__VA_ARGS__)
|
||||
#define ASLogNotice(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
#define ASLogInfo(fmt, ...) ASLog(ASL_LEVEL_INFO, fmt, ##__VA_ARGS__)
|
||||
#define ASLogDebug(fmt, ...) ASLog(ASL_LEVEL_DEBUG, fmt, ##__VA_ARGS__)
|
||||
#define ASLogTmp(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
# define ASLogCrit(fmt, ...) ASLog(ASL_LEVEL_CRIT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogErr(fmt, ...) ASLog(ASL_LEVEL_ERR, fmt, ##__VA_ARGS__)
|
||||
# define ASLogWarn(fmt, ...) ASLog(ASL_LEVEL_WARNING, fmt, ##__VA_ARGS__)
|
||||
# define ASLogNotice(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
# define ASLogInfo(fmt, ...) ASLog(ASL_LEVEL_INFO, fmt, ##__VA_ARGS__)
|
||||
# define ASLogDebug(fmt, ...) ASLog(ASL_LEVEL_DEBUG, fmt, ##__VA_ARGS__)
|
||||
# define ASLogTmp(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
# define MM_ASL_LEVEL_DEFAULT OS_LOG_TYPE_DEFAULT
|
||||
# define ASLog(level, fmt, ...) \
|
||||
if (level <= ASLogLevel) { \
|
||||
os_log_with_type(OS_LOG_DEFAULT, level, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
[[NSString stringWithFormat:fmt, ##__VA_ARGS__] UTF8String]); \
|
||||
}
|
||||
|
||||
# define ASLogCrit(fmt, ...) ASLog(OS_LOG_TYPE_FAULT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogErr(fmt, ...) ASLog(OS_LOG_TYPE_ERROR, fmt, ##__VA_ARGS__)
|
||||
# define ASLogWarn(fmt, ...) ASLog(OS_LOG_TYPE_DEFAULT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogNotice(fmt, ...) ASLog(OS_LOG_TYPE_DEFAULT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogInfo(fmt, ...) ASLog(OS_LOG_TYPE_INFO, fmt, ##__VA_ARGS__)
|
||||
# define ASLogDebug(fmt, ...) ASLog(OS_LOG_TYPE_DEBUG, fmt, ##__VA_ARGS__)
|
||||
# define ASLogTmp(fmt, ...) ASLog(OS_LOG_TYPE_DEFAULT, fmt, ##__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
||||
+19
-3
@@ -124,7 +124,7 @@ NSString *MMRendererKey = @"MMRenderer";
|
||||
// Vim find pasteboard type (string contains Vim regex patterns)
|
||||
NSString *VimFindPboardType = @"VimFindPboardType";
|
||||
|
||||
int ASLogLevel = ASL_LEVEL_NOTICE;
|
||||
int ASLogLevel = MM_ASL_LEVEL_DEFAULT;
|
||||
|
||||
|
||||
|
||||
@@ -378,12 +378,27 @@ ASLInit()
|
||||
if (logLevelObj) {
|
||||
int logLevel = [logLevelObj intValue];
|
||||
if (logLevel < 0) logLevel = 0;
|
||||
#if defined(MM_USE_ASL)
|
||||
if (logLevel > ASL_LEVEL_DEBUG) logLevel = ASL_LEVEL_DEBUG;
|
||||
|
||||
ASLogLevel = logLevel;
|
||||
asl_set_filter(NULL, ASL_FILTER_MASK_UPTO(logLevel));
|
||||
#else
|
||||
switch (logLevel) {
|
||||
case 0: case 1: case 2:
|
||||
logLevel = OS_LOG_TYPE_FAULT; break;
|
||||
case 3:
|
||||
logLevel = OS_LOG_TYPE_ERROR; break;
|
||||
case 4: case 5:
|
||||
logLevel = OS_LOG_TYPE_DEFAULT; break;
|
||||
case 6:
|
||||
logLevel = OS_LOG_TYPE_INFO; break;
|
||||
default:
|
||||
logLevel = OS_LOG_TYPE_DEBUG; break;
|
||||
}
|
||||
#endif
|
||||
ASLogLevel = logLevel;
|
||||
}
|
||||
|
||||
#if defined(MM_USE_ASL)
|
||||
// Allow for changing whether a copy of each log should be sent to stderr
|
||||
// (this defaults to NO if this key is missing in the user defaults
|
||||
// database). The above filter mask is applied to logs going to stderr,
|
||||
@@ -391,4 +406,5 @@ ASLInit()
|
||||
BOOL logToStdErr = [ud boolForKey:MMLogToStdErrKey];
|
||||
if (logToStdErr)
|
||||
asl_add_log_file(NULL, 2); // The file descriptor for stderr is 2
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ showHiddenFilesView()
|
||||
[button setAction:@selector(hiddenFilesButtonToggled:)];
|
||||
|
||||
// Use the regular control size (checkbox is a bit smaller without this)
|
||||
NSControlSize buttonSize = NSRegularControlSize;
|
||||
NSControlSize buttonSize = NSControlSizeRegular;
|
||||
float fontSize = [NSFont systemFontSizeForControlSize:buttonSize];
|
||||
NSCell *theCell = [button cell];
|
||||
NSFont *theFont = [NSFont fontWithName:[[theCell font] fontName]
|
||||
|
||||
@@ -303,7 +303,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
if (!truncatingTailParagraphStyle) {
|
||||
truncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[truncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
|
||||
[truncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[truncatingTailParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:truncatingTailParagraphStyle range:range];
|
||||
|
||||
@@ -356,7 +356,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
// rollover
|
||||
if ([cell isHighlighted]) {
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(aRect, NSCompositingOperationSourceAtop);
|
||||
}
|
||||
|
||||
aRect.origin.x -= 1;
|
||||
@@ -393,7 +393,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
if ([cell closeButtonPressed]) closeButton = metalCloseButtonDown;
|
||||
|
||||
closeButtonSize = [closeButton size];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
|
||||
// scoot label over
|
||||
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
|
||||
@@ -462,7 +462,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
{
|
||||
MyNSDrawWindowBackground(rect);
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
|
||||
NSRectFillUsingOperation(rect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(rect, NSCompositingOperationSourceAtop);
|
||||
[[NSColor darkGrayColor] set];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+0.5)];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+rect.size.height-0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+rect.size.height-0.5)];
|
||||
@@ -479,7 +479,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[centeredParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
NSMidY(bounds) - (imageSize.height * 0.5f));
|
||||
[image drawAtPoint:drawPoint
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0f];
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
{
|
||||
if(_isPlaceholder){
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
|
||||
NSRectFillUsingOperation(cellFrame, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(cellFrame, NSCompositingOperationSourceAtop);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
[image addRepresentation:rep];
|
||||
NSImage *returnImage = [[[NSImage alloc] initWithSize:[rep size]] autorelease];
|
||||
[returnImage lockFocus];
|
||||
[image drawAtPoint:NSMakePoint(0.0, 0.0) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.7];
|
||||
[image drawAtPoint:NSMakePoint(0.0, 0.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:0.7];
|
||||
[returnImage unlockFocus];
|
||||
if(![[self indicator] isHidden]){
|
||||
NSImage *pi = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"pi"]];
|
||||
@@ -352,7 +352,7 @@
|
||||
NSPoint indicatorPoint = NSMakePoint([self frame].size.width - MARGIN_X - kPSMTabBarIndicatorWidth, MARGIN_Y);
|
||||
if(([self state] == NSOnState) && ([[_controlView styleName] isEqualToString:@"Metal"]))
|
||||
indicatorPoint.y += 1.0;
|
||||
[pi drawAtPoint:indicatorPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.7];
|
||||
[pi drawAtPoint:indicatorPoint fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:0.7];
|
||||
[returnImage unlockFocus];
|
||||
[pi release];
|
||||
}
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_12) || \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
# define NSCompositingOperationSourceOver NSCompositeSourceOver
|
||||
# define NSCompositingOperationSourceAtop NSCompositeSourceAtop
|
||||
# define NSTextAlignmentCenter NSCenterTextAlignment
|
||||
#endif
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
# define kPSMTabBarControlHeight 25
|
||||
#else
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
if ([cell isHighlighted])
|
||||
{
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(aRect, NSCompositingOperationSourceAtop);
|
||||
}
|
||||
|
||||
// frame
|
||||
@@ -389,7 +389,7 @@
|
||||
if ([cell closeButtonPressed]) closeButton = unifiedCloseButtonDown;
|
||||
|
||||
closeButtonSize = [closeButton size];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
|
||||
// scoot label over
|
||||
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
|
||||
@@ -473,7 +473,7 @@
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[centeredParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
|
||||
@@ -308,7 +308,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
if (!truncatingTailParagraphStyle) {
|
||||
truncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[truncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingHead];
|
||||
[truncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[truncatingTailParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:truncatingTailParagraphStyle range:range];
|
||||
|
||||
@@ -353,7 +353,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
aRect.origin.x += 0.5;
|
||||
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(aRect, NSCompositingOperationSourceAtop);
|
||||
|
||||
// frame
|
||||
[lineColor set];
|
||||
@@ -385,7 +385,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
if ([cell closeButtonPressed]) button = closeButtonDown;
|
||||
|
||||
closeButtonSize = [button size];
|
||||
[button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
[button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
}
|
||||
|
||||
// object counter
|
||||
@@ -432,7 +432,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
YosemiteNSDrawWindowBackground(rect, [self backgroundColor:isKeyWindow]);
|
||||
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.0] set];
|
||||
NSRectFillUsingOperation(rect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(rect, NSCompositingOperationSourceAtop);
|
||||
[[self borderColor] set];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+0.5)];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+rect.size.height-0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+rect.size.height-0.5)];
|
||||
@@ -449,7 +449,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[centeredParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
|
||||
@@ -1507,9 +1507,9 @@ gui_mch_dialog(
|
||||
// Ensure no data is on the output queue before presenting the dialog.
|
||||
gui_macvim_force_flush();
|
||||
|
||||
int style = NSInformationalAlertStyle;
|
||||
if (VIM_WARNING == type) style = NSWarningAlertStyle;
|
||||
else if (VIM_ERROR == type) style = NSCriticalAlertStyle;
|
||||
int style = NSAlertStyleInformational;
|
||||
if (VIM_WARNING == type) style = NSAlertStyleWarning;
|
||||
else if (VIM_ERROR == type) style = NSAlertStyleCritical;
|
||||
|
||||
NSMutableDictionary *attr = [NSMutableDictionary
|
||||
dictionaryWithObject:[NSNumber numberWithInt:style]
|
||||
@@ -2247,13 +2247,13 @@ static int vimModMaskToEventModifierFlags(int mods)
|
||||
int flags = 0;
|
||||
|
||||
if (mods & MOD_MASK_SHIFT)
|
||||
flags |= NSShiftKeyMask;
|
||||
flags |= NSEventModifierFlagShift;
|
||||
if (mods & MOD_MASK_CTRL)
|
||||
flags |= NSControlKeyMask;
|
||||
flags |= NSEventModifierFlagControl;
|
||||
if (mods & MOD_MASK_ALT)
|
||||
flags |= NSAlternateKeyMask;
|
||||
flags |= NSEventModifierFlagOption;
|
||||
if (mods & MOD_MASK_CMD)
|
||||
flags |= NSCommandKeyMask;
|
||||
flags |= NSEventModifierFlagCommand;
|
||||
|
||||
return flags;
|
||||
}
|
||||
@@ -2263,7 +2263,7 @@ static int vimModMaskToEventModifierFlags(int mods)
|
||||
// -- Channel Support ------------------------------------------------------
|
||||
|
||||
void *
|
||||
gui_macvim_add_channel(channel_T *channel, int part)
|
||||
gui_macvim_add_channel(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
dispatch_source_t s =
|
||||
dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define OSSPINLOCK_USE_INLINED 1
|
||||
|
||||
#include <CoreFoundation/CFBase.h>
|
||||
#include <CoreFoundation/CFArray.h>
|
||||
#include <CoreFoundation/CFString.h>
|
||||
|
||||
+3
-2
@@ -2045,7 +2045,6 @@ test1 \
|
||||
test_breakindent \
|
||||
test_changelist \
|
||||
test_close_count \
|
||||
test_command_count \
|
||||
test_comparators \
|
||||
test_erasebackword \
|
||||
test_eval \
|
||||
@@ -2065,7 +2064,7 @@ test1 \
|
||||
test40 test41 test42 test43 test44 test45 test48 test49 \
|
||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
||||
test60 test64 test65 test66 test67 test68 test69 \
|
||||
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
|
||||
test70 test72 test73 test74 test75 test76 test77 test78 test79 \
|
||||
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
||||
test100 test101 test103 test104 test107 test108:
|
||||
@@ -2083,6 +2082,8 @@ test_arglist \
|
||||
test_channel \
|
||||
test_charsearch \
|
||||
test_cmdline \
|
||||
test_command_count \
|
||||
test_crypt \
|
||||
test_cscope \
|
||||
test_cursor_func \
|
||||
test_delete \
|
||||
|
||||
+181
-127
@@ -55,7 +55,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef FEAT_GUI_MACVIM
|
||||
static void channel_read(channel_T *channel, int part, char *func);
|
||||
static void channel_read(channel_T *channel, ch_part_T part, char *func);
|
||||
#endif
|
||||
|
||||
/* Whether a redraw is needed for appending a line to a buffer. */
|
||||
@@ -311,7 +311,7 @@ static int next_ch_id = 0;
|
||||
channel_T *
|
||||
add_channel(void)
|
||||
{
|
||||
int part;
|
||||
ch_part_T part;
|
||||
channel_T *channel = (channel_T *)alloc_clear((int)sizeof(channel_T));
|
||||
|
||||
if (channel == NULL)
|
||||
@@ -320,7 +320,7 @@ add_channel(void)
|
||||
channel->ch_id = next_ch_id++;
|
||||
ch_log(channel, "Created channel");
|
||||
|
||||
for (part = PART_SOCK; part <= PART_IN; ++part)
|
||||
for (part = PART_SOCK; part < PART_COUNT; ++part)
|
||||
{
|
||||
channel->ch_part[part].ch_fd = INVALID_FD;
|
||||
#ifdef FEAT_GUI_X11
|
||||
@@ -346,6 +346,12 @@ add_channel(void)
|
||||
return channel;
|
||||
}
|
||||
|
||||
int
|
||||
has_any_channel(void)
|
||||
{
|
||||
return first_channel != NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called when the refcount of a channel is zero.
|
||||
* Return TRUE if "channel" has a callback and the associated job wasn't
|
||||
@@ -420,9 +426,7 @@ channel_free(channel_T *channel)
|
||||
if (!in_free_unref_items)
|
||||
{
|
||||
if (safe_to_invoke_callback == 0)
|
||||
{
|
||||
channel->ch_to_be_freed = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel_free_contents(channel);
|
||||
@@ -510,7 +514,7 @@ free_unused_channels(int copyID, int mask)
|
||||
channel_read_fd(int fd)
|
||||
{
|
||||
channel_T *channel;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
channel = channel_fd2channel(fd, &part);
|
||||
if (channel == NULL)
|
||||
@@ -556,7 +560,7 @@ messageFromServer(gpointer clientData,
|
||||
#endif
|
||||
|
||||
static void
|
||||
channel_gui_register_one(channel_T *channel, int part)
|
||||
channel_gui_register_one(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
if (!CH_HAS_GUI)
|
||||
return;
|
||||
@@ -634,7 +638,7 @@ channel_gui_register_all(void)
|
||||
}
|
||||
|
||||
static void
|
||||
channel_gui_unregister_one(channel_T *channel, int part)
|
||||
channel_gui_unregister_one(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
# ifdef FEAT_GUI_X11
|
||||
if (channel->ch_part[part].ch_inputHandler != (XtInputId)NULL)
|
||||
@@ -668,7 +672,7 @@ channel_gui_unregister_one(channel_T *channel, int part)
|
||||
static void
|
||||
channel_gui_unregister(channel_T *channel)
|
||||
{
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
channel_gui_unregister_one(channel, part);
|
||||
@@ -943,6 +947,7 @@ channel_open(
|
||||
channel->ch_nb_close_cb = nb_close_cb;
|
||||
channel->ch_hostname = (char *)vim_strsave((char_u *)hostname);
|
||||
channel->ch_port = port_in;
|
||||
channel->ch_to_be_closed |= (1 << PART_SOCK);
|
||||
|
||||
#ifdef FEAT_GUI
|
||||
channel_gui_register_one(channel, PART_SOCK);
|
||||
@@ -1013,12 +1018,19 @@ theend:
|
||||
}
|
||||
|
||||
static void
|
||||
may_close_part(sock_T *fd)
|
||||
ch_close_part(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
sock_T *fd = &channel->ch_part[part].ch_fd;
|
||||
|
||||
if (*fd != INVALID_FD)
|
||||
{
|
||||
fd_close(*fd);
|
||||
if (part == PART_SOCK)
|
||||
sock_close(*fd);
|
||||
else
|
||||
fd_close(*fd);
|
||||
*fd = INVALID_FD;
|
||||
|
||||
channel->ch_to_be_closed &= ~(1 << part);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1027,7 +1039,7 @@ channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err)
|
||||
{
|
||||
if (in != INVALID_FD)
|
||||
{
|
||||
may_close_part(&channel->CH_IN_FD);
|
||||
ch_close_part(channel, PART_IN);
|
||||
channel->CH_IN_FD = in;
|
||||
}
|
||||
if (out != INVALID_FD)
|
||||
@@ -1035,8 +1047,9 @@ channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err)
|
||||
# if defined(FEAT_GUI)
|
||||
channel_gui_unregister_one(channel, PART_OUT);
|
||||
# endif
|
||||
may_close_part(&channel->CH_OUT_FD);
|
||||
ch_close_part(channel, PART_OUT);
|
||||
channel->CH_OUT_FD = out;
|
||||
channel->ch_to_be_closed |= (1 << PART_OUT);
|
||||
# if defined(FEAT_GUI)
|
||||
channel_gui_register_one(channel, PART_OUT);
|
||||
# endif
|
||||
@@ -1046,8 +1059,9 @@ channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err)
|
||||
# if defined(FEAT_GUI)
|
||||
channel_gui_unregister_one(channel, PART_ERR);
|
||||
# endif
|
||||
may_close_part(&channel->CH_ERR_FD);
|
||||
ch_close_part(channel, PART_ERR);
|
||||
channel->CH_ERR_FD = err;
|
||||
channel->ch_to_be_closed |= (1 << PART_ERR);
|
||||
# if defined(FEAT_GUI)
|
||||
channel_gui_register_one(channel, PART_ERR);
|
||||
# endif
|
||||
@@ -1166,10 +1180,10 @@ set_callback(
|
||||
void
|
||||
channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
{
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
if (opt->jo_set & JO_MODE)
|
||||
for (part = PART_SOCK; part <= PART_IN; ++part)
|
||||
for (part = PART_SOCK; part < PART_COUNT; ++part)
|
||||
channel->ch_part[part].ch_mode = opt->jo_mode;
|
||||
if (opt->jo_set & JO_IN_MODE)
|
||||
channel->ch_part[PART_IN].ch_mode = opt->jo_in_mode;
|
||||
@@ -1179,7 +1193,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
channel->ch_part[PART_ERR].ch_mode = opt->jo_err_mode;
|
||||
|
||||
if (opt->jo_set & JO_TIMEOUT)
|
||||
for (part = PART_SOCK; part <= PART_IN; ++part)
|
||||
for (part = PART_SOCK; part < PART_COUNT; ++part)
|
||||
channel->ch_part[part].ch_timeout = opt->jo_timeout;
|
||||
if (opt->jo_set & JO_OUT_TIMEOUT)
|
||||
channel->ch_part[PART_OUT].ch_timeout = opt->jo_out_timeout;
|
||||
@@ -1297,7 +1311,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
void
|
||||
channel_set_req_callback(
|
||||
channel_T *channel,
|
||||
int part,
|
||||
ch_part_T part,
|
||||
char_u *callback,
|
||||
partial_T *partial,
|
||||
int id)
|
||||
@@ -1463,7 +1477,7 @@ channel_write_in(channel_T *channel)
|
||||
ch_log(channel, "Finished writing all lines to channel");
|
||||
|
||||
/* Close the pipe/socket, so that the other side gets EOF. */
|
||||
may_close_part(&channel->CH_IN_FD);
|
||||
ch_close_part(channel, PART_IN);
|
||||
}
|
||||
else
|
||||
ch_logn(channel, "Still %d more lines to write",
|
||||
@@ -1477,10 +1491,10 @@ channel_write_in(channel_T *channel)
|
||||
channel_buffer_free(buf_T *buf)
|
||||
{
|
||||
channel_T *channel;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
for (part = PART_SOCK; part <= PART_IN; ++part)
|
||||
for (part = PART_SOCK; part < PART_COUNT; ++part)
|
||||
{
|
||||
chanpart_T *ch_part = &channel->ch_part[part];
|
||||
|
||||
@@ -1589,7 +1603,7 @@ invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
|
||||
* Returns NULL if there is nothing.
|
||||
*/
|
||||
readq_T *
|
||||
channel_peek(channel_T *channel, int part)
|
||||
channel_peek(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
|
||||
@@ -1619,7 +1633,7 @@ channel_first_nl(readq_T *node)
|
||||
* Returns NULL if there is nothing.
|
||||
*/
|
||||
char_u *
|
||||
channel_get(channel_T *channel, int part)
|
||||
channel_get(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
@@ -1643,7 +1657,7 @@ channel_get(channel_T *channel, int part)
|
||||
* Replaces NUL bytes with NL.
|
||||
*/
|
||||
static char_u *
|
||||
channel_get_all(channel_T *channel, int part)
|
||||
channel_get_all(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
@@ -1692,7 +1706,7 @@ channel_get_all(channel_T *channel, int part)
|
||||
* Caller must check these bytes are available.
|
||||
*/
|
||||
void
|
||||
channel_consume(channel_T *channel, int part, int len)
|
||||
channel_consume(channel_T *channel, ch_part_T part, int len)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
@@ -1708,7 +1722,7 @@ channel_consume(channel_T *channel, int part, int len)
|
||||
* When "want_nl" is TRUE collapse more buffers until a NL is found.
|
||||
*/
|
||||
int
|
||||
channel_collapse(channel_T *channel, int part, int want_nl)
|
||||
channel_collapse(channel_T *channel, ch_part_T part, int want_nl)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
@@ -1768,7 +1782,7 @@ channel_collapse(channel_T *channel, int part, int want_nl)
|
||||
* Returns OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
channel_save(channel_T *channel, int part, char_u *buf, int len,
|
||||
channel_save(channel_T *channel, ch_part_T part, char_u *buf, int len,
|
||||
int prepend, char *lead)
|
||||
{
|
||||
readq_T *node;
|
||||
@@ -1843,7 +1857,7 @@ channel_save(channel_T *channel, int part, char_u *buf, int len,
|
||||
channel_fill(js_read_T *reader)
|
||||
{
|
||||
channel_T *channel = (channel_T *)reader->js_cookie;
|
||||
int part = reader->js_cookie_arg;
|
||||
ch_part_T part = reader->js_cookie_arg;
|
||||
char_u *next = channel_get(channel, part);
|
||||
int unused;
|
||||
int len;
|
||||
@@ -1881,7 +1895,7 @@ channel_fill(js_read_T *reader)
|
||||
* Return TRUE if there is more to read.
|
||||
*/
|
||||
static int
|
||||
channel_parse_json(channel_T *channel, int part)
|
||||
channel_parse_json(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
js_read_T reader;
|
||||
typval_T listtv;
|
||||
@@ -2061,7 +2075,7 @@ remove_json_node(jsonq_T *head, jsonq_T *node)
|
||||
* Return FAIL otherwise.
|
||||
*/
|
||||
static int
|
||||
channel_get_json(channel_T *channel, int part, int id, typval_T **rettv)
|
||||
channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
{
|
||||
jsonq_T *head = &channel->ch_part[part].ch_json_head;
|
||||
jsonq_T *item = head->jq_next;
|
||||
@@ -2095,7 +2109,7 @@ channel_get_json(channel_T *channel, int part, int id, typval_T **rettv)
|
||||
* "argv[1]" etc. have further arguments, type is VAR_UNKNOWN if missing.
|
||||
*/
|
||||
static void
|
||||
channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
||||
{
|
||||
char_u *cmd = argv[0].vval.v_string;
|
||||
char_u *arg;
|
||||
@@ -2252,7 +2266,7 @@ invoke_one_time_callback(
|
||||
}
|
||||
|
||||
static void
|
||||
append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, int part)
|
||||
append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, ch_part_T part)
|
||||
{
|
||||
buf_T *save_curbuf = curbuf;
|
||||
linenr_T lnum = buffer->b_ml.ml_line_count;
|
||||
@@ -2347,7 +2361,7 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, int part)
|
||||
}
|
||||
|
||||
static void
|
||||
drop_messages(channel_T *channel, int part)
|
||||
drop_messages(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
char_u *msg;
|
||||
|
||||
@@ -2364,14 +2378,15 @@ drop_messages(channel_T *channel, int part)
|
||||
* Return TRUE when a message was handled, there might be another one.
|
||||
*/
|
||||
static int
|
||||
may_invoke_callback(channel_T *channel, int part)
|
||||
may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
char_u *msg = NULL;
|
||||
typval_T *listtv = NULL;
|
||||
typval_T argv[CH_JSON_MAX_ARGS];
|
||||
int seq_nr = -1;
|
||||
ch_mode_T ch_mode = channel->ch_part[part].ch_mode;
|
||||
cbq_T *cbhead = &channel->ch_part[part].ch_cb_head;
|
||||
chanpart_T *ch_part = &channel->ch_part[part];
|
||||
ch_mode_T ch_mode = ch_part->ch_mode;
|
||||
cbq_T *cbhead = &ch_part->ch_cb_head;
|
||||
cbq_T *cbitem;
|
||||
char_u *callback = NULL;
|
||||
partial_T *partial = NULL;
|
||||
@@ -2391,10 +2406,10 @@ may_invoke_callback(channel_T *channel, int part)
|
||||
callback = cbitem->cq_callback;
|
||||
partial = cbitem->cq_partial;
|
||||
}
|
||||
else if (channel->ch_part[part].ch_callback != NULL)
|
||||
else if (ch_part->ch_callback != NULL)
|
||||
{
|
||||
callback = channel->ch_part[part].ch_callback;
|
||||
partial = channel->ch_part[part].ch_partial;
|
||||
callback = ch_part->ch_callback;
|
||||
partial = ch_part->ch_partial;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2402,11 +2417,11 @@ may_invoke_callback(channel_T *channel, int part)
|
||||
partial = channel->ch_partial;
|
||||
}
|
||||
|
||||
buffer = channel->ch_part[part].ch_bufref.br_buf;
|
||||
if (buffer != NULL && !bufref_valid(&channel->ch_part[part].ch_bufref))
|
||||
buffer = ch_part->ch_bufref.br_buf;
|
||||
if (buffer != NULL && !bufref_valid(&ch_part->ch_bufref))
|
||||
{
|
||||
/* buffer was wiped out */
|
||||
channel->ch_part[part].ch_bufref.br_buf = NULL;
|
||||
ch_part->ch_bufref.br_buf = NULL;
|
||||
buffer = NULL;
|
||||
}
|
||||
|
||||
@@ -2467,7 +2482,7 @@ may_invoke_callback(channel_T *channel, int part)
|
||||
|
||||
if (ch_mode == MODE_NL)
|
||||
{
|
||||
char_u *nl;
|
||||
char_u *nl = NULL;
|
||||
char_u *buf;
|
||||
readq_T *node;
|
||||
|
||||
@@ -2480,10 +2495,25 @@ may_invoke_callback(channel_T *channel, int part)
|
||||
if (nl != NULL)
|
||||
break;
|
||||
if (channel_collapse(channel, part, TRUE) == FAIL)
|
||||
{
|
||||
if (ch_part->ch_fd == INVALID_FD && node->rq_buflen > 0)
|
||||
break;
|
||||
return FALSE; /* incomplete message */
|
||||
}
|
||||
}
|
||||
buf = node->rq_buffer;
|
||||
|
||||
if (nl == NULL)
|
||||
{
|
||||
/* Flush remaining message that is missing a NL. */
|
||||
buf = vim_realloc(buf, node->rq_buflen + 1);
|
||||
if (buf == NULL)
|
||||
return FALSE;
|
||||
node->rq_buffer = buf;
|
||||
nl = buf + node->rq_buflen++;
|
||||
*nl = NUL;
|
||||
}
|
||||
|
||||
/* Convert NUL to NL, the internal representation. */
|
||||
for (p = buf; p < nl && p < buf + node->rq_buflen; ++p)
|
||||
if (*p == NUL)
|
||||
@@ -2595,7 +2625,7 @@ channel_is_open(channel_T *channel)
|
||||
* Return TRUE if "channel" has JSON or other typeahead.
|
||||
*/
|
||||
static int
|
||||
channel_has_readahead(channel_T *channel, int part)
|
||||
channel_has_readahead(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
ch_mode_T ch_mode = channel->ch_part[part].ch_mode;
|
||||
|
||||
@@ -2611,23 +2641,41 @@ channel_has_readahead(channel_T *channel, int part)
|
||||
|
||||
/*
|
||||
* Return a string indicating the status of the channel.
|
||||
* If "req_part" is not negative check that part.
|
||||
*/
|
||||
char *
|
||||
channel_status(channel_T *channel)
|
||||
channel_status(channel_T *channel, int req_part)
|
||||
{
|
||||
int part;
|
||||
ch_part_T part;
|
||||
int has_readahead = FALSE;
|
||||
|
||||
if (channel == NULL)
|
||||
return "fail";
|
||||
if (channel_is_open(channel))
|
||||
return "open";
|
||||
for (part = PART_SOCK; part <= PART_ERR; ++part)
|
||||
if (channel_has_readahead(channel, part))
|
||||
{
|
||||
if (req_part == PART_OUT)
|
||||
{
|
||||
if (channel->CH_OUT_FD != INVALID_FD)
|
||||
return "open";
|
||||
if (channel_has_readahead(channel, PART_OUT))
|
||||
has_readahead = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (req_part == PART_ERR)
|
||||
{
|
||||
if (channel->CH_ERR_FD != INVALID_FD)
|
||||
return "open";
|
||||
if (channel_has_readahead(channel, PART_ERR))
|
||||
has_readahead = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (channel_is_open(channel))
|
||||
return "open";
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
if (channel_has_readahead(channel, part))
|
||||
{
|
||||
has_readahead = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_readahead)
|
||||
return "buffered";
|
||||
@@ -2635,11 +2683,12 @@ channel_status(channel_T *channel)
|
||||
}
|
||||
|
||||
static void
|
||||
channel_part_info(channel_T *channel, dict_T *dict, char *name, int part)
|
||||
channel_part_info(channel_T *channel, dict_T *dict, char *name, ch_part_T part)
|
||||
{
|
||||
chanpart_T *chanpart = &channel->ch_part[part];
|
||||
char namebuf[20]; /* longest is "sock_timeout" */
|
||||
size_t tail;
|
||||
char *status;
|
||||
char *s = "";
|
||||
|
||||
vim_strncpy((char_u *)namebuf, (char_u *)name, 4);
|
||||
@@ -2647,8 +2696,13 @@ channel_part_info(channel_T *channel, dict_T *dict, char *name, int part)
|
||||
tail = STRLEN(namebuf);
|
||||
|
||||
STRCPY(namebuf + tail, "status");
|
||||
dict_add_nr_str(dict, namebuf, 0,
|
||||
(char_u *)(chanpart->ch_fd == INVALID_FD ? "closed" : "open"));
|
||||
if (chanpart->ch_fd != INVALID_FD)
|
||||
status = "open";
|
||||
else if (channel_has_readahead(channel, part))
|
||||
status = "buffered";
|
||||
else
|
||||
status = "closed";
|
||||
dict_add_nr_str(dict, namebuf, 0, (char_u *)status);
|
||||
|
||||
STRCPY(namebuf + tail, "mode");
|
||||
switch (chanpart->ch_mode)
|
||||
@@ -2681,7 +2735,7 @@ channel_part_info(channel_T *channel, dict_T *dict, char *name, int part)
|
||||
channel_info(channel_T *channel, dict_T *dict)
|
||||
{
|
||||
dict_add_nr_str(dict, "id", channel->ch_id, NULL);
|
||||
dict_add_nr_str(dict, "status", 0, (char_u *)channel_status(channel));
|
||||
dict_add_nr_str(dict, "status", 0, (char_u *)channel_status(channel, -1));
|
||||
|
||||
if (channel->ch_hostname != NULL)
|
||||
{
|
||||
@@ -2711,28 +2765,24 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
channel_gui_unregister(channel);
|
||||
#endif
|
||||
|
||||
if (channel->CH_SOCK_FD != INVALID_FD)
|
||||
{
|
||||
sock_close(channel->CH_SOCK_FD);
|
||||
channel->CH_SOCK_FD = INVALID_FD;
|
||||
}
|
||||
may_close_part(&channel->CH_IN_FD);
|
||||
may_close_part(&channel->CH_OUT_FD);
|
||||
may_close_part(&channel->CH_ERR_FD);
|
||||
ch_close_part(channel, PART_SOCK);
|
||||
ch_close_part(channel, PART_IN);
|
||||
ch_close_part(channel, PART_OUT);
|
||||
ch_close_part(channel, PART_ERR);
|
||||
|
||||
if (invoke_close_cb && channel->ch_close_cb != NULL)
|
||||
{
|
||||
typval_T argv[1];
|
||||
typval_T rettv;
|
||||
int dummy;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
/* Invoke callbacks before the close callback, since it's weird to
|
||||
* first invoke the close callback. Increment the refcount to avoid
|
||||
* the channel being freed halfway. */
|
||||
++channel->ch_refcount;
|
||||
ch_log(channel, "Invoking callbacks before closing");
|
||||
for (part = PART_SOCK; part <= PART_ERR; ++part)
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
while (may_invoke_callback(channel, part))
|
||||
;
|
||||
|
||||
@@ -2764,7 +2814,7 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
}
|
||||
|
||||
/* any remaining messages are useless now */
|
||||
for (part = PART_SOCK; part <= PART_ERR; ++part)
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
drop_messages(channel, part);
|
||||
}
|
||||
|
||||
@@ -2777,14 +2827,14 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
void
|
||||
channel_close_in(channel_T *channel)
|
||||
{
|
||||
may_close_part(&channel->CH_IN_FD);
|
||||
ch_close_part(channel, PART_IN);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the read buffer on "channel"/"part".
|
||||
*/
|
||||
static void
|
||||
channel_clear_one(channel_T *channel, int part)
|
||||
channel_clear_one(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
jsonq_T *json_head = &channel->ch_part[part].ch_json_head;
|
||||
cbq_T *cb_head = &channel->ch_part[part].ch_cb_head;
|
||||
@@ -3018,11 +3068,20 @@ channel_wait(channel_T *channel, sock_T fd, int timeout)
|
||||
}
|
||||
|
||||
static void
|
||||
channel_close_on_error(channel_T *channel, char *func)
|
||||
ch_close_part_on_error(
|
||||
channel_T *channel, ch_part_T part, int is_err, char *func)
|
||||
{
|
||||
/* Do not call emsg(), most likely the other end just exited. */
|
||||
ch_errors(channel, "%s(): Cannot read from channel, will close it soon",
|
||||
func);
|
||||
char msgbuf[80];
|
||||
|
||||
vim_snprintf(msgbuf, sizeof(msgbuf),
|
||||
"%%s(): Read %s from ch_part[%d], closing",
|
||||
(is_err ? "error" : "EOF"), part);
|
||||
|
||||
if (is_err)
|
||||
/* Do not call emsg(), most likely the other end just exited. */
|
||||
ch_errors(channel, msgbuf, func);
|
||||
else
|
||||
ch_logs(channel, msgbuf, func);
|
||||
|
||||
/* Queue a "DETACH" netbeans message in the command queue in order to
|
||||
* terminate the netbeans session later. Do not end the session here
|
||||
@@ -3036,24 +3095,23 @@ channel_close_on_error(channel_T *channel, char *func)
|
||||
* Only send "DETACH" for a netbeans channel.
|
||||
*/
|
||||
if (channel->ch_nb_close_cb != NULL)
|
||||
channel_save(channel, PART_OUT, (char_u *)DETACH_MSG_RAW,
|
||||
channel_save(channel, PART_SOCK, (char_u *)DETACH_MSG_RAW,
|
||||
(int)STRLEN(DETACH_MSG_RAW), FALSE, "PUT ");
|
||||
|
||||
/* When reading from stdout is not possible, assume the other side has
|
||||
* died. Don't close the channel right away, it may be the wrong moment
|
||||
* to invoke callbacks. */
|
||||
channel->ch_to_be_closed = TRUE;
|
||||
/* When reading is not possible close this part of the channel. Don't
|
||||
* close the channel yet, there may be something to read on another part. */
|
||||
ch_close_part(channel, part);
|
||||
|
||||
#ifdef FEAT_GUI
|
||||
/* Stop listening to GUI events right away. */
|
||||
channel_gui_unregister(channel);
|
||||
channel_gui_unregister_one(channel, part);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
channel_close_now(channel_T *channel)
|
||||
{
|
||||
ch_log(channel, "Closing channel because of previous read error");
|
||||
ch_log(channel, "Closing channel because all readable fds are closed");
|
||||
channel_close(channel, TRUE);
|
||||
if (channel->ch_nb_close_cb != NULL)
|
||||
(*channel->ch_nb_close_cb)();
|
||||
@@ -3069,7 +3127,7 @@ channel_close_now(channel_T *channel)
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
channel_read(channel_T *channel, int part, char *func)
|
||||
channel_read(channel_T *channel, ch_part_T part, char *func)
|
||||
{
|
||||
static char_u *buf = NULL;
|
||||
int len = 0;
|
||||
@@ -3077,14 +3135,11 @@ channel_read(channel_T *channel, int part, char *func)
|
||||
sock_T fd;
|
||||
int use_socket = FALSE;
|
||||
|
||||
/* If we detected a read error don't try reading again. */
|
||||
if (channel->ch_to_be_closed)
|
||||
return;
|
||||
|
||||
fd = channel->ch_part[part].ch_fd;
|
||||
if (fd == INVALID_FD)
|
||||
{
|
||||
ch_error(channel, "channel_read() called while socket is closed");
|
||||
ch_errors(channel, "channel_read() called while %s part is closed",
|
||||
part_names[part]);
|
||||
return;
|
||||
}
|
||||
use_socket = fd == channel->CH_SOCK_FD;
|
||||
@@ -3120,7 +3175,7 @@ channel_read(channel_T *channel, int part, char *func)
|
||||
|
||||
/* Reading a disconnection (readlen == 0), or an error. */
|
||||
if (readlen <= 0)
|
||||
channel_close_on_error(channel, func);
|
||||
ch_close_part_on_error(channel, part, (len < 0), func);
|
||||
|
||||
#if defined(CH_HAS_GUI) && defined(FEAT_GUI_GTK)
|
||||
/* signal the main loop that there is something to read */
|
||||
@@ -3136,7 +3191,7 @@ channel_read(channel_T *channel, int part, char *func)
|
||||
* Returns NULL in case of error or timeout.
|
||||
*/
|
||||
char_u *
|
||||
channel_read_block(channel_T *channel, int part, int timeout)
|
||||
channel_read_block(channel_T *channel, ch_part_T part, int timeout)
|
||||
{
|
||||
char_u *buf;
|
||||
char_u *msg;
|
||||
@@ -3216,7 +3271,7 @@ channel_read_block(channel_T *channel, int part, int timeout)
|
||||
int
|
||||
channel_read_json_block(
|
||||
channel_T *channel,
|
||||
int part,
|
||||
ch_part_T part,
|
||||
int timeout_arg,
|
||||
int id,
|
||||
typval_T **rettv)
|
||||
@@ -3302,7 +3357,7 @@ channel_read_json_block(
|
||||
common_channel_read(typval_T *argvars, typval_T *rettv, int raw)
|
||||
{
|
||||
channel_T *channel;
|
||||
int part = -1;
|
||||
ch_part_T part = PART_COUNT;
|
||||
jobopt_T opt;
|
||||
int mode;
|
||||
int timeout;
|
||||
@@ -3323,7 +3378,7 @@ common_channel_read(typval_T *argvars, typval_T *rettv, int raw)
|
||||
channel = get_channel_arg(&argvars[0], TRUE, TRUE, part);
|
||||
if (channel != NULL)
|
||||
{
|
||||
if (part < 0)
|
||||
if (part == PART_COUNT)
|
||||
part = channel_part_read(channel);
|
||||
mode = channel_get_mode(channel, part);
|
||||
timeout = channel_get_timeout(channel, part);
|
||||
@@ -3361,10 +3416,10 @@ theend:
|
||||
* Returns NULL when the socket isn't found.
|
||||
*/
|
||||
channel_T *
|
||||
channel_fd2channel(sock_T fd, int *partp)
|
||||
channel_fd2channel(sock_T fd, ch_part_T *partp)
|
||||
{
|
||||
channel_T *channel;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
if (fd != INVALID_FD)
|
||||
for (channel = first_channel; channel != NULL;
|
||||
@@ -3390,17 +3445,13 @@ channel_fd2channel(sock_T fd, int *partp)
|
||||
channel_handle_events(void)
|
||||
{
|
||||
channel_T *channel;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
sock_T fd;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
{
|
||||
/* If we detected a read error don't try reading again. */
|
||||
if (channel->ch_to_be_closed)
|
||||
continue;
|
||||
|
||||
/* check the socket and pipes */
|
||||
for (part = PART_SOCK; part <= PART_ERR; ++part)
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
{
|
||||
fd = channel->ch_part[part].ch_fd;
|
||||
if (fd != INVALID_FD)
|
||||
@@ -3410,7 +3461,8 @@ channel_handle_events(void)
|
||||
if (r == CW_READY)
|
||||
channel_read(channel, part, "channel_handle_events");
|
||||
else if (r == CW_ERROR)
|
||||
channel_close_on_error(channel, "channel_handle_events()");
|
||||
ch_close_part_on_error(channel, part, TRUE,
|
||||
"channel_handle_events");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3423,7 +3475,7 @@ channel_handle_events(void)
|
||||
* Return FAIL or OK.
|
||||
*/
|
||||
int
|
||||
channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun)
|
||||
channel_send(channel_T *channel, ch_part_T part, char_u *buf, int len, char *fun)
|
||||
{
|
||||
int res;
|
||||
sock_T fd;
|
||||
@@ -3475,7 +3527,7 @@ channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun)
|
||||
* Sets "part_read" to the read fd.
|
||||
* Otherwise returns NULL.
|
||||
*/
|
||||
channel_T *
|
||||
static channel_T *
|
||||
send_common(
|
||||
typval_T *argvars,
|
||||
char_u *text,
|
||||
@@ -3483,10 +3535,10 @@ send_common(
|
||||
int eval,
|
||||
jobopt_T *opt,
|
||||
char *fun,
|
||||
int *part_read)
|
||||
ch_part_T *part_read)
|
||||
{
|
||||
channel_T *channel;
|
||||
int part_send;
|
||||
ch_part_T part_send;
|
||||
|
||||
clear_job_options(opt);
|
||||
channel = get_channel_arg(&argvars[0], TRUE, FALSE, 0);
|
||||
@@ -3529,8 +3581,8 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
channel_T *channel;
|
||||
int id;
|
||||
ch_mode_T ch_mode;
|
||||
int part_send;
|
||||
int part_read;
|
||||
ch_part_T part_send;
|
||||
ch_part_T part_read;
|
||||
jobopt_T opt;
|
||||
int timeout;
|
||||
|
||||
@@ -3589,7 +3641,7 @@ ch_raw_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
char_u buf[NUMBUFLEN];
|
||||
char_u *text;
|
||||
channel_T *channel;
|
||||
int part_read;
|
||||
ch_part_T part_read;
|
||||
jobopt_T opt;
|
||||
int timeout;
|
||||
|
||||
@@ -3623,7 +3675,7 @@ channel_poll_setup(int nfd_in, void *fds_in)
|
||||
int nfd = nfd_in;
|
||||
channel_T *channel;
|
||||
struct pollfd *fds = fds_in;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
{
|
||||
@@ -3657,7 +3709,7 @@ channel_poll_check(int ret_in, void *fds_in)
|
||||
int ret = ret_in;
|
||||
channel_T *channel;
|
||||
struct pollfd *fds = fds_in;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
int idx;
|
||||
chanpart_T *in_part;
|
||||
|
||||
@@ -3704,7 +3756,7 @@ channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in)
|
||||
channel_T *channel;
|
||||
fd_set *rfds = rfds_in;
|
||||
fd_set *wfds = wfds_in;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
{
|
||||
@@ -3736,7 +3788,7 @@ channel_select_check(int ret_in, void *rfds_in, void *wfds_in)
|
||||
channel_T *channel;
|
||||
fd_set *rfds = rfds_in;
|
||||
fd_set *wfds = wfds_in;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
chanpart_T *in_part;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
@@ -3782,7 +3834,7 @@ channel_parse_messages(void)
|
||||
channel_T *channel = first_channel;
|
||||
int ret = FALSE;
|
||||
int r;
|
||||
int part = PART_SOCK;
|
||||
ch_part_T part = PART_SOCK;
|
||||
|
||||
++safe_to_invoke_callback;
|
||||
|
||||
@@ -3795,9 +3847,9 @@ channel_parse_messages(void)
|
||||
}
|
||||
while (channel != NULL)
|
||||
{
|
||||
if (channel->ch_to_be_closed)
|
||||
if (channel->ch_to_be_closed == 0)
|
||||
{
|
||||
channel->ch_to_be_closed = FALSE;
|
||||
channel->ch_to_be_closed = (1 << PART_COUNT);
|
||||
channel_close_now(channel);
|
||||
/* channel may have been freed, start over */
|
||||
channel = first_channel;
|
||||
@@ -3819,7 +3871,7 @@ channel_parse_messages(void)
|
||||
continue;
|
||||
}
|
||||
if (channel->ch_part[part].ch_fd != INVALID_FD
|
||||
|| channel_has_readahead(channel, part))
|
||||
|| channel_has_readahead(channel, part))
|
||||
{
|
||||
/* Increase the refcount, in case the handler causes the channel
|
||||
* to be unreferenced or closed. */
|
||||
@@ -3878,7 +3930,7 @@ set_ref_in_channel(int copyID)
|
||||
/*
|
||||
* Return the "part" to write to for "channel".
|
||||
*/
|
||||
int
|
||||
ch_part_T
|
||||
channel_part_send(channel_T *channel)
|
||||
{
|
||||
if (channel->CH_SOCK_FD == INVALID_FD)
|
||||
@@ -3889,7 +3941,7 @@ channel_part_send(channel_T *channel)
|
||||
/*
|
||||
* Return the default "part" to read from for "channel".
|
||||
*/
|
||||
int
|
||||
ch_part_T
|
||||
channel_part_read(channel_T *channel)
|
||||
{
|
||||
if (channel->CH_SOCK_FD == INVALID_FD)
|
||||
@@ -3902,7 +3954,7 @@ channel_part_read(channel_T *channel)
|
||||
* If "channel" is invalid returns MODE_JSON.
|
||||
*/
|
||||
ch_mode_T
|
||||
channel_get_mode(channel_T *channel, int part)
|
||||
channel_get_mode(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
if (channel == NULL)
|
||||
return MODE_JSON;
|
||||
@@ -3913,7 +3965,7 @@ channel_get_mode(channel_T *channel, int part)
|
||||
* Return the timeout of "channel"/"part"
|
||||
*/
|
||||
int
|
||||
channel_get_timeout(channel_T *channel, int part)
|
||||
channel_get_timeout(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
return channel->ch_part[part].ch_timeout;
|
||||
}
|
||||
@@ -3941,7 +3993,7 @@ handle_mode(typval_T *item, jobopt_T *opt, ch_mode_T *modep, int jo)
|
||||
}
|
||||
|
||||
static int
|
||||
handle_io(typval_T *item, int part, jobopt_T *opt)
|
||||
handle_io(typval_T *item, ch_part_T part, jobopt_T *opt)
|
||||
{
|
||||
char_u *val = get_tv_string(item);
|
||||
|
||||
@@ -4024,7 +4076,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported)
|
||||
dict_T *dict;
|
||||
int todo;
|
||||
hashitem_T *hi;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
opt->jo_set = 0;
|
||||
if (tv->v_type == VAR_UNKNOWN)
|
||||
@@ -4269,6 +4321,8 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported)
|
||||
val = get_tv_string(item);
|
||||
if (STRCMP(val, "err") == 0)
|
||||
opt->jo_part = PART_ERR;
|
||||
else if (STRCMP(val, "out") == 0)
|
||||
opt->jo_part = PART_OUT;
|
||||
else
|
||||
{
|
||||
EMSG2(_(e_invarg2), val);
|
||||
@@ -4320,10 +4374,10 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported)
|
||||
* Returns NULL if the handle is invalid.
|
||||
* When "check_open" is TRUE check that the channel can be used.
|
||||
* When "reading" is TRUE "check_open" considers typeahead useful.
|
||||
* "part" is used to check typeahead, when -1 use the default part.
|
||||
* "part" is used to check typeahead, when PART_COUNT use the default part.
|
||||
*/
|
||||
channel_T *
|
||||
get_channel_arg(typval_T *tv, int check_open, int reading, int part)
|
||||
get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part)
|
||||
{
|
||||
channel_T *channel = NULL;
|
||||
int has_readahead = FALSE;
|
||||
@@ -4344,7 +4398,7 @@ get_channel_arg(typval_T *tv, int check_open, int reading, int part)
|
||||
}
|
||||
if (channel != NULL && reading)
|
||||
has_readahead = channel_has_readahead(channel,
|
||||
part >= 0 ? part : channel_part_read(channel));
|
||||
part != PART_COUNT ? part : channel_part_read(channel));
|
||||
|
||||
if (check_open && (channel == NULL || (!channel_is_open(channel)
|
||||
&& !(reading && has_readahead))))
|
||||
@@ -4636,7 +4690,7 @@ job_start(typval_T *argvars)
|
||||
garray_T ga;
|
||||
#endif
|
||||
jobopt_T opt;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
|
||||
job = job_alloc();
|
||||
if (job == NULL)
|
||||
@@ -4656,7 +4710,7 @@ job_start(typval_T *argvars)
|
||||
goto theend;
|
||||
|
||||
/* Check that when io is "file" that there is a file name. */
|
||||
for (part = PART_OUT; part <= PART_IN; ++part)
|
||||
for (part = PART_OUT; part < PART_COUNT; ++part)
|
||||
if ((opt.jo_set & (JO_OUT_IO << (part - PART_OUT)))
|
||||
&& opt.jo_io[part] == JIO_FILE
|
||||
&& (!(opt.jo_set & (JO_OUT_NAME << (part - PART_OUT)))
|
||||
|
||||
+3
-3
@@ -5622,7 +5622,7 @@ set_ref_in_item(
|
||||
else if (tv->v_type == VAR_CHANNEL)
|
||||
{
|
||||
channel_T *ch =tv->vval.v_channel;
|
||||
int part;
|
||||
ch_part_T part;
|
||||
typval_T dtv;
|
||||
jsonq_T *jq;
|
||||
cbq_T *cq;
|
||||
@@ -5630,7 +5630,7 @@ set_ref_in_item(
|
||||
if (ch != NULL && ch->ch_copyID != copyID)
|
||||
{
|
||||
ch->ch_copyID = copyID;
|
||||
for (part = PART_SOCK; part <= PART_IN; ++part)
|
||||
for (part = PART_SOCK; part < PART_COUNT; ++part)
|
||||
{
|
||||
for (jq = ch->ch_part[part].ch_json_head.jq_next; jq != NULL;
|
||||
jq = jq->jq_next)
|
||||
@@ -7305,7 +7305,7 @@ get_tv_string_buf_chk(typval_T *varp, char_u *buf)
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
{
|
||||
channel_T *channel = varp->vval.v_channel;
|
||||
char *status = channel_status(channel);
|
||||
char *status = channel_status(channel, -1);
|
||||
|
||||
if (channel == NULL)
|
||||
vim_snprintf((char *)buf, NUMBUFLEN, "channel %s", status);
|
||||
|
||||
+15
-4
@@ -514,7 +514,7 @@ static struct fst
|
||||
{"ch_sendexpr", 2, 3, f_ch_sendexpr},
|
||||
{"ch_sendraw", 2, 3, f_ch_sendraw},
|
||||
{"ch_setoptions", 2, 2, f_ch_setoptions},
|
||||
{"ch_status", 1, 1, f_ch_status},
|
||||
{"ch_status", 1, 2, f_ch_status},
|
||||
#endif
|
||||
{"changenr", 0, 0, f_changenr},
|
||||
{"char2nr", 1, 2, f_char2nr},
|
||||
@@ -1985,13 +1985,24 @@ f_ch_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
f_ch_status(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel;
|
||||
jobopt_T opt;
|
||||
int part = -1;
|
||||
|
||||
/* return an empty string by default */
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
rettv->vval.v_string = vim_strsave((char_u *)channel_status(channel));
|
||||
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
clear_job_options(&opt);
|
||||
if (get_job_options(&argvars[1], &opt, JO_PART) == OK
|
||||
&& (opt.jo_set & JO_PART))
|
||||
part = opt.jo_part;
|
||||
}
|
||||
|
||||
rettv->vval.v_string = vim_strsave((char_u *)channel_status(channel, part));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3612,7 +3623,7 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
|
||||
|
||||
if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
|
||||
|| (is_funcref && trans_name == NULL))
|
||||
EMSG2(_(e_invarg2), s);
|
||||
EMSG2(_(e_invarg2), use_string ? get_tv_string(&argvars[0]) : s);
|
||||
/* Don't check an autoload name for existence here. */
|
||||
else if (trans_name != NULL && (is_funcref
|
||||
? find_func(trans_name) == NULL
|
||||
@@ -6893,7 +6904,7 @@ libcall_common(typval_T *argvars, typval_T *rettv, int type)
|
||||
return;
|
||||
|
||||
#ifdef FEAT_LIBCALL
|
||||
/* The first two args must be strings, otherwise its meaningless */
|
||||
/* The first two args must be strings, otherwise it's meaningless */
|
||||
if (argvars[0].v_type == VAR_STRING && argvars[1].v_type == VAR_STRING)
|
||||
{
|
||||
string_in = NULL;
|
||||
|
||||
+3
-3
@@ -730,12 +730,12 @@ EX(CMD_laddfile, "laddfile", ex_cfile,
|
||||
EX(CMD_later, "later", ex_later,
|
||||
TRLBAR|EXTRA|NOSPC|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lbottom, "lbottom", ex_cbottom,
|
||||
TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
|
||||
BANG|RANGE|NOTADR|WORD1|TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lbottom, "lbottom", ex_cbottom,
|
||||
TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lcd, "lcd", ex_cd,
|
||||
BANG|FILE1|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
|
||||
+10
-1
@@ -9083,9 +9083,18 @@ do_sleep(long msec)
|
||||
if (due_time > 0 && due_time < wait_now)
|
||||
wait_now = due_time;
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if (has_any_channel() && wait_now > 100L)
|
||||
wait_now = 100L;
|
||||
#endif
|
||||
ui_delay(wait_now, TRUE);
|
||||
ui_breakcheck();
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if (has_any_channel())
|
||||
ui_breakcheck_force(TRUE);
|
||||
else
|
||||
#endif
|
||||
ui_breakcheck();
|
||||
#ifdef MESSAGE_QUEUE
|
||||
/* Process the netbeans and clientserver messages that may have been
|
||||
* received in the call to ui_breakcheck() when the GUI is in use. This
|
||||
|
||||
@@ -3011,6 +3011,9 @@ check_for_cryptkey(
|
||||
|
||||
/* Remove cryptmethod specific header from the text. */
|
||||
header_len = crypt_get_header_len(method);
|
||||
if (*sizep <= header_len)
|
||||
/* invalid header, buffer can't be encrypted */
|
||||
return NULL;
|
||||
*filesizep += header_len;
|
||||
*sizep -= header_len;
|
||||
mch_memmove(ptr, ptr + header_len, (size_t)*sizep);
|
||||
|
||||
@@ -124,6 +124,7 @@
|
||||
#endif
|
||||
#ifdef RUBY19_OR_LATER
|
||||
# ifdef FEAT_GUI_MACVIM
|
||||
# undef SIZEOF_TIME_T
|
||||
# include <Ruby/ruby/encoding.h>
|
||||
# else
|
||||
# include <ruby/encoding.h>
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@
|
||||
--with-mac-arch=$arch
|
||||
--cache-file=auto/config.cache
|
||||
|
||||
# Configure arguments: create an empty "config.arg" file when its missing
|
||||
# Configure arguments: create an empty "config.arg" file when it's missing
|
||||
config.arg:
|
||||
:touch {exist} config.arg
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ static int errorHandler(Display *, XErrorEvent *);
|
||||
|
||||
/*
|
||||
* nbdebug_wait - This function can be used to delay or stop execution of vim.
|
||||
* Its normally used to delay startup while attaching a
|
||||
* It's normally used to delay startup while attaching a
|
||||
* debugger to a running process. Since workshop starts gvim
|
||||
* from a background process this is the only way to debug
|
||||
* startup problems.
|
||||
|
||||
+4
-4
@@ -2156,7 +2156,7 @@ nb_do_cmd(
|
||||
else if (streq((char *)cmd, "save"))
|
||||
{
|
||||
/*
|
||||
* NOTE - This command is obsolete wrt NetBeans. Its left in
|
||||
* NOTE - This command is obsolete wrt NetBeans. It's left in
|
||||
* only for historical reasons.
|
||||
*/
|
||||
if (buf == NULL || buf->bufp == NULL)
|
||||
@@ -2242,7 +2242,7 @@ nb_do_cmd(
|
||||
|
||||
/*
|
||||
* Is this needed? I moved the netbeans_Xt_connect() later during startup
|
||||
* and it may no longer be necessary. If its not needed then needupdate
|
||||
* and it may no longer be necessary. If it's not needed then needupdate
|
||||
* and do_update can also be removed.
|
||||
*/
|
||||
if (buf != NULL && buf->initDone && do_update)
|
||||
@@ -2856,7 +2856,7 @@ netbeans_unmodified(buf_T *bufp UNUSED)
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a button release event back to netbeans. Its up to netbeans
|
||||
* Send a button release event back to netbeans. It's up to netbeans
|
||||
* to decide what to do (if anything) with this event.
|
||||
*/
|
||||
void
|
||||
@@ -3453,7 +3453,7 @@ pos2off(buf_T *buf, pos_T *pos)
|
||||
|
||||
|
||||
/*
|
||||
* This message is printed after NetBeans opens a new file. Its
|
||||
* This message is printed after NetBeans opens a new file. It's
|
||||
* similar to the message readfile() uses, but since NetBeans
|
||||
* doesn't normally call readfile, we do our own.
|
||||
*/
|
||||
|
||||
+75
-7
@@ -4244,6 +4244,52 @@ nv_gd(
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if line[offset] is not inside a C-style comment or string, FALSE
|
||||
* otherwise.
|
||||
*/
|
||||
static int
|
||||
is_ident(char_u *line, int offset)
|
||||
{
|
||||
int i;
|
||||
int incomment = FALSE;
|
||||
int instring = 0;
|
||||
int prev = 0;
|
||||
|
||||
for (i = 0; i < offset && line[i] != NUL; i++)
|
||||
{
|
||||
if (instring != 0)
|
||||
{
|
||||
if (prev != '\\' && line[i] == instring)
|
||||
instring = 0;
|
||||
}
|
||||
else if ((line[i] == '"' || line[i] == '\'') && !incomment)
|
||||
{
|
||||
instring = line[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (incomment)
|
||||
{
|
||||
if (prev == '*' && line[i] == '/')
|
||||
incomment = FALSE;
|
||||
}
|
||||
else if (prev == '/' && line[i] == '*')
|
||||
{
|
||||
incomment = TRUE;
|
||||
}
|
||||
else if (prev == '/' && line[i] == '/')
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
prev = line[i];
|
||||
}
|
||||
|
||||
return incomment == FALSE && instring == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Search for variable declaration of "ptr[len]".
|
||||
* When "locally" is TRUE in the current function ("gd"), otherwise in the
|
||||
@@ -4269,6 +4315,7 @@ find_decl(
|
||||
int retval = OK;
|
||||
int incll;
|
||||
int searchflags = flags_arg;
|
||||
int valid;
|
||||
|
||||
if ((pat = alloc(len + 7)) == NULL)
|
||||
return FAIL;
|
||||
@@ -4306,6 +4353,7 @@ find_decl(
|
||||
clearpos(&found_pos);
|
||||
for (;;)
|
||||
{
|
||||
valid = FALSE;
|
||||
t = searchit(curwin, curbuf, &curwin->w_cursor, FORWARD,
|
||||
pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL);
|
||||
if (curwin->w_cursor.lnum >= old_pos.lnum)
|
||||
@@ -4342,9 +4390,20 @@ find_decl(
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!locally) /* global search: use first match found */
|
||||
valid = is_ident(ml_get_curline(), curwin->w_cursor.col);
|
||||
|
||||
/* If the current position is not a valid identifier and a previous
|
||||
* match is present, favor that one instead. */
|
||||
if (!valid && found_pos.lnum != 0)
|
||||
{
|
||||
curwin->w_cursor = found_pos;
|
||||
break;
|
||||
if (curwin->w_cursor.lnum >= par_pos.lnum)
|
||||
}
|
||||
|
||||
/* Global search: use first valid match found */
|
||||
if (valid && !locally)
|
||||
break;
|
||||
if (valid && curwin->w_cursor.lnum >= par_pos.lnum)
|
||||
{
|
||||
/* If we previously found a valid position, use it. */
|
||||
if (found_pos.lnum != 0)
|
||||
@@ -4352,11 +4411,20 @@ find_decl(
|
||||
break;
|
||||
}
|
||||
|
||||
/* For finding a local variable and the match is before the "{" search
|
||||
* to find a later match. For K&R style function declarations this
|
||||
* skips the function header without types. Remove SEARCH_START from
|
||||
* flags to avoid getting stuck at one position. */
|
||||
found_pos = curwin->w_cursor;
|
||||
/* For finding a local variable and the match is before the "{" or
|
||||
* inside a comment, continue searching. For K&R style function
|
||||
* declarations this skips the function header without types. */
|
||||
if (!valid)
|
||||
{
|
||||
/* Braces needed due to macro expansion of clearpos. */
|
||||
clearpos(&found_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
found_pos = curwin->w_cursor;
|
||||
}
|
||||
/* Remove SEARCH_START from flags to avoid getting stuck at one
|
||||
* position. */
|
||||
searchflags &= ~SEARCH_START;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1381,7 +1381,7 @@ mch_call_shell(
|
||||
* trouble with lattice-c programs.
|
||||
*/
|
||||
void
|
||||
mch_breakcheck(void)
|
||||
mch_breakcheck(int force)
|
||||
{
|
||||
if (SetSignal(0L, (long)(SIGBREAKF_CTRL_C|SIGBREAKF_CTRL_D|SIGBREAKF_CTRL_E|SIGBREAKF_CTRL_F)) & SIGBREAKF_CTRL_C)
|
||||
got_int = TRUE;
|
||||
|
||||
+3
-2
@@ -5386,9 +5386,10 @@ mch_clear_job(job_T *job)
|
||||
* In cooked mode we should get SIGINT, no need to check.
|
||||
*/
|
||||
void
|
||||
mch_breakcheck(void)
|
||||
mch_breakcheck(int force)
|
||||
{
|
||||
if (curr_tmode == TMODE_RAW && RealWaitForChar(read_cmd_fd, 0L, NULL, NULL))
|
||||
if ((curr_tmode == TMODE_RAW || force)
|
||||
&& RealWaitForChar(read_cmd_fd, 0L, NULL, NULL))
|
||||
fill_input_buf(FALSE);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -6187,10 +6187,10 @@ mch_remove(char_u *name)
|
||||
|
||||
|
||||
/*
|
||||
* check for an "interrupt signal": CTRL-break or CTRL-C
|
||||
* Check for an "interrupt signal": CTRL-break or CTRL-C.
|
||||
*/
|
||||
void
|
||||
mch_breakcheck(void)
|
||||
mch_breakcheck(int force)
|
||||
{
|
||||
#ifndef FEAT_GUI_W32 /* never used */
|
||||
if (g_fCtrlCPressed || g_fCBrkPressed)
|
||||
|
||||
+693
-565
File diff suppressed because it is too large
Load Diff
+693
-565
File diff suppressed because it is too large
Load Diff
+17
-17
@@ -4,6 +4,7 @@ int ch_log_active(void);
|
||||
void ch_log(channel_T *ch, char *msg);
|
||||
void ch_logs(channel_T *ch, char *msg, char *name);
|
||||
channel_T *add_channel(void);
|
||||
int has_any_channel(void);
|
||||
int channel_unref(channel_T *channel);
|
||||
int free_unused_channels_contents(int copyID, int mask);
|
||||
void free_unused_channels(int copyID, int mask);
|
||||
@@ -13,30 +14,29 @@ channel_T *channel_open_func(typval_T *argvars);
|
||||
void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err);
|
||||
void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options);
|
||||
void channel_set_options(channel_T *channel, jobopt_T *opt);
|
||||
void channel_set_req_callback(channel_T *channel, int part, char_u *callback, partial_T *partial, int id);
|
||||
void channel_set_req_callback(channel_T *channel, ch_part_T part, char_u *callback, partial_T *partial, int id);
|
||||
void channel_buffer_free(buf_T *buf);
|
||||
void channel_write_any_lines(void);
|
||||
void channel_write_new_lines(buf_T *buf);
|
||||
readq_T *channel_peek(channel_T *channel, int part);
|
||||
readq_T *channel_peek(channel_T *channel, ch_part_T part);
|
||||
char_u *channel_first_nl(readq_T *node);
|
||||
char_u *channel_get(channel_T *channel, int part);
|
||||
void channel_consume(channel_T *channel, int part, int len);
|
||||
int channel_collapse(channel_T *channel, int part, int want_nl);
|
||||
char_u *channel_get(channel_T *channel, ch_part_T part);
|
||||
void channel_consume(channel_T *channel, ch_part_T part, int len);
|
||||
int channel_collapse(channel_T *channel, ch_part_T part, int want_nl);
|
||||
int channel_can_write_to(channel_T *channel);
|
||||
int channel_is_open(channel_T *channel);
|
||||
char *channel_status(channel_T *channel);
|
||||
char *channel_status(channel_T *channel, int req_part);
|
||||
void channel_info(channel_T *channel, dict_T *dict);
|
||||
void channel_close(channel_T *channel, int invoke_close_cb);
|
||||
void channel_close_in(channel_T *channel);
|
||||
void channel_clear(channel_T *channel);
|
||||
void channel_free_all(void);
|
||||
char_u *channel_read_block(channel_T *channel, int part, int timeout);
|
||||
int channel_read_json_block(channel_T *channel, int part, int timeout_arg, int id, typval_T **rettv);
|
||||
char_u *channel_read_block(channel_T *channel, ch_part_T part, int timeout);
|
||||
int channel_read_json_block(channel_T *channel, ch_part_T part, int timeout_arg, int id, typval_T **rettv);
|
||||
void common_channel_read(typval_T *argvars, typval_T *rettv, int raw);
|
||||
channel_T *channel_fd2channel(sock_T fd, int *partp);
|
||||
channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
|
||||
void channel_handle_events(void);
|
||||
int channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun);
|
||||
channel_T *send_common(typval_T *argvars, char_u *text, int id, int eval, jobopt_T *opt, char *fun, int *part_read);
|
||||
int channel_send(channel_T *channel, ch_part_T part, char_u *buf, int len, char *fun);
|
||||
void ch_expr_common(typval_T *argvars, typval_T *rettv, int eval);
|
||||
void ch_raw_common(typval_T *argvars, typval_T *rettv, int eval);
|
||||
int channel_poll_setup(int nfd_in, void *fds_in);
|
||||
@@ -45,14 +45,14 @@ int channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in);
|
||||
int channel_select_check(int ret_in, void *rfds_in, void *wfds_in);
|
||||
int channel_parse_messages(void);
|
||||
int set_ref_in_channel(int copyID);
|
||||
int channel_part_send(channel_T *channel);
|
||||
int channel_part_read(channel_T *channel);
|
||||
ch_mode_T channel_get_mode(channel_T *channel, int part);
|
||||
int channel_get_timeout(channel_T *channel, int part);
|
||||
ch_part_T channel_part_send(channel_T *channel);
|
||||
ch_part_T channel_part_read(channel_T *channel);
|
||||
ch_mode_T channel_get_mode(channel_T *channel, ch_part_T part);
|
||||
int channel_get_timeout(channel_T *channel, ch_part_T part);
|
||||
void clear_job_options(jobopt_T *opt);
|
||||
void free_job_options(jobopt_T *opt);
|
||||
int get_job_options(typval_T *tv, jobopt_T *opt, int supported);
|
||||
channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, int part);
|
||||
channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part);
|
||||
void job_free_all(void);
|
||||
int set_ref_in_job(int copyID);
|
||||
void job_unref(job_T *job);
|
||||
@@ -67,6 +67,6 @@ char *job_status(job_T *job);
|
||||
void job_info(job_T *job, dict_T *dict);
|
||||
int job_stop(job_T *job, typval_T *argvars);
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
void channel_read(channel_T *channel, int part, char *func);
|
||||
void channel_read(channel_T *channel, ch_part_T part, char *func);
|
||||
#endif
|
||||
/* vim: set ft=c : */
|
||||
|
||||
@@ -233,7 +233,7 @@ gui_mch_replace_dialog(exarg_T *eap);
|
||||
im_set_control(int enable);
|
||||
|
||||
void *
|
||||
gui_macvim_add_channel(channel_T *channel, int part);
|
||||
gui_macvim_add_channel(channel_T *channel, ch_part_T part);
|
||||
void
|
||||
gui_macvim_remove_channel(void *cookie);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ int mch_get_shellsize(void);
|
||||
void mch_set_shellsize(void);
|
||||
void mch_new_shellsize(void);
|
||||
int mch_call_shell(char_u *cmd, int options);
|
||||
void mch_breakcheck(void);
|
||||
void mch_breakcheck(int force);
|
||||
long Chk_Abort(void);
|
||||
int mch_expandpath(garray_T *gap, char_u *pat, int flags);
|
||||
int mch_has_exp_wildcard(char_u *p);
|
||||
|
||||
@@ -61,7 +61,7 @@ void mch_start_job(char **argv, job_T *job, jobopt_T *options);
|
||||
char *mch_job_status(job_T *job);
|
||||
int mch_stop_job(job_T *job, char_u *how);
|
||||
void mch_clear_job(job_T *job);
|
||||
void mch_breakcheck(void);
|
||||
void mch_breakcheck(int force);
|
||||
int mch_expandpath(garray_T *gap, char_u *path, int flags);
|
||||
int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, int flags);
|
||||
int mch_has_exp_wildcard(char_u *p);
|
||||
|
||||
@@ -48,7 +48,7 @@ void mch_set_normal_colors(void);
|
||||
void mch_write(char_u *s, int len);
|
||||
void mch_delay(long msec, int ignoreinput);
|
||||
int mch_remove(char_u *name);
|
||||
void mch_breakcheck(void);
|
||||
void mch_breakcheck(int force);
|
||||
long_u mch_total_mem(int special);
|
||||
int mch_wrename(WCHAR *wold, WCHAR *wnew);
|
||||
int mch_rename(const char *pszOldFile, const char *pszNewFile);
|
||||
|
||||
@@ -10,6 +10,7 @@ int ui_get_shellsize(void);
|
||||
void ui_set_shellsize(int mustset);
|
||||
void ui_new_shellsize(void);
|
||||
void ui_breakcheck(void);
|
||||
void ui_breakcheck_force(int force);
|
||||
void clip_init(int can_use);
|
||||
void clip_update_selection(VimClipboard *clip);
|
||||
void clip_own_selection(VimClipboard *cbd);
|
||||
|
||||
+42
-35
@@ -1010,39 +1010,42 @@ restofline:
|
||||
}
|
||||
else if (vim_strchr((char_u *)"CZ", idx) != NULL)
|
||||
{ /* continuation of multi-line msg */
|
||||
qfline_T *qfprev = qi->qf_lists[qi->qf_curlist].qf_last;
|
||||
|
||||
if (qfprev == NULL)
|
||||
return QF_FAIL;
|
||||
if (*fields->errmsg && !qi->qf_multiignore)
|
||||
if (!qi->qf_multiignore)
|
||||
{
|
||||
len = (int)STRLEN(qfprev->qf_text);
|
||||
if ((ptr = alloc((unsigned)(len + STRLEN(fields->errmsg) + 2)))
|
||||
== NULL)
|
||||
return QF_FAIL;
|
||||
STRCPY(ptr, qfprev->qf_text);
|
||||
vim_free(qfprev->qf_text);
|
||||
qfprev->qf_text = ptr;
|
||||
*(ptr += len) = '\n';
|
||||
STRCPY(++ptr, fields->errmsg);
|
||||
}
|
||||
if (qfprev->qf_nr == -1)
|
||||
qfprev->qf_nr = fields->enr;
|
||||
if (vim_isprintc(fields->type) && !qfprev->qf_type)
|
||||
/* only printable chars allowed */
|
||||
qfprev->qf_type = fields->type;
|
||||
qfline_T *qfprev = qi->qf_lists[qi->qf_curlist].qf_last;
|
||||
|
||||
if (!qfprev->qf_lnum)
|
||||
qfprev->qf_lnum = fields->lnum;
|
||||
if (!qfprev->qf_col)
|
||||
qfprev->qf_col = fields->col;
|
||||
qfprev->qf_viscol = fields->use_viscol;
|
||||
if (!qfprev->qf_fnum)
|
||||
qfprev->qf_fnum = qf_get_fnum(qi, qi->qf_directory,
|
||||
*fields->namebuf || qi->qf_directory != NULL
|
||||
? fields->namebuf
|
||||
: qi->qf_currfile != NULL && fields->valid
|
||||
? qi->qf_currfile : 0);
|
||||
if (qfprev == NULL)
|
||||
return QF_FAIL;
|
||||
if (*fields->errmsg && !qi->qf_multiignore)
|
||||
{
|
||||
len = (int)STRLEN(qfprev->qf_text);
|
||||
if ((ptr = alloc((unsigned)(len + STRLEN(fields->errmsg) + 2)))
|
||||
== NULL)
|
||||
return QF_FAIL;
|
||||
STRCPY(ptr, qfprev->qf_text);
|
||||
vim_free(qfprev->qf_text);
|
||||
qfprev->qf_text = ptr;
|
||||
*(ptr += len) = '\n';
|
||||
STRCPY(++ptr, fields->errmsg);
|
||||
}
|
||||
if (qfprev->qf_nr == -1)
|
||||
qfprev->qf_nr = fields->enr;
|
||||
if (vim_isprintc(fields->type) && !qfprev->qf_type)
|
||||
/* only printable chars allowed */
|
||||
qfprev->qf_type = fields->type;
|
||||
|
||||
if (!qfprev->qf_lnum)
|
||||
qfprev->qf_lnum = fields->lnum;
|
||||
if (!qfprev->qf_col)
|
||||
qfprev->qf_col = fields->col;
|
||||
qfprev->qf_viscol = fields->use_viscol;
|
||||
if (!qfprev->qf_fnum)
|
||||
qfprev->qf_fnum = qf_get_fnum(qi, qi->qf_directory,
|
||||
*fields->namebuf || qi->qf_directory != NULL
|
||||
? fields->namebuf
|
||||
: qi->qf_currfile != NULL && fields->valid
|
||||
? qi->qf_currfile : 0);
|
||||
}
|
||||
if (idx == 'Z')
|
||||
qi->qf_multiline = qi->qf_multiignore = FALSE;
|
||||
line_breakcheck();
|
||||
@@ -3569,7 +3572,7 @@ get_mef_name(void)
|
||||
STRCAT(name, p + 2);
|
||||
if (mch_getperm(name) < 0
|
||||
#ifdef HAVE_LSTAT
|
||||
/* Don't accept a symbolic link, its a security risk. */
|
||||
/* Don't accept a symbolic link, it's a security risk. */
|
||||
&& mch_lstat((char *)name, &sb) < 0
|
||||
#endif
|
||||
)
|
||||
@@ -4591,9 +4594,13 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
||||
/* Use the specified quickfix/location list */
|
||||
if (di->di_tv.v_type == VAR_NUMBER)
|
||||
{
|
||||
qf_idx = di->di_tv.vval.v_number - 1;
|
||||
if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
||||
return FAIL;
|
||||
/* for zero use the current list */
|
||||
if (di->di_tv.vval.v_number != 0)
|
||||
{
|
||||
qf_idx = di->di_tv.vval.v_number - 1;
|
||||
if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
||||
return FAIL;
|
||||
}
|
||||
flags |= QF_GETLIST_NR;
|
||||
}
|
||||
else
|
||||
|
||||
+357
-305
File diff suppressed because it is too large
Load Diff
+95
-94
@@ -5432,7 +5432,7 @@ skip_to_start(int c, colnr_T *colp)
|
||||
char_u *s;
|
||||
|
||||
/* Used often, do some work to avoid call overhead. */
|
||||
if (!ireg_ic
|
||||
if (!rex.reg_ic
|
||||
#ifdef FEAT_MBYTE
|
||||
&& !has_mbyte
|
||||
#endif
|
||||
@@ -5467,7 +5467,7 @@ find_match_text(colnr_T startcol, int regstart, char_u *match_text)
|
||||
{
|
||||
c1 = PTR2CHAR(match_text + len1);
|
||||
c2 = PTR2CHAR(regline + col + len2);
|
||||
if (c1 != c2 && (!ireg_ic || MB_TOLOWER(c1) != MB_TOLOWER(c2)))
|
||||
if (c1 != c2 && (!rex.reg_ic || MB_TOLOWER(c1) != MB_TOLOWER(c2)))
|
||||
{
|
||||
match = FALSE;
|
||||
break;
|
||||
@@ -5485,15 +5485,15 @@ find_match_text(colnr_T startcol, int regstart, char_u *match_text)
|
||||
cleanup_subexpr();
|
||||
if (REG_MULTI)
|
||||
{
|
||||
reg_startpos[0].lnum = reglnum;
|
||||
reg_startpos[0].col = col;
|
||||
reg_endpos[0].lnum = reglnum;
|
||||
reg_endpos[0].col = col + len2;
|
||||
rex.reg_startpos[0].lnum = reglnum;
|
||||
rex.reg_startpos[0].col = col;
|
||||
rex.reg_endpos[0].lnum = reglnum;
|
||||
rex.reg_endpos[0].col = col + len2;
|
||||
}
|
||||
else
|
||||
{
|
||||
reg_startp[0] = regline + col;
|
||||
reg_endp[0] = regline + col + len2;
|
||||
rex.reg_startp[0] = regline + col;
|
||||
rex.reg_endp[0] = regline + col + len2;
|
||||
}
|
||||
return 1L;
|
||||
}
|
||||
@@ -5728,8 +5728,8 @@ nfa_regmatch(
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
/* If the match ends before a composing characters and
|
||||
* ireg_icombine is not set, that is not really a match. */
|
||||
if (enc_utf8 && !ireg_icombine && utf_iscomposing(curc))
|
||||
* rex.reg_icombine is not set, that is not really a match. */
|
||||
if (enc_utf8 && !rex.reg_icombine && utf_iscomposing(curc))
|
||||
break;
|
||||
#endif
|
||||
nfa_match = TRUE;
|
||||
@@ -6048,16 +6048,16 @@ nfa_regmatch(
|
||||
int this_class;
|
||||
|
||||
/* Get class of current and previous char (if it exists). */
|
||||
this_class = mb_get_class_buf(reginput, reg_buf);
|
||||
this_class = mb_get_class_buf(reginput, rex.reg_buf);
|
||||
if (this_class <= 1)
|
||||
result = FALSE;
|
||||
else if (reg_prev_class() == this_class)
|
||||
result = FALSE;
|
||||
}
|
||||
#endif
|
||||
else if (!vim_iswordc_buf(curc, reg_buf)
|
||||
else if (!vim_iswordc_buf(curc, rex.reg_buf)
|
||||
|| (reginput > regline
|
||||
&& vim_iswordc_buf(reginput[-1], reg_buf)))
|
||||
&& vim_iswordc_buf(reginput[-1], rex.reg_buf)))
|
||||
result = FALSE;
|
||||
if (result)
|
||||
{
|
||||
@@ -6076,16 +6076,16 @@ nfa_regmatch(
|
||||
int this_class, prev_class;
|
||||
|
||||
/* Get class of current and previous char (if it exists). */
|
||||
this_class = mb_get_class_buf(reginput, reg_buf);
|
||||
this_class = mb_get_class_buf(reginput, rex.reg_buf);
|
||||
prev_class = reg_prev_class();
|
||||
if (this_class == prev_class
|
||||
|| prev_class == 0 || prev_class == 1)
|
||||
result = FALSE;
|
||||
}
|
||||
#endif
|
||||
else if (!vim_iswordc_buf(reginput[-1], reg_buf)
|
||||
else if (!vim_iswordc_buf(reginput[-1], rex.reg_buf)
|
||||
|| (reginput[0] != NUL
|
||||
&& vim_iswordc_buf(curc, reg_buf)))
|
||||
&& vim_iswordc_buf(curc, rex.reg_buf)))
|
||||
result = FALSE;
|
||||
if (result)
|
||||
{
|
||||
@@ -6096,7 +6096,7 @@ nfa_regmatch(
|
||||
|
||||
case NFA_BOF:
|
||||
if (reglnum == 0 && reginput == regline
|
||||
&& (!REG_MULTI || reg_firstlnum == 1))
|
||||
&& (!REG_MULTI || rex.reg_firstlnum == 1))
|
||||
{
|
||||
add_here = TRUE;
|
||||
add_state = t->state->out;
|
||||
@@ -6104,7 +6104,7 @@ nfa_regmatch(
|
||||
break;
|
||||
|
||||
case NFA_EOF:
|
||||
if (reglnum == reg_maxline && curc == NUL)
|
||||
if (reglnum == rex.reg_maxline && curc == NUL)
|
||||
{
|
||||
add_here = TRUE;
|
||||
add_state = t->state->out;
|
||||
@@ -6131,7 +6131,7 @@ nfa_regmatch(
|
||||
* (no preceding character). */
|
||||
len += mb_char2len(mc);
|
||||
}
|
||||
if (ireg_icombine && len == 0)
|
||||
if (rex.reg_icombine && len == 0)
|
||||
{
|
||||
/* If \Z was present, then ignore composing characters.
|
||||
* When ignoring the base character this always matches. */
|
||||
@@ -6190,8 +6190,8 @@ nfa_regmatch(
|
||||
#endif
|
||||
|
||||
case NFA_NEWL:
|
||||
if (curc == NUL && !reg_line_lbr && REG_MULTI
|
||||
&& reglnum <= reg_maxline)
|
||||
if (curc == NUL && !rex.reg_line_lbr && REG_MULTI
|
||||
&& reglnum <= rex.reg_maxline)
|
||||
{
|
||||
go_to_nextline = TRUE;
|
||||
/* Pass -1 for the offset, which means taking the position
|
||||
@@ -6199,7 +6199,7 @@ nfa_regmatch(
|
||||
add_state = t->state->out;
|
||||
add_off = -1;
|
||||
}
|
||||
else if (curc == '\n' && reg_line_lbr)
|
||||
else if (curc == '\n' && rex.reg_line_lbr)
|
||||
{
|
||||
/* match \n as if it is an ordinary character */
|
||||
add_state = t->state->out;
|
||||
@@ -6244,7 +6244,7 @@ nfa_regmatch(
|
||||
result = result_if_matched;
|
||||
break;
|
||||
}
|
||||
if (ireg_ic)
|
||||
if (rex.reg_ic)
|
||||
{
|
||||
int curc_low = MB_TOLOWER(curc);
|
||||
int done = FALSE;
|
||||
@@ -6262,7 +6262,7 @@ nfa_regmatch(
|
||||
}
|
||||
else if (state->c < 0 ? check_char_class(state->c, curc)
|
||||
: (curc == state->c
|
||||
|| (ireg_ic && MB_TOLOWER(curc)
|
||||
|| (rex.reg_ic && MB_TOLOWER(curc)
|
||||
== MB_TOLOWER(state->c))))
|
||||
{
|
||||
result = result_if_matched;
|
||||
@@ -6320,13 +6320,13 @@ nfa_regmatch(
|
||||
break;
|
||||
|
||||
case NFA_KWORD: /* \k */
|
||||
result = vim_iswordp_buf(reginput, reg_buf);
|
||||
result = vim_iswordp_buf(reginput, rex.reg_buf);
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
break;
|
||||
|
||||
case NFA_SKWORD: /* \K */
|
||||
result = !VIM_ISDIGIT(curc)
|
||||
&& vim_iswordp_buf(reginput, reg_buf);
|
||||
&& vim_iswordp_buf(reginput, rex.reg_buf);
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
break;
|
||||
|
||||
@@ -6441,24 +6441,24 @@ nfa_regmatch(
|
||||
break;
|
||||
|
||||
case NFA_LOWER_IC: /* [a-z] */
|
||||
result = ri_lower(curc) || (ireg_ic && ri_upper(curc));
|
||||
result = ri_lower(curc) || (rex.reg_ic && ri_upper(curc));
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
break;
|
||||
|
||||
case NFA_NLOWER_IC: /* [^a-z] */
|
||||
result = curc != NUL
|
||||
&& !(ri_lower(curc) || (ireg_ic && ri_upper(curc)));
|
||||
&& !(ri_lower(curc) || (rex.reg_ic && ri_upper(curc)));
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
break;
|
||||
|
||||
case NFA_UPPER_IC: /* [A-Z] */
|
||||
result = ri_upper(curc) || (ireg_ic && ri_lower(curc));
|
||||
result = ri_upper(curc) || (rex.reg_ic && ri_lower(curc));
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
break;
|
||||
|
||||
case NFA_NUPPER_IC: /* ^[A-Z] */
|
||||
result = curc != NUL
|
||||
&& !(ri_upper(curc) || (ireg_ic && ri_lower(curc)));
|
||||
&& !(ri_upper(curc) || (rex.reg_ic && ri_lower(curc)));
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
break;
|
||||
|
||||
@@ -6549,7 +6549,7 @@ nfa_regmatch(
|
||||
case NFA_LNUM_LT:
|
||||
result = (REG_MULTI &&
|
||||
nfa_re_num_cmp(t->state->val, t->state->c - NFA_LNUM,
|
||||
(long_u)(reglnum + reg_firstlnum)));
|
||||
(long_u)(reglnum + rex.reg_firstlnum)));
|
||||
if (result)
|
||||
{
|
||||
add_here = TRUE;
|
||||
@@ -6575,7 +6575,7 @@ nfa_regmatch(
|
||||
{
|
||||
int op = t->state->c - NFA_VCOL;
|
||||
colnr_T col = (colnr_T)(reginput - regline);
|
||||
win_T *wp = reg_win == NULL ? curwin : reg_win;
|
||||
win_T *wp = rex.reg_win == NULL ? curwin : rex.reg_win;
|
||||
|
||||
/* Bail out quickly when there can't be a match, avoid the
|
||||
* overhead of win_linetabsize() on long lines. */
|
||||
@@ -6611,18 +6611,18 @@ nfa_regmatch(
|
||||
case NFA_MARK_GT:
|
||||
case NFA_MARK_LT:
|
||||
{
|
||||
pos_T *pos = getmark_buf(reg_buf, t->state->val, FALSE);
|
||||
pos_T *pos = getmark_buf(rex.reg_buf, t->state->val, FALSE);
|
||||
|
||||
/* Compare the mark position to the match position. */
|
||||
result = (pos != NULL /* mark doesn't exist */
|
||||
&& pos->lnum > 0 /* mark isn't set in reg_buf */
|
||||
&& (pos->lnum == reglnum + reg_firstlnum
|
||||
&& (pos->lnum == reglnum + rex.reg_firstlnum
|
||||
? (pos->col == (colnr_T)(reginput - regline)
|
||||
? t->state->c == NFA_MARK
|
||||
: (pos->col < (colnr_T)(reginput - regline)
|
||||
? t->state->c == NFA_MARK_GT
|
||||
: t->state->c == NFA_MARK_LT))
|
||||
: (pos->lnum < reglnum + reg_firstlnum
|
||||
: (pos->lnum < reglnum + rex.reg_firstlnum
|
||||
? t->state->c == NFA_MARK_GT
|
||||
: t->state->c == NFA_MARK_LT)));
|
||||
if (result)
|
||||
@@ -6634,10 +6634,11 @@ nfa_regmatch(
|
||||
}
|
||||
|
||||
case NFA_CURSOR:
|
||||
result = (reg_win != NULL
|
||||
&& (reglnum + reg_firstlnum == reg_win->w_cursor.lnum)
|
||||
result = (rex.reg_win != NULL
|
||||
&& (reglnum + rex.reg_firstlnum
|
||||
== rex.reg_win->w_cursor.lnum)
|
||||
&& ((colnr_T)(reginput - regline)
|
||||
== reg_win->w_cursor.col));
|
||||
== rex.reg_win->w_cursor.col));
|
||||
if (result)
|
||||
{
|
||||
add_here = TRUE;
|
||||
@@ -6691,12 +6692,12 @@ nfa_regmatch(
|
||||
#endif
|
||||
result = (c == curc);
|
||||
|
||||
if (!result && ireg_ic)
|
||||
if (!result && rex.reg_ic)
|
||||
result = MB_TOLOWER(c) == MB_TOLOWER(curc);
|
||||
#ifdef FEAT_MBYTE
|
||||
/* If ireg_icombine is not set only skip over the character
|
||||
/* If rex.reg_icombine is not set only skip over the character
|
||||
* itself. When it is set skip over composing characters. */
|
||||
if (result && enc_utf8 && !ireg_icombine)
|
||||
if (result && enc_utf8 && !rex.reg_icombine)
|
||||
clen = utf_ptr2len(reginput);
|
||||
#endif
|
||||
ADD_STATE_IF_MATCH(t->state);
|
||||
@@ -6815,8 +6816,8 @@ nfa_regmatch(
|
||||
&& ((toplevel
|
||||
&& reglnum == 0
|
||||
&& clen != 0
|
||||
&& (ireg_maxcol == 0
|
||||
|| (colnr_T)(reginput - regline) < ireg_maxcol))
|
||||
&& (rex.reg_maxcol == 0
|
||||
|| (colnr_T)(reginput - regline) < rex.reg_maxcol))
|
||||
|| (nfa_endp != NULL
|
||||
&& (REG_MULTI
|
||||
? (reglnum < nfa_endp->se_u.pos.lnum
|
||||
@@ -6856,8 +6857,8 @@ nfa_regmatch(
|
||||
/* Checking if the required start character matches is
|
||||
* cheaper than adding a state that won't match. */
|
||||
c = PTR2CHAR(reginput + clen);
|
||||
if (c != prog->regstart && (!ireg_ic || MB_TOLOWER(c)
|
||||
!= MB_TOLOWER(prog->regstart)))
|
||||
if (c != prog->regstart && (!rex.reg_ic
|
||||
|| MB_TOLOWER(c) != MB_TOLOWER(prog->regstart)))
|
||||
{
|
||||
#ifdef ENABLE_LOG
|
||||
fprintf(log_fd, " Skipping start state, regstart does not match\n");
|
||||
@@ -6997,40 +6998,40 @@ nfa_regtry(
|
||||
{
|
||||
for (i = 0; i < subs.norm.in_use; i++)
|
||||
{
|
||||
reg_startpos[i].lnum = subs.norm.list.multi[i].start_lnum;
|
||||
reg_startpos[i].col = subs.norm.list.multi[i].start_col;
|
||||
rex.reg_startpos[i].lnum = subs.norm.list.multi[i].start_lnum;
|
||||
rex.reg_startpos[i].col = subs.norm.list.multi[i].start_col;
|
||||
|
||||
reg_endpos[i].lnum = subs.norm.list.multi[i].end_lnum;
|
||||
reg_endpos[i].col = subs.norm.list.multi[i].end_col;
|
||||
rex.reg_endpos[i].lnum = subs.norm.list.multi[i].end_lnum;
|
||||
rex.reg_endpos[i].col = subs.norm.list.multi[i].end_col;
|
||||
}
|
||||
|
||||
if (reg_startpos[0].lnum < 0)
|
||||
if (rex.reg_startpos[0].lnum < 0)
|
||||
{
|
||||
reg_startpos[0].lnum = 0;
|
||||
reg_startpos[0].col = col;
|
||||
rex.reg_startpos[0].lnum = 0;
|
||||
rex.reg_startpos[0].col = col;
|
||||
}
|
||||
if (reg_endpos[0].lnum < 0)
|
||||
if (rex.reg_endpos[0].lnum < 0)
|
||||
{
|
||||
/* pattern has a \ze but it didn't match, use current end */
|
||||
reg_endpos[0].lnum = reglnum;
|
||||
reg_endpos[0].col = (int)(reginput - regline);
|
||||
rex.reg_endpos[0].lnum = reglnum;
|
||||
rex.reg_endpos[0].col = (int)(reginput - regline);
|
||||
}
|
||||
else
|
||||
/* Use line number of "\ze". */
|
||||
reglnum = reg_endpos[0].lnum;
|
||||
reglnum = rex.reg_endpos[0].lnum;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < subs.norm.in_use; i++)
|
||||
{
|
||||
reg_startp[i] = subs.norm.list.line[i].start;
|
||||
reg_endp[i] = subs.norm.list.line[i].end;
|
||||
rex.reg_startp[i] = subs.norm.list.line[i].start;
|
||||
rex.reg_endp[i] = subs.norm.list.line[i].end;
|
||||
}
|
||||
|
||||
if (reg_startp[0] == NULL)
|
||||
reg_startp[0] = regline + col;
|
||||
if (reg_endp[0] == NULL)
|
||||
reg_endp[0] = reginput;
|
||||
if (rex.reg_startp[0] == NULL)
|
||||
rex.reg_startp[0] = regline + col;
|
||||
if (rex.reg_endp[0] == NULL)
|
||||
rex.reg_endp[0] = reginput;
|
||||
}
|
||||
|
||||
#ifdef FEAT_SYN_HL
|
||||
@@ -7093,16 +7094,16 @@ nfa_regexec_both(
|
||||
|
||||
if (REG_MULTI)
|
||||
{
|
||||
prog = (nfa_regprog_T *)reg_mmatch->regprog;
|
||||
prog = (nfa_regprog_T *)rex.reg_mmatch->regprog;
|
||||
line = reg_getline((linenr_T)0); /* relative to the cursor */
|
||||
reg_startpos = reg_mmatch->startpos;
|
||||
reg_endpos = reg_mmatch->endpos;
|
||||
rex.reg_startpos = rex.reg_mmatch->startpos;
|
||||
rex.reg_endpos = rex.reg_mmatch->endpos;
|
||||
}
|
||||
else
|
||||
{
|
||||
prog = (nfa_regprog_T *)reg_match->regprog;
|
||||
reg_startp = reg_match->startp;
|
||||
reg_endp = reg_match->endp;
|
||||
prog = (nfa_regprog_T *)rex.reg_match->regprog;
|
||||
rex.reg_startp = rex.reg_match->startp;
|
||||
rex.reg_endp = rex.reg_match->endp;
|
||||
}
|
||||
|
||||
/* Be paranoid... */
|
||||
@@ -7112,16 +7113,16 @@ nfa_regexec_both(
|
||||
goto theend;
|
||||
}
|
||||
|
||||
/* If pattern contains "\c" or "\C": overrule value of ireg_ic */
|
||||
/* If pattern contains "\c" or "\C": overrule value of rex.reg_ic */
|
||||
if (prog->regflags & RF_ICASE)
|
||||
ireg_ic = TRUE;
|
||||
rex.reg_ic = TRUE;
|
||||
else if (prog->regflags & RF_NOICASE)
|
||||
ireg_ic = FALSE;
|
||||
rex.reg_ic = FALSE;
|
||||
|
||||
#ifdef FEAT_MBYTE
|
||||
/* If pattern contains "\Z" overrule value of ireg_icombine */
|
||||
/* If pattern contains "\Z" overrule value of rex.reg_icombine */
|
||||
if (prog->regflags & RF_ICOMBINE)
|
||||
ireg_icombine = TRUE;
|
||||
rex.reg_icombine = TRUE;
|
||||
#endif
|
||||
|
||||
regline = line;
|
||||
@@ -7160,14 +7161,14 @@ nfa_regexec_both(
|
||||
* Nothing else to try. Doesn't handle combining chars well. */
|
||||
if (prog->match_text != NULL
|
||||
#ifdef FEAT_MBYTE
|
||||
&& !ireg_icombine
|
||||
&& !rex.reg_icombine
|
||||
#endif
|
||||
)
|
||||
return find_match_text(col, prog->regstart, prog->match_text);
|
||||
}
|
||||
|
||||
/* If the start column is past the maximum column: no need to try. */
|
||||
if (ireg_maxcol > 0 && col >= ireg_maxcol)
|
||||
if (rex.reg_maxcol > 0 && col >= rex.reg_maxcol)
|
||||
goto theend;
|
||||
|
||||
nstate = prog->nstate;
|
||||
@@ -7326,17 +7327,17 @@ nfa_regexec_nl(
|
||||
colnr_T col, /* column to start looking for match */
|
||||
int line_lbr)
|
||||
{
|
||||
reg_match = rmp;
|
||||
reg_mmatch = NULL;
|
||||
reg_maxline = 0;
|
||||
reg_line_lbr = line_lbr;
|
||||
reg_buf = curbuf;
|
||||
reg_win = NULL;
|
||||
ireg_ic = rmp->rm_ic;
|
||||
rex.reg_match = rmp;
|
||||
rex.reg_mmatch = NULL;
|
||||
rex.reg_maxline = 0;
|
||||
rex.reg_line_lbr = line_lbr;
|
||||
rex.reg_buf = curbuf;
|
||||
rex.reg_win = NULL;
|
||||
rex.reg_ic = rmp->rm_ic;
|
||||
#ifdef FEAT_MBYTE
|
||||
ireg_icombine = FALSE;
|
||||
rex.reg_icombine = FALSE;
|
||||
#endif
|
||||
ireg_maxcol = 0;
|
||||
rex.reg_maxcol = 0;
|
||||
return nfa_regexec_both(line, col, NULL);
|
||||
}
|
||||
|
||||
@@ -7375,18 +7376,18 @@ nfa_regexec_multi(
|
||||
colnr_T col, /* column to start looking for match */
|
||||
proftime_T *tm) /* timeout limit or NULL */
|
||||
{
|
||||
reg_match = NULL;
|
||||
reg_mmatch = rmp;
|
||||
reg_buf = buf;
|
||||
reg_win = win;
|
||||
reg_firstlnum = lnum;
|
||||
reg_maxline = reg_buf->b_ml.ml_line_count - lnum;
|
||||
reg_line_lbr = FALSE;
|
||||
ireg_ic = rmp->rmm_ic;
|
||||
rex.reg_match = NULL;
|
||||
rex.reg_mmatch = rmp;
|
||||
rex.reg_buf = buf;
|
||||
rex.reg_win = win;
|
||||
rex.reg_firstlnum = lnum;
|
||||
rex.reg_maxline = rex.reg_buf->b_ml.ml_line_count - lnum;
|
||||
rex.reg_line_lbr = FALSE;
|
||||
rex.reg_ic = rmp->rmm_ic;
|
||||
#ifdef FEAT_MBYTE
|
||||
ireg_icombine = FALSE;
|
||||
rex.reg_icombine = FALSE;
|
||||
#endif
|
||||
ireg_maxcol = rmp->rmm_maxcol;
|
||||
rex.reg_maxcol = rmp->rmm_maxcol;
|
||||
|
||||
return nfa_regexec_both(NULL, col, tm);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user