mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
123 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5cc2a2b8f8 | |||
| 34d4c9f566 | |||
| d05258ea2a | |||
| 0945eaface | |||
| 4b785f69c0 | |||
| 1b15a7159b | |||
| e3e3a15159 | |||
| 16974f80f9 | |||
| f9248a4311 | |||
| f422bcc7f9 | |||
| 8a8199e4a1 | |||
| 7554da4033 | |||
| 031cb743ae | |||
| 319afe3804 | |||
| 73095288da | |||
| 58c358753e | |||
| 833eb1d752 | |||
| 2cab0e1910 | |||
| f7c4ef23fa | |||
| 182707ac10 | |||
| c8b6fd59f0 | |||
| 235364e825 | |||
| 362a5c0b39 | |||
| ca82514bff | |||
| 414abe65f1 | |||
| 6cfc463126 | |||
| 031dd64ad7 | |||
| c85f864c35 | |||
| 75c997049e | |||
| 109b8c134c | |||
| 967b1a1814 | |||
| 7fe35f8735 | |||
| cab4040499 | |||
| 4dba9d1e2f | |||
| aedaad51cf | |||
| fbf66f9918 | |||
| 63e4344edc | |||
| dda39aeafc | |||
| 3129be9a78 | |||
| 7c8684761b | |||
| 32418b98a0 | |||
| abeb366f9f | |||
| 28f88ac8e7 | |||
| a6d11c71a0 | |||
| cf2ddc70a1 | |||
| 0b0e6b0350 | |||
| deddd2587c | |||
| ca8b8d6956 | |||
| 9f0e423c28 | |||
| 6c896867c4 | |||
| a859f04b4d | |||
| cc28e2d05d | |||
| 7df915d113 | |||
| c0514bf477 | |||
| 1ed1ccc2c3 | |||
| 1de54de4ef | |||
| 2256c99471 | |||
| 4663f06f3e | |||
| 914798ebeb | |||
| 8a01f969c1 | |||
| 20d6ca2821 | |||
| 7618e00d3b | |||
| 8e63905263 | |||
| 5d7520fbfe | |||
| 04561d6622 | |||
| 2c1841d1d4 | |||
| 3f7d090726 | |||
| d4db7719bd | |||
| b6be3ea45b | |||
| 2b946c9f9b | |||
| 63bed3d319 | |||
| 59f5f0ab64 | |||
| 08a873a739 | |||
| e3505dfc85 | |||
| 79cbdcb1ee | |||
| 87243e38ea | |||
| 8a5883b748 | |||
| 95f096030e | |||
| 459ca56312 | |||
| 38bc495637 | |||
| fde8fd50d8 | |||
| c4d4ac22f7 | |||
| 3f9ebf32a3 | |||
| c1e81252b7 | |||
| a1f4cb93ba | |||
| 25de4c232d | |||
| 21662be221 | |||
| 98500fdc61 | |||
| 06b40267d6 | |||
| 4a08b0dc4d | |||
| 40d3f137e7 | |||
| eb828d01d9 | |||
| 7416ff4766 | |||
| 55952d4dd4 | |||
| 3549534f18 | |||
| 8161551724 | |||
| aab3383e70 | |||
| 426f375422 | |||
| de5e2c219b | |||
| 91e44a3305 | |||
| 9376f5f482 | |||
| d0b5138ba4 | |||
| 2a2ff9da47 | |||
| 3a117e19e0 | |||
| b4ada79aa7 | |||
| 4dfba198e1 | |||
| fb63090b62 | |||
| 60ef3e81f4 | |||
| 89be02e06e | |||
| eb4d05a87a | |||
| 60d5a30b3b | |||
| a6a61ecb87 | |||
| 106dc393f4 | |||
| 35a1f59d63 | |||
| 77f2a92caf | |||
| 14207f487c | |||
| 01688ad545 | |||
| 2f97912800 | |||
| 6d5ad4c411 | |||
| a350bab042 | |||
| 50e5376926 | |||
| 5a07be6ed4 | |||
| 46fceaaa8d |
@@ -207,7 +207,7 @@ SRC_UNIX = \
|
||||
src/config.mk.dist \
|
||||
src/config.mk.in \
|
||||
src/configure \
|
||||
src/configure.in \
|
||||
src/configure.ac \
|
||||
src/gui_at_fs.c \
|
||||
src/gui_at_sb.c \
|
||||
src/gui_at_sb.h \
|
||||
|
||||
@@ -1,38 +1,13 @@
|
||||
README_mac.txt for version 8.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of MacVim.
|
||||
See "README.txt" for general information about Vim.
|
||||
See "src/MacVim/README" for an overview of the MacVim specific source code.
|
||||
|
||||
MacVim uses the usual configure/make steps to build the binary but instead of
|
||||
"make install" you just drag the app bundle into the directory you wish to
|
||||
install in (usually `/Applications').
|
||||
|
||||
|
||||
How to build and install
|
||||
How to install MacVim?
|
||||
========================
|
||||
|
||||
Run `./configure` in the `src/` directory with the flags you want (call
|
||||
`./configure --help` to see a list of flags) e.g.:
|
||||
Download MacVim.dmg from latest binary release page https://github.com/macvim-dev/macvim/releases/latest , open the dmg file, and copy MacVim.app to /Applications.
|
||||
|
||||
$ cd src
|
||||
$ ./configure --with-features=huge \
|
||||
--enable-rubyinterp \
|
||||
--enable-pythoninterp \
|
||||
--enable-perlinterp \
|
||||
--enable-cscope
|
||||
|
||||
Now build the project using `make`:
|
||||
Questions?
|
||||
========================
|
||||
|
||||
$ make
|
||||
Please take a look at the home page http://macvim-dev.github.io/macvim/
|
||||
|
||||
The resulting app bundle will reside under `MacVim/build/Release`. To try it
|
||||
out quickly, type:
|
||||
|
||||
$ open MacVim/build/Release/MacVim.app
|
||||
|
||||
To install MacVim, type
|
||||
|
||||
$ open MacVim/build/Release
|
||||
|
||||
and drag the MacVim icon into your `Applications` folder.
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Latest Revision: 2016 Oct 21
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Helper functions {{{
|
||||
function! s:context_echo(message, mode)
|
||||
redraw
|
||||
echo "\r"
|
||||
execute 'echohl' a:mode
|
||||
echomsg '[ConTeXt]' a:message
|
||||
echohl None
|
||||
endf
|
||||
|
||||
function! s:sh()
|
||||
return has('win32') || has('win64') || has('win16') || has('win95')
|
||||
\ ? ['cmd.exe', '/C']
|
||||
\ : ['/bin/sh', '-c']
|
||||
endfunction
|
||||
|
||||
" For backward compatibility
|
||||
if exists('*win_getid')
|
||||
|
||||
function! s:win_getid()
|
||||
return win_getid()
|
||||
endf
|
||||
|
||||
function! s:win_id2win(winid)
|
||||
return win_id2win(a:winid)
|
||||
endf
|
||||
|
||||
else
|
||||
|
||||
function! s:win_getid()
|
||||
return winnr()
|
||||
endf
|
||||
|
||||
function! s:win_id2win(winnr)
|
||||
return a:winnr
|
||||
endf
|
||||
|
||||
endif
|
||||
" }}}
|
||||
|
||||
" ConTeXt jobs {{{
|
||||
if has('job')
|
||||
|
||||
let g:context_jobs = []
|
||||
|
||||
" Print the status of ConTeXt jobs
|
||||
function! context#job_status()
|
||||
let l:jobs = filter(g:context_jobs, 'job_status(v:val) == "run"')
|
||||
let l:n = len(l:jobs)
|
||||
call s:context_echo(
|
||||
\ 'There '.(l:n == 1 ? 'is' : 'are').' '.(l:n == 0 ? 'no' : l:n)
|
||||
\ .' job'.(l:n == 1 ? '' : 's').' running'
|
||||
\ .(l:n == 0 ? '.' : ' (' . join(l:jobs, ', ').').'),
|
||||
\ 'ModeMsg')
|
||||
endfunction
|
||||
|
||||
" Stop all ConTeXt jobs
|
||||
function! context#stop_jobs()
|
||||
let l:jobs = filter(g:context_jobs, 'job_status(v:val) == "run"')
|
||||
for job in l:jobs
|
||||
call job_stop(job)
|
||||
endfor
|
||||
sleep 1
|
||||
let l:tmp = []
|
||||
for job in l:jobs
|
||||
if job_status(job) == "run"
|
||||
call add(l:tmp, job)
|
||||
endif
|
||||
endfor
|
||||
let g:context_jobs = l:tmp
|
||||
if empty(g:context_jobs)
|
||||
call s:context_echo('Done. No jobs running.', 'ModeMsg')
|
||||
else
|
||||
call s:context_echo('There are still some jobs running. Please try again.', 'WarningMsg')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! context#callback(path, job, status)
|
||||
if index(g:context_jobs, a:job) != -1 && job_status(a:job) != 'run' " just in case
|
||||
call remove(g:context_jobs, index(g:context_jobs, a:job))
|
||||
endif
|
||||
call s:callback(a:path, a:job, a:status)
|
||||
endfunction
|
||||
|
||||
function! context#close_cb(channel)
|
||||
call job_status(ch_getjob(a:channel)) " Trigger exit_cb's callback for faster feedback
|
||||
endfunction
|
||||
|
||||
function! s:typeset(path)
|
||||
call add(g:context_jobs,
|
||||
\ job_start(add(s:sh(), context#command() . ' ' . shellescape(fnamemodify(a:path, ":t"))), {
|
||||
\ 'close_cb' : 'context#close_cb',
|
||||
\ 'exit_cb' : function(get(b:, 'context_callback', get(g:, 'context_callback', 'context#callback')),
|
||||
\ [a:path]),
|
||||
\ 'in_io' : 'null'
|
||||
\ }))
|
||||
endfunction
|
||||
|
||||
else " No jobs
|
||||
|
||||
function! context#job_status()
|
||||
call s:context_echo('Not implemented', 'WarningMsg')
|
||||
endfunction!
|
||||
|
||||
function! context#stop_jobs()
|
||||
call s:context_echo('Not implemented', 'WarningMsg')
|
||||
endfunction
|
||||
|
||||
function! context#callback(path, job, status)
|
||||
call s:callback(a:path, a:job, a:status)
|
||||
endfunction
|
||||
|
||||
function! s:typeset(path)
|
||||
execute '!' . context#command() . ' ' . shellescape(fnamemodify(a:path, ":t"))
|
||||
call call(get(b:, 'context_callback', get(g:, 'context_callback', 'context#callback')),
|
||||
\ [a:path, 0, v:shell_error])
|
||||
endfunction
|
||||
|
||||
endif " has('job')
|
||||
|
||||
function! s:callback(path, job, status) abort
|
||||
if a:status < 0 " Assume the job was terminated
|
||||
return
|
||||
endif
|
||||
" Get info about the current window
|
||||
let l:winid = s:win_getid() " Save window id
|
||||
let l:efm = &l:errorformat " Save local errorformat
|
||||
let l:cwd = fnamemodify(getcwd(), ":p") " Save local working directory
|
||||
" Set errorformat to parse ConTeXt errors
|
||||
execute 'setl efm=' . escape(b:context_errorformat, ' ')
|
||||
try " Set cwd to expand error file correctly
|
||||
execute 'lcd' fnameescape(fnamemodify(a:path, ':h'))
|
||||
catch /.*/
|
||||
execute 'setl efm=' . escape(l:efm, ' ')
|
||||
throw v:exception
|
||||
endtry
|
||||
try
|
||||
execute 'cgetfile' fnameescape(fnamemodify(a:path, ':r') . '.log')
|
||||
botright cwindow
|
||||
finally " Restore cwd and errorformat
|
||||
execute s:win_id2win(l:winid) . 'wincmd w'
|
||||
execute 'lcd ' . fnameescape(l:cwd)
|
||||
execute 'setl efm=' . escape(l:efm, ' ')
|
||||
endtry
|
||||
if a:status == 0
|
||||
call s:context_echo('Success!', 'ModeMsg')
|
||||
else
|
||||
call s:context_echo('There are errors. ', 'ErrorMsg')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! context#command()
|
||||
return get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun'))
|
||||
\ . ' --script context --autogenerate --nonstopmode'
|
||||
\ . ' --synctex=' . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0')
|
||||
\ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', ''))
|
||||
endfunction
|
||||
|
||||
" Accepts an optional path (useful for big projects, when the file you are
|
||||
" editing is not the project's root document). If no argument is given, uses
|
||||
" the path of the current buffer.
|
||||
function! context#typeset(...) abort
|
||||
let l:path = fnamemodify(strlen(a:000[0]) > 0 ? a:1 : expand("%"), ":p")
|
||||
let l:cwd = fnamemodify(getcwd(), ":p") " Save local working directory
|
||||
call s:context_echo('Typesetting...', 'ModeMsg')
|
||||
execute 'lcd' fnameescape(fnamemodify(l:path, ":h"))
|
||||
try
|
||||
call s:typeset(l:path)
|
||||
finally " Restore local working directory
|
||||
execute 'lcd ' . fnameescape(l:cwd)
|
||||
endtry
|
||||
endfunction!
|
||||
"}}}
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: sw=2 fdm=marker
|
||||
@@ -0,0 +1,25 @@
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Latest Revision: 2016 Oct 15
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Complete keywords in MetaPost blocks
|
||||
function! contextcomplete#Complete(findstart, base)
|
||||
if a:findstart == 1
|
||||
if len(synstack(line('.'), 1)) > 0 &&
|
||||
\ synIDattr(synstack(line('.'), 1)[0], "name") ==# 'contextMPGraphic'
|
||||
return syntaxcomplete#Complete(a:findstart, a:base)
|
||||
else
|
||||
return -3
|
||||
endif
|
||||
else
|
||||
return syntaxcomplete#Complete(a:findstart, a:base)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: sw=2 fdm=marker
|
||||
@@ -41,9 +41,16 @@ this autocmd might be useful:
|
||||
autocmd SourcePre */colors/blue_sky.vim set background=dark
|
||||
Replace "blue_sky" with the name of the colorscheme.
|
||||
|
||||
In case you want to tweak a colorscheme after it was loaded, check out that
|
||||
In case you want to tweak a colorscheme after it was loaded, check out the
|
||||
ColorScheme autocmd event.
|
||||
|
||||
To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
|
||||
and use `:runtime` to load the original colorscheme:
|
||||
" load the "evening" colorscheme
|
||||
runtime colors/evening.vim
|
||||
" change the color of statements
|
||||
hi Statement ctermfg=Blue guifg=Blue
|
||||
|
||||
To see which highlight group is used where, find the help for
|
||||
"highlight-groups" and "group-name".
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
" Vim compiler file
|
||||
" Compiler: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Last Change: 2016 Oct 21
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
" If makefile exists and we are not asked to ignore it, we use standard make
|
||||
" (do not redefine makeprg)
|
||||
if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) ||
|
||||
\ (!filereadable('Makefile') && !filereadable('makefile'))
|
||||
let current_compiler = 'context'
|
||||
" The following assumes that the current working directory is set to the
|
||||
" directory of the file to be typeset
|
||||
let &l:makeprg = get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun'))
|
||||
\ . ' --script context --autogenerate --nonstopmode --synctex='
|
||||
\ . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0')
|
||||
\ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', ''))
|
||||
\ . ' ' . shellescape(expand('%:p:t'))
|
||||
else
|
||||
let current_compiler = 'make'
|
||||
endif
|
||||
|
||||
let b:context_errorformat = ''
|
||||
\ . '%-Popen source%.%#> %f,'
|
||||
\ . '%-Qclose source%.%#> %f,'
|
||||
\ . "%-Popen source%.%#name '%f',"
|
||||
\ . "%-Qclose source%.%#name '%f',"
|
||||
\ . '%Etex %trror%.%#mp error on line %l in file %f:%.%#,'
|
||||
\ . 'tex %trror%.%#error on line %l in file %f: %m,'
|
||||
\ . '%Elua %trror%.%#error on line %l in file %f:,'
|
||||
\ . '%+Emetapost %#> error: %#,'
|
||||
\ . '! error: %#%m,'
|
||||
\ . '%-C %#,'
|
||||
\ . '%C! %m,'
|
||||
\ . '%Z[ctxlua]%m,'
|
||||
\ . '%+C<*> %.%#,'
|
||||
\ . '%-C%.%#,'
|
||||
\ . '%Z...%m,'
|
||||
\ . '%-Zno-error,'
|
||||
\ . '%-G%.%#' " Skip remaining lines
|
||||
|
||||
execute 'CompilerSet errorformat=' . escape(b:context_errorformat, ' ')
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
@@ -0,0 +1,16 @@
|
||||
" Vim compiler file
|
||||
" Compiler: csslint for CSS
|
||||
" Maintainer: Daniel Moch <daniel@danielmoch.com>
|
||||
" Last Change: 2016 May 21
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "csslint"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=csslint\ --format=compact
|
||||
CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m
|
||||
@@ -0,0 +1,16 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Pylint for Python
|
||||
" Maintainer: Daniel Moch <daniel@danielmoch.com>
|
||||
" Last Change: 2016 May 20
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "pylint"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no
|
||||
CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%#
|
||||
+16
-6
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Nov 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -369,7 +369,7 @@ Leave out the fourth argument if no response is to be sent:
|
||||
==============================================================================
|
||||
6. Using a RAW or NL channel *channel-raw*
|
||||
|
||||
If mode is RAW or NL then a message can be send like this: >
|
||||
If mode is RAW or NL then a message can be sent like this: >
|
||||
let response = ch_evalraw(channel, {string})
|
||||
|
||||
The {string} is sent as-is. The response will be what can be read from the
|
||||
@@ -418,7 +418,11 @@ This uses the channel timeout. To read without a timeout, just get any
|
||||
message that is available: >
|
||||
let output = ch_read(channel, {'timeout': 0})
|
||||
When no message was available then the result is v:none for a JSON or JS mode
|
||||
channels, an empty string for a RAW or NL channel.
|
||||
channels, an empty string for a RAW or NL channel. You can use |ch_canread()|
|
||||
to check if there is something to read.
|
||||
|
||||
Note that when there is no callback message are dropped. To avoid that add a
|
||||
close callback to the channel.
|
||||
|
||||
To read all output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel)
|
||||
@@ -470,6 +474,11 @@ 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.
|
||||
|
||||
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",
|
||||
@@ -598,9 +607,10 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
*job-exit_cb*
|
||||
"exit_cb": handler Callback for when the job ends. The arguments are the
|
||||
job and the exit status.
|
||||
Vim checks about every 10 seconds for jobs that ended.
|
||||
The check also be triggered by calling |job_status()|,
|
||||
which may then invoke the exit_cb handler.
|
||||
Vim checks up to 10 times per second for jobs that
|
||||
ended. The check can also be triggered by calling
|
||||
|job_status()|, which may then invoke the exit_cb
|
||||
handler.
|
||||
Note that data can be buffered, callbacks may still be
|
||||
called after the process ends.
|
||||
*job-timeout*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*digraph.txt* For Vim version 8.0. Last change: 2014 Jun 19
|
||||
*digraph.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,7 +147,7 @@ a standard meaning:
|
||||
Two 2 Hook
|
||||
Nine 9 Horn
|
||||
|
||||
Equals = Cyrillic (= used as second char)
|
||||
Equals = Cyrillic (= used as second char)
|
||||
Asterisk * Greek
|
||||
Percent sign % Greek/Cyrillic special
|
||||
Plus + smalls: Arabic, capitals: Hebrew
|
||||
@@ -926,6 +926,7 @@ char digraph hex dec official name ~
|
||||
† /- 2020 8224 DAGGER
|
||||
‡ /= 2021 8225 DOUBLE DAGGER
|
||||
‥ .. 2025 8229 TWO DOT LEADER
|
||||
… ,. 2026 8230 HORIZONTAL ELLIPSIS
|
||||
‰ %0 2030 8240 PER MILLE SIGN
|
||||
′ 1' 2032 8242 PRIME
|
||||
″ 2' 2033 8243 DOUBLE PRIME
|
||||
|
||||
+27
-12
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2009,6 +2009,7 @@ byteidxcomp({expr}, {nr}) Number byte index of {nr}'th char in {expr}
|
||||
call({func}, {arglist} [, {dict}])
|
||||
any call {func} with arguments {arglist}
|
||||
ceil({expr}) Float round {expr} up
|
||||
ch_canread({handle}) Number check if there is something to read
|
||||
ch_close({handle}) none close {handle}
|
||||
ch_close_in({handle}) none close in part of {handle}
|
||||
ch_evalexpr({handle}, {expr} [, {options}])
|
||||
@@ -2523,7 +2524,7 @@ assert_exception({error} [, {msg}]) *assert_exception()*
|
||||
assert_fails({cmd} [, {error}]) *assert_fails()*
|
||||
Run {cmd} and add an error message to |v:errors| if it does
|
||||
NOT produce an error.
|
||||
When {error} is given it must match |v:errmsg|.
|
||||
When {error} is given it must match in |v:errmsg|.
|
||||
|
||||
assert_false({actual} [, {msg}]) *assert_false()*
|
||||
When {actual} is not false an error message is added to
|
||||
@@ -2980,16 +2981,28 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
don't fit, a vertical layout is used anyway. For some systems
|
||||
the horizontal layout is always used.
|
||||
|
||||
ch_canread({handle}) *ch_canread()*
|
||||
Return non-zero when there is something to read from {handle}.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
This is useful to read from a channel at a convenient time,
|
||||
e.g. from a timer.
|
||||
|
||||
Note that messages are dropped when the channel does not have
|
||||
a callback. Add a close callback to avoid that.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
ch_close({handle}) *ch_close()*
|
||||
Close {handle}. See |channel-close|.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
A close callback is not invoked.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
ch_close_in({handle}) *ch_close_in()*
|
||||
Close the "in" part of {handle}. See |channel-close-in|.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
A close callback is not invoked.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
@@ -2998,7 +3011,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
Send {expr} over {handle}. The {expr} is encoded
|
||||
according to the type of channel. The function cannot be used
|
||||
with a raw channel. See |channel-use|.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
*E917*
|
||||
{options} must be a Dictionary. It must not have a "callback"
|
||||
entry. It can have a "timeout" entry to specify the timeout
|
||||
@@ -3012,7 +3025,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
|
||||
ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()*
|
||||
Send {string} over {handle}.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
Works like |ch_evalexpr()|, but does not encode the request or
|
||||
decode the response. The caller is responsible for the
|
||||
@@ -3025,7 +3038,7 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()*
|
||||
|
||||
ch_getbufnr({handle}, {what}) *ch_getbufnr()*
|
||||
Get the buffer number that {handle} is using for {what}.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
{what} can be "err" for stderr, "out" for stdout or empty for
|
||||
socket output.
|
||||
Returns -1 when there is no buffer.
|
||||
@@ -3099,7 +3112,7 @@ ch_open({address} [, {options}]) *ch_open()*
|
||||
|
||||
ch_read({handle} [, {options}]) *ch_read()*
|
||||
Read from {handle} and return the received message.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
See |channel-more|.
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
@@ -3113,7 +3126,7 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
|
||||
according to the type of channel. The function cannot be used
|
||||
with a raw channel.
|
||||
See |channel-use|. *E912*
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
@@ -3134,7 +3147,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()*
|
||||
"timeout" default read timeout in msec
|
||||
"mode" mode for the whole channel
|
||||
See |ch_open()| for more explanation.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
Note that changing the mode may cause queued messages to be
|
||||
lost.
|
||||
@@ -3148,7 +3161,7 @@ ch_status({handle} [, {options}]) *ch_status()*
|
||||
"open" channel can be used
|
||||
"buffered" channel can be read, not written to
|
||||
"closed" channel can not be used
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
"buffered" is used when the channel was closed but there is
|
||||
still data that can be obtained with |ch_read()|.
|
||||
|
||||
@@ -8214,7 +8227,7 @@ writefile({list}, {fname} [, {flags}])
|
||||
end does cause the last line in the file to end in a NL.
|
||||
|
||||
When {flags} contains "a" then append mode is used, lines are
|
||||
append to the file: >
|
||||
appended to the file: >
|
||||
:call writefile(["foo"], "event.log", "a")
|
||||
:call writefile(["bar"], "event.log", "a")
|
||||
>
|
||||
@@ -8420,6 +8433,8 @@ timers Compiled with |timer_start()| support.
|
||||
title Compiled with window title support |'title'|.
|
||||
toolbar Compiled with support for |gui-toolbar|.
|
||||
transparency Compiled with 'transparency' support.
|
||||
ttyin input is a terminal (tty)
|
||||
ttyout output is a terminal (tty)
|
||||
unix Unix version of Vim.
|
||||
user_commands User-defined commands.
|
||||
vertsplit Compiled with vertically split windows |:vsplit|.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.0. Last change: 2016 Aug 26
|
||||
*map.txt* For Vim version 8.0. Last change: 2016 Oct 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -5921,6 +5921,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DYNAMIC_PYTHON_DLL, which was specified at compile time.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonhome'*
|
||||
'pythonhome' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python/dyn|
|
||||
feature}
|
||||
Note: EXPERIMENTAL. It may be changed or removed in the future.
|
||||
Specifies the name of the Python 2.x home directory. When 'pythonhome'
|
||||
and the PYTHONHOME environment variable are not set, PYTHON_HOME,
|
||||
which was specified at compile time, will be used for the Python 2.x
|
||||
home directory.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreedll'*
|
||||
@@ -5933,6 +5948,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DYNAMIC_PYTHON3_DLL, which was specified at compile time.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreehome'*
|
||||
'pythonthreehome' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python3/dyn|
|
||||
feature}
|
||||
Note: EXPERIMENTAL. It may be changed or removed in the future.
|
||||
Specifies the name of the Python 3 home directory. When
|
||||
'pythonthreehome' and the PYTHONHOME environment variable are not set,
|
||||
PYTHON3_HOME, which was specified at compile time, will be used for
|
||||
the Python 3 home directory.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'quoteescape'* *'qe'*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_gzip.txt* For Vim version 8.0. Last change: 2012 Jul 19
|
||||
*pi_gzip.txt* For Vim version 8.0. Last change: 2016 Nov 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -27,6 +27,8 @@ with these extensions:
|
||||
*.bz2 bzip2
|
||||
*.lzma lzma
|
||||
*.xz xz
|
||||
*.lz lzip
|
||||
*.zst zstd
|
||||
|
||||
That's actually the only thing you need to know. There are no options.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 8.0. Last change: 2016 Jul 17
|
||||
*quickfix.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -878,7 +878,7 @@ need to write down a "todo" list.
|
||||
|
||||
|
||||
The Vim plugins in the "compiler" directory will set options to use the
|
||||
selected compiler. For ":compiler" local options are set, for ":compiler!"
|
||||
selected compiler. For `:compiler` local options are set, for `:compiler!`
|
||||
global options.
|
||||
*current_compiler*
|
||||
To support older Vim versions, the plugins always use "current_compiler" and
|
||||
|
||||
@@ -840,7 +840,9 @@ Short explanation of each option: *option-list*
|
||||
'prompt' 'prompt' enable prompt in Ex mode
|
||||
'pumheight' 'ph' maximum height of the popup menu
|
||||
'pythondll' name of the Python 2 dynamic library
|
||||
'pythonhome' name of the Python 2 home directory
|
||||
'pythonthreedll' name of the Python 3 dynamic library
|
||||
'pythonthreehome' name of the Python 3 home directory
|
||||
'quoteescape' 'qe' escape characters used in a string
|
||||
'readonly' 'ro' disallow writing the buffer
|
||||
'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*scroll.txt* For Vim version 8.0. Last change: 2006 Aug 27
|
||||
*scroll.txt* For Vim version 8.0. Last change: 2016 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -108,7 +108,8 @@ z^ Without [count]: Redraw with the line just above the
|
||||
3. Scrolling relative to cursor *scroll-cursor*
|
||||
|
||||
The following commands reposition the edit window (the part of the buffer that
|
||||
you see) while keeping the cursor on the same line:
|
||||
you see) while keeping the cursor on the same line. Note that the 'scrolloff'
|
||||
option may cause context lines to show above and below the cursor.
|
||||
|
||||
*z<CR>*
|
||||
z<CR> Redraw, line [count] at top of window (default
|
||||
|
||||
@@ -421,6 +421,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
not connected to a terminal. This will avoid the warning and
|
||||
the two second delay that would happen. {not in Vi}
|
||||
|
||||
*--ttyfail*
|
||||
--ttyfail When the stdin or stdout is not a terminal (tty) then exit
|
||||
right away.
|
||||
|
||||
*-d*
|
||||
-d Start in diff mode, like |vimdiff|.
|
||||
{not in Vi} {not available when compiled without the |+diff|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Oct 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4597,7 +4597,14 @@ in their own color.
|
||||
|
||||
Doesn't work recursively, thus you can't use
|
||||
":colorscheme" in a color scheme script.
|
||||
After the color scheme has been loaded the
|
||||
|
||||
To customize a colorscheme use another name, e.g.
|
||||
"~/.vim/colors/mine.vim", and use `:runtime` to load
|
||||
the original colorscheme: >
|
||||
runtime colors/evening.vim
|
||||
hi Statement ctermfg=Blue guifg=Blue
|
||||
|
||||
< After the color scheme has been loaded the
|
||||
|ColorScheme| autocommand event is triggered.
|
||||
For info about writing a colorscheme file: >
|
||||
:edit $VIMRUNTIME/colors/README.txt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 8.0. Last change: 2016 Sep 09
|
||||
*tabpage.txt* For Vim version 8.0. Last change: 2016 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -58,6 +58,8 @@ clicking right of the labels.
|
||||
In the GUI tab pages line you can use the right mouse button to open menu.
|
||||
|tabline-menu|.
|
||||
|
||||
For the related autocommands see |tabnew-autocmd|.
|
||||
|
||||
:[count]tabe[dit] *:tabe* *:tabedit* *:tabnew*
|
||||
:[count]tabnew
|
||||
Open a new tab page with an empty window, after the current
|
||||
@@ -287,6 +289,7 @@ Variables local to a tab page start with "t:". |tabpage-variable|
|
||||
|
||||
Currently there is only one option local to a tab page: 'cmdheight'.
|
||||
|
||||
*tabnew-autocmd*
|
||||
The TabLeave and TabEnter autocommand events can be used to do something when
|
||||
switching from one tab page to another. The exact order depends on what you
|
||||
are doing. When creating a new tab page this works as if you create a new
|
||||
|
||||
@@ -8695,6 +8695,7 @@ tab-page-commands tabpage.txt /*tab-page-commands*
|
||||
tab-page-intro tabpage.txt /*tab-page-intro*
|
||||
tab-page-other tabpage.txt /*tab-page-other*
|
||||
tabline-menu tabpage.txt /*tabline-menu*
|
||||
tabnew-autocmd tabpage.txt /*tabnew-autocmd*
|
||||
tabpage tabpage.txt /*tabpage*
|
||||
tabpage-variable eval.txt /*tabpage-variable*
|
||||
tabpage.txt tabpage.txt /*tabpage.txt*
|
||||
|
||||
+88
-12
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,13 +28,29 @@ See |develop.txt| for development plans. You can vote for which items should
|
||||
be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
|
||||
Issues can also be entered online: https://github.com/vim/vim/issues
|
||||
Updates will be forwarded to the vim_dev maillist. Issues entered there will
|
||||
not be repeated below, unless there is extra information.
|
||||
Only use this for bug reports, not for questions! Those belong on the
|
||||
maillist. Updates will be forwarded to the vim_dev maillist. Issues entered
|
||||
there will not be repeated below, unless there is extra information.
|
||||
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Test_help_complete sometimes fails on MS-Windows:
|
||||
function RunTheTest[9]..Test_help_complete line 22: Expected ['h test-char@ab',
|
||||
'h test-char@en', 'h test-col@ab', 'h test-col@en'] but got ['h test-char@en', '
|
||||
h test-char@en\t', 'h test-col@ab', 'h test-col@en']
|
||||
Appears to be related to calling feedkeys() with exactly 8 characters.
|
||||
|
||||
Patch for GTK3: Kazunobu Kuriyama, 14 Nov.
|
||||
|
||||
Patch for fix breakindent bug (Christian, Nov 15)
|
||||
|
||||
+channel:
|
||||
- Skip checking if job ended if there aren't any. (ichizok, 2016 Nov 7, #1196)
|
||||
- problem with channel callback getting job, while the job was already
|
||||
deleted. #1242. Fix in #1245 (ichizok), but is that correct?
|
||||
Perhaps just replace job_still_alive() with job_still_useful()?
|
||||
That's not sufficient.
|
||||
- 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.
|
||||
@@ -96,17 +112,61 @@ Regexp problems:
|
||||
- The pattern "\1" with the old engine gives E65, with the new engine it
|
||||
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
|
||||
had_endbrace[] is set but not initialized or used.
|
||||
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
|
||||
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
|
||||
|
||||
Patch to support nested namespace syntax. (Pauli, 2016 Oct 30, #1214)
|
||||
|
||||
Patch to fix popup menu positioning. (Hirohito Higashi, 2016 Nov 7, #1241)
|
||||
|
||||
Patch to make help tag jumps keep language. (Tatsuki, #1249)
|
||||
Test by Hirohito Higashi.
|
||||
|
||||
Make html indent file use javascript indent, now that it's not just cindent.
|
||||
#1220
|
||||
|
||||
Patch to use buffer id for system() and systemlist() (LemonBoy, 2016 Nov 7,
|
||||
#1240)
|
||||
|
||||
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
What if there is an invalid character?
|
||||
|
||||
Bug: ":earlier 100d" doesn't work after using undo file.
|
||||
(Pavol Juhas, 2016 Nov 15, #1254)
|
||||
Fix by Christian, but lacks a test.
|
||||
|
||||
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
|
||||
Make dict_add give a duplicate key error.
|
||||
|
||||
Should json_encode()/json_decode() restrict recursiveness?
|
||||
Or avoid recursiveness.
|
||||
|
||||
Allow using json with empty key? Dict already has it.
|
||||
|
||||
Json string with trailing \u should be an error. (Lcd)
|
||||
|
||||
Patch to reset ex_exitvalue after catch. (Christian Brabandt, 2016 Oct 23)
|
||||
|
||||
Patch to deal with changed configure events in GTK 3. (Jan Alexander Steffens,
|
||||
2016 Oct 23 #1193)
|
||||
Remarks from nuko8, 2016 Nov 2.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
|
||||
Patch for better explanation of 'compatible' side effects.
|
||||
https://github.com/vim/vim/pull/1161/files
|
||||
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
Patch to fix escaping of job arguments. (Yasuhiro Matsumoto, 2016 Oct 5)
|
||||
Still not right.
|
||||
Update Oct 14: https://gist.github.com/mattn/d47e7d3bfe5ade4be86062b565a4bfca
|
||||
|
||||
Once .exe with updated installer is available: Add remark to download page
|
||||
about /S and /D options (Ken Takata, 2016 Apr 13)
|
||||
@@ -115,18 +175,26 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
#1053) With patch, does it work?
|
||||
|
||||
Patch to make finding duplicate tags much faster, using a hashtab. (James
|
||||
McCoy, 2016 Sept 14, #1046) Should work now. Updated Nov 12.
|
||||
>
|
||||
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?
|
||||
|
||||
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
|
||||
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
|
||||
|
||||
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)
|
||||
|
||||
Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
|
||||
@@ -149,6 +217,12 @@ Add an argument to choose binary or non-binary (like readfile()), when omitted
|
||||
use the current behavior.
|
||||
Include the test.
|
||||
|
||||
When 'keywordprg' starts with ":" the argument is still escaped as a shell
|
||||
command argument. (Romain Lafourcade, 2016 Oct 16, #1175)
|
||||
|
||||
Patch to support CamelCase for spell checking: See a lower-to-upper case
|
||||
change as a word boundary. (btucker-MPCData, 2016 Nov 6, #1235)
|
||||
|
||||
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.
|
||||
@@ -162,6 +236,8 @@ 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 to order results from taglist(). (Duncan McDougall, 2016 Oct 25)
|
||||
|
||||
Patch for :pyx, run python commands depending on the supported version.
|
||||
(Marc Weber, update from Ken Takata, 2016 Sep 19)
|
||||
|
||||
@@ -179,6 +255,9 @@ Also with latest version.
|
||||
|
||||
Cannot delete a file with square brackets with delete(). (#696)
|
||||
|
||||
Patch to add ":syn foldlevel" to use fold level further down the line.
|
||||
(Brad King, 2016 Oct 19)
|
||||
|
||||
Completion for input() does not expand environment variables. (chdiza, 2016
|
||||
Jul 25, #948)
|
||||
|
||||
@@ -218,9 +297,6 @@ Patch to improve map documentation. Issue #799.
|
||||
|
||||
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
|
||||
@@ -256,9 +332,6 @@ Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
|
||||
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 14, #1046) Should work now.
|
||||
>
|
||||
Patch to improve indenting for C++ constructor with initializer list.
|
||||
(Hirohito Higashi, 2016 Mar 31)
|
||||
|
||||
@@ -331,6 +404,9 @@ 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.
|
||||
|
||||
Feature request: add the "al" text object, to manipulate a screen line.
|
||||
Especially useful when using 'linebreak'
|
||||
|
||||
Access to uninitialized memory in match_backref() regexp_nda.c:4882
|
||||
(Dominique Pelle, 2015 Nov 6)
|
||||
|
||||
@@ -3787,7 +3863,7 @@ Code size:
|
||||
left out.
|
||||
8 When compiled with a GUI-only version, the termcap entries for terminals
|
||||
can be removed.
|
||||
8 Can the check for libelf in configure.in be removed?
|
||||
8 Can the check for libelf in configure.ac be removed?
|
||||
|
||||
|
||||
Messages:
|
||||
@@ -5509,7 +5585,7 @@ From vile:
|
||||
Far future and "big" extensions:
|
||||
- Instead of using a Makefile and autoconf, use a simple shell script to
|
||||
find the C compiler and do everything with C code. Translate something
|
||||
like an Aap recipe and configure.in to C. Avoids depending on Python,
|
||||
like an Aap recipe and configure.ac to C. Avoids depending on Python,
|
||||
thus will work everywhere. With batch file to find the C compiler it
|
||||
would also work on MS-Windows.
|
||||
- Make it easy to setup Vim for groups of users: novice vi users, novice
|
||||
|
||||
+417
-1
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Sep 14
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Nov 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -14507,4 +14507,420 @@ Problem: Test runner misses a comma.
|
||||
Solution: Add the comma.
|
||||
Files: src/testdir/runtest.vim
|
||||
|
||||
Patch 8.0.0001
|
||||
Problem: Intro screen still mentions version7. (Paul)
|
||||
Solution: Change it to version8.
|
||||
Files: src/version.c
|
||||
|
||||
Patch 8.0.0002
|
||||
Problem: The netrw plugin does not work.
|
||||
Solution: Make it accept version 8.0.
|
||||
Files: runtime/autoload/netrw.vim
|
||||
|
||||
Patch 8.0.0003
|
||||
Problem: getwinvar() returns wrong Value of boolean and number options,
|
||||
especially non big endian systems. (James McCoy)
|
||||
Solution: Cast the pointer to long or int. (closes #1060)
|
||||
Files: src/option.c, src/testdir/test_bufwintabinfo.vim
|
||||
|
||||
Patch 8.0.0004
|
||||
Problem: A string argument for function() that is not a function name
|
||||
results in an error message with NULL. (Christian Brabandt)
|
||||
Solution: Use the argument for the error message.
|
||||
Files: src/evalfunc.c, src/testdir/test_expr.vim
|
||||
|
||||
Patch 8.0.0005
|
||||
Problem: Netbeans test fails with Python 3. (Jonathonf)
|
||||
Solution: Encode the string before sending it. (closes #1070)
|
||||
Files: src/testdir/test_netbeans.py
|
||||
|
||||
Patch 8.0.0006
|
||||
Problem: ":lb" is interpreted as ":lbottom" while the documentation says it
|
||||
means ":lbuffer".
|
||||
Solution: Adjust the order of the commands. (haya14busa, closes #1093)
|
||||
Files: src/ex_cmds.h
|
||||
|
||||
Patch 8.0.0007
|
||||
Problem: Vim 7.4 is still mentioned in a few places.
|
||||
Solution: Update to Vim 8. (Uncle Bill, closes #1094)
|
||||
Files: src/INSTALLpc.txt, src/vimtutor, uninstal.txt
|
||||
|
||||
Patch 8.0.0008
|
||||
Problem: Popup complete test is disabled.
|
||||
Solution: Enable the test and change the assert. (Hirohito Higashi)
|
||||
Files: src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0009
|
||||
Problem: Unnecessary workaround for AppVeyor.
|
||||
Solution: Revert patch 7.4.990. (Christian Brabandt)
|
||||
Files: appveyor.yml
|
||||
|
||||
Patch 8.0.0010
|
||||
Problem: Crash when editing file that starts with crypt header. (igor2x)
|
||||
Solution: Check for length of text. (Christian Brabandt) Add a test.
|
||||
Files: src/fileio.c, src/testdir/test_crypt.vim, src/Makefile,
|
||||
src/testdir/Make_all.mak
|
||||
|
||||
Patch 8.0.0011
|
||||
Problem: On OSX Test_pipe_through_sort_all() sometimes fails.
|
||||
Solution: Add the test to the list of flaky tests.
|
||||
Files: src/testdir/runtest.vim
|
||||
|
||||
Patch 8.0.0012
|
||||
Problem: Typos in comments.
|
||||
Solution: Change "its" to "it's". (Matthew Brener, closes #1088)
|
||||
Files: src/evalfunc.c, src/main.aap, src/nbdebug.c, src/netbeans.c,
|
||||
src/quickfix.c, src/workshop.c, src/wsdebug.c
|
||||
|
||||
Patch 8.0.0013 (after 8.0.0011)
|
||||
Problem: Missing comma in list.
|
||||
Solution: Add the comma.
|
||||
Files: src/testdir/runtest.vim
|
||||
|
||||
Patch 8.0.0014
|
||||
Problem: Crypt tests are old style.
|
||||
Solution: Convert to new style.
|
||||
Files: src/testdir/test71.in, src/testdir/test71.ok,
|
||||
src/testdir/test71a.in, src/testdir/test_crypt.vim, src/Makefile,
|
||||
src/testdir/Make_all.mak
|
||||
|
||||
Patch 8.0.0015
|
||||
Problem: Can't tell which part of a channel has "buffered" status.
|
||||
Solution: Add an optional argument to ch_status(). Let ch_info() also
|
||||
return "buffered" for out_status and err_status.
|
||||
Files: src/evalfunc.c, src/channel.c, src/proto/channel.pro,
|
||||
src/testdir/test_channel.vim, runtime/doc/eval.txt
|
||||
|
||||
Patch 8.0.0016 (after 8.0.0015)
|
||||
Problem: Build fails.
|
||||
Solution: Include missing change.
|
||||
Files: src/eval.c
|
||||
|
||||
Patch 8.0.0017
|
||||
Problem: Cannot get the number of the current quickfix or location list.
|
||||
Solution: Use the current list if "nr" in "what" is zero. (Yegappan
|
||||
Lakshmanan) Remove debug command from test.
|
||||
Files: src/quickfix.c, src/testdir/test_quickfix.vim,
|
||||
runtime/doc/eval.txt
|
||||
|
||||
Patch 8.0.0018
|
||||
Problem: When using ":sleep" channel input is not handled.
|
||||
Solution: When there is a channel check for input also when not in raw mode.
|
||||
Check every 100 msec.
|
||||
Files: src/channel.c, src/proto/channel.pro, src/ui.c, src/proto/ui.pro,
|
||||
src/ex_docmd.c, src/os_amiga.c, src/proto/os_amiga.pro,
|
||||
src/os_unix.c, src/proto/os_unix.pro, src/os_win32.c,
|
||||
src/proto/os_win32.pro
|
||||
|
||||
Patch 8.0.0019
|
||||
Problem: Test_command_count is old style.
|
||||
Solution: Turn it into a new style test. (Naruhiko Nishino)
|
||||
Use more assert functions.
|
||||
Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/test_alot.vim,
|
||||
src/testdir/test_autocmd.vim, src/testdir/test_command_count.in,
|
||||
src/testdir/test_command_count.ok,
|
||||
src/testdir/test_command_count.vim
|
||||
|
||||
Patch 8.0.0020
|
||||
Problem: The regexp engines are not reentrant.
|
||||
Solution: Add regexec_T and save/restore the state when needed.
|
||||
Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test_expr.vim,
|
||||
runtime/doc/eval.txt, runtime/doc/change.txt
|
||||
|
||||
Patch 8.0.0021
|
||||
Problem: In the GUI when redrawing the cursor it may be on the second half
|
||||
of a double byte character.
|
||||
Solution: Correct the cursor column. (Yasuhiro Matsumoto)
|
||||
Files: src/screen.c
|
||||
|
||||
Patch 8.0.0022
|
||||
Problem: If a channel in NL mode is missing the NL at the end the remaining
|
||||
characters are dropped.
|
||||
Solution: When the channel is closed use the remaining text. (Ozaki Kiichi)
|
||||
Files: src/channel.c, src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0023
|
||||
Problem: "gd" and "gD" may find a match in a comment or string.
|
||||
Solution: Ignore matches in comments and strings. (Anton Lindqvist)
|
||||
Files: src/normal.c, src/testdir/test_goto.vim
|
||||
|
||||
Patch 8.0.0024
|
||||
Problem: When the netbeans channel closes, "DETACH" is put in the output
|
||||
part. (Ozaki Kiichi)
|
||||
Solution: Write "DETACH" in the socket part.
|
||||
Files: src/channel.c, src/testdir/test_netbeans.vim
|
||||
|
||||
Patch 8.0.0025
|
||||
Problem: Inconsistent use of spaces vs tabs in gd test.
|
||||
Solution: Use tabs. (Anton Lindqvist)
|
||||
Files: src/testdir/test_goto.vim
|
||||
|
||||
Patch 8.0.0026
|
||||
Problem: Error format with %W, %C and %Z does not work. (Gerd Wachsmuth)
|
||||
Solution: Skip code when qf_multiignore is set. (Lcd)
|
||||
Files: src/quickfix.c, src/testdir/test_quickfix.vim
|
||||
|
||||
Patch 8.0.0027
|
||||
Problem: A channel is closed when reading on stderr or stdout fails, but
|
||||
there may still be something to read on another part.
|
||||
Solution: Turn ch_to_be_closed into a bitfield. (Ozaki Kiichi)
|
||||
Files: src/channel.c, src/eval.c, src/structs.h, src/proto/channel.pro,
|
||||
src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0028
|
||||
Problem: Superfluous semicolons.
|
||||
Solution: Remove them. (Ozaki Kiichi)
|
||||
Files: src/ex_cmds2.c
|
||||
|
||||
Patch 8.0.0029
|
||||
Problem: Code for MS-Windows is complicated because of the exceptions for
|
||||
old systems.
|
||||
Solution: Drop support for MS-Windows older than Windows XP. (Ken Takata)
|
||||
Files: runtime/doc/gui_w32.txt, runtime/doc/os_win32.txt,
|
||||
runtime/doc/todo.txt, src/GvimExt/Makefile, src/Make_mvc.mak,
|
||||
src/evalfunc.c, src/ex_cmds.c, src/ex_docmd.c, src/gui_w32.c,
|
||||
src/if_cscope.c, src/misc1.c, src/misc2.c, src/option.c,
|
||||
src/os_mswin.c, src/os_win32.c, src/os_win32.h,
|
||||
src/proto/os_mswin.pro, src/proto/os_win32.pro, src/version.c
|
||||
|
||||
Patch 8.0.0030
|
||||
Problem: Mouse mode is not automatically detected for tmux.
|
||||
Solution: Check for 'term' to be "tmux". (Michael Henry)
|
||||
Files: src/os_unix.c
|
||||
|
||||
Patch 8.0.0031
|
||||
Problem: After ":bwipeout" 'fileformat' is not set to the right default.
|
||||
Solution: Get the default from 'fileformats'. (Mike Williams)
|
||||
Files: src/option.c, src/Makefile, src/testdir/test_fileformat.vim,
|
||||
src/testdir/test_alot.vim
|
||||
|
||||
Patch 8.0.0032
|
||||
Problem: Tests may change the input file when something goes wrong.
|
||||
Solution: Avoid writing the input file.
|
||||
Files: src/testdir/test51.in, src/testdir/test67.in,
|
||||
src/testdir/test97.in, src/testdir/test_tabpage.vim
|
||||
|
||||
Patch 8.0.0033
|
||||
Problem: Cannot use overlapping positions with matchaddpos().
|
||||
Solution: Check end of match. (Ozaki Kiichi) Add a test (Hirohito Higashi)
|
||||
Files: src/screen.c, src/testdir/test_match.vim
|
||||
|
||||
Patch 8.0.0034
|
||||
Problem: No completion for ":messages".
|
||||
Solution: Complete "clear" argument. (Hirohito Higashi)
|
||||
Files: src/ex_docmd.c, src/ex_getln.c, src/proto/ex_docmd.pro,
|
||||
src/testdir/test_cmdline.vim, src/vim.h,
|
||||
runtime/doc/eval.txt, runtime/doc/map.txt
|
||||
|
||||
Patch 8.0.0035 (after 7.4.2013)
|
||||
Problem: Order of matches for 'omnifunc' is messed up. (Danny Su)
|
||||
Solution: Do not set compl_curr_match when called from complete_check().
|
||||
(closes #1168)
|
||||
Files: src/edit.c, src/evalfunc.c, src/proto/edit.pro, src/search.c,
|
||||
src/spell.c, src/tag.c, src/testdir/test76.in,
|
||||
src/testdir/test76.ok, src/testdir/test_popup.vim, src/Makefile,
|
||||
src/testdir/Make_all.mak
|
||||
|
||||
Patch 8.0.0036
|
||||
Problem: Detecting that a job has finished may take a while.
|
||||
Solution: Check for a finished job more often (Ozaki Kiichi)
|
||||
Files: src/channel.c, src/os_unix.c, src/os_win32.c,
|
||||
src/proto/os_unix.pro, src/proto/os_win32.pro,
|
||||
src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0037
|
||||
Problem: Get E924 when switching tabs. ()
|
||||
Solution: Use win_valid_any_tab() instead of win_valid(). (Martin Vuille,
|
||||
closes #1167, closes #1171)
|
||||
Files: src/quickfix.c, src/testdir/test_quickfix.vim
|
||||
|
||||
Patch 8.0.0038
|
||||
Problem: OPEN_CHR_FILES not defined for FreeBSD using Debian userland
|
||||
files.
|
||||
Solution: Check for __FreeBSD_kernel__. (James McCoy, closes #1166)
|
||||
Files: src/vim.h
|
||||
|
||||
Patch 8.0.0039
|
||||
Problem: When Vim 8 reads an old viminfo and exits, the next time marks are
|
||||
not read from viminfo. (Ned Batchelder)
|
||||
Solution: Set a mark when it wasn't set before, even when the timestamp is
|
||||
zero. (closes #1170)
|
||||
Files: src/mark.c, src/testdir/test_viminfo.vim
|
||||
|
||||
Patch 8.0.0040 (after 8.0.0033)
|
||||
Problem: Whole line highlighting with matchaddpos() does not work.
|
||||
Solution: Check for zero length. (Hirohito Higashi)
|
||||
Files: src/screen.c, src/testdir/test_match.vim
|
||||
|
||||
Patch 8.0.0041
|
||||
Problem: When using Insert mode completion but not actually inserting
|
||||
anything an undo item is still created. (Tommy Allen)
|
||||
Solution: Do not call stop_arrow() when not inserting anything.
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0042 (after 8.0.0041)
|
||||
Problem: When using Insert mode completion with 'completeopt' containing
|
||||
"noinsert" change is not saved for undo. (Tommy Allen)
|
||||
Solution: Call stop_arrow() before inserting for pressing Enter.
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0043 (after 8.0.0041)
|
||||
Problem: When using Insert mode completion with 'completeopt' containing
|
||||
"noinsert" with CTRL-N the change is not saved for undo. (Tommy
|
||||
Allen)
|
||||
Solution: Call stop_arrow() before inserting for any key.
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0044
|
||||
Problem: In diff mode the cursor may end up below the last line, resulting
|
||||
in an ml_get error.
|
||||
Solution: Check the line to be valid.
|
||||
Files: src/move.c, src/diff.c, src/proto/diff.pro,
|
||||
src/testdir/test_diffmode.vim
|
||||
|
||||
Patch 8.0.0045
|
||||
Problem: Calling job_stop() right after job_start() does not work.
|
||||
Solution: Block signals while fork is still busy. (Ozaki Kiichi, closes
|
||||
#1155)
|
||||
Files: src/auto/configure, src/config.h.in, src/configure.in,
|
||||
src/os_unix.c, src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0046
|
||||
Problem: Using NUL instead of NULL.
|
||||
Solution: Change to NULL. (Dominique Pelle)
|
||||
Files: src/ex_cmds.c, src/json.c
|
||||
|
||||
Patch 8.0.0047
|
||||
Problem: Crash when using the preview window from an unnamed buffer.
|
||||
(lifepillar)
|
||||
Solution: Do not clear the wrong buffer. (closes #1200)
|
||||
Files: src/popupmnu.c
|
||||
|
||||
Patch 8.0.0048
|
||||
Problem: On Windows job_stop() stops cmd.exe, not the processes it runs.
|
||||
(Linwei)
|
||||
Solution: Iterate over all processes and terminate the one where the parent
|
||||
is the job process. (Yasuhiro Matsumoto, closes #1184)
|
||||
Files: src/os_win32.c, src/structs.h
|
||||
|
||||
Patch 8.0.0049
|
||||
Problem: When a match ends in part of concealed text highlighting, it might
|
||||
mess up concealing by resetting prev_syntax_id.
|
||||
Solution: Do not reset prev_syntax_id and add a test to verify. (Christian
|
||||
Brabandt, closes #1092)
|
||||
Files: src/screen.c, src/testdir/test_matchadd_conceal.vim
|
||||
|
||||
Patch 8.0.0050
|
||||
Problem: An exiting job is detected with a large latency.
|
||||
Solution: Check for pending job more often. (Ozaki Kiichi) Change the
|
||||
double loop in mch_inchar() into one.
|
||||
Files: src/channel.c, src/os_unix.c, src/testdir/shared.vim,
|
||||
src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0051 (after 8.0.0048)
|
||||
Problem: New code for job_stop() breaks channel test on AppVeyor.
|
||||
Solution: Revert the change.
|
||||
Files: src/os_win32.c, src/structs.h
|
||||
|
||||
Patch 8.0.0052 (after 8.0.0049)
|
||||
Problem: Conceal test passes even without the bug fix.
|
||||
Solution: Add a redraw command. (Christian Brabandt)
|
||||
Files: src/testdir/test_matchadd_conceal.vim
|
||||
|
||||
Patch 8.0.0053 (after 8.0.0047)
|
||||
Problem: No test for what 8.0.0047 fixes.
|
||||
Solution: Add a test. (Hirohito Higashi)
|
||||
Files: src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0054 (after 8.0.0051)
|
||||
Problem: On Windows job_stop() stops cmd.exe, not the processes it runs.
|
||||
(Linwei)
|
||||
Solution: Iterate over all processes and terminate the one where the parent
|
||||
is the job process. Now only when there is no job object.
|
||||
(Yasuhiro Matsumoto, closes #1203)
|
||||
Files: src/os_win32.c
|
||||
|
||||
Patch 8.0.0055
|
||||
Problem: Minor comment and style deficiencies.
|
||||
Solution: Update comments and fix style.
|
||||
Files: src/buffer.c, src/misc2.c, src/os_unix.c
|
||||
|
||||
Patch 8.0.0056
|
||||
Problem: When setting 'filetype' there is no check for a valid name.
|
||||
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
|
||||
Files: src/option.c, src/testdir/test_options.vim
|
||||
|
||||
Patch 8.0.0057 (after 8.0.0056)
|
||||
Problem: Tests fail without the 'keymap' features.
|
||||
Solution: Check for feature in test.
|
||||
Files: src/testdir/test_options.vim
|
||||
|
||||
Patch 8.0.0058
|
||||
Problem: Positioning of the popup menu is not good.
|
||||
Solution: Position it better. (Hirohito Higashi)
|
||||
Files: src/popupmnu.c
|
||||
|
||||
Patch 8.0.0059
|
||||
Problem: Vim does not build on VMS systems.
|
||||
Solution: Various changes for VMS. (Zoltan Arpadffy)
|
||||
Files: src/json.c, src/macros.h, src/Make_vms.mms, src/os_unix.c,
|
||||
src/os_unix.h, src/os_vms.c, src/os_vms_conf.h,
|
||||
src/proto/os_vms.pro, src/testdir/Make_vms.mms
|
||||
|
||||
Patch 8.0.0060
|
||||
Problem: When using an Ex command for 'keywordprg' it is escaped as with a
|
||||
shell command. (Romain Lafourcade)
|
||||
Solution: Escape for an Ex command. (closes #1175)
|
||||
Files: src/normal.c, src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0061 (after 8.0.0058)
|
||||
Problem: Compiler warning for unused variable.
|
||||
Solution: Add #ifdef. (John Marriott)
|
||||
Files: src/popupmnu.c
|
||||
|
||||
Patch 8.0.0062
|
||||
Problem: No digraph for HORIZONTAL ELLIPSIS.
|
||||
Solution: Use ",.". (Hans Ginzel, closes #1226)
|
||||
Files: src/digraph.c, runtime/doc/digraph.txt
|
||||
|
||||
Patch 8.0.0063
|
||||
Problem: Compiler warning for comparing with unsigned. (Zoltan Arpadffy)
|
||||
Solution: Change <= to ==.
|
||||
Files: src/undo.c
|
||||
|
||||
Patch 8.0.0064 (after 8.0.0060)
|
||||
Problem: Normal test fails on MS-Windows.
|
||||
Solution: Don't try using an illegal file name.
|
||||
Files: src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0065 (after 8.0.0056)
|
||||
Problem: Compiler warning for unused function in tiny build. (Tony
|
||||
Mechelynck)
|
||||
Solution: Add #ifdef.
|
||||
Files: src/option.c
|
||||
|
||||
Patch 8.0.0066
|
||||
Problem: when calling an operator function when 'linebreak' is set, it is
|
||||
internally reset before calling the operator function.
|
||||
Solution: Restore 'linebreak' before calling op_function(). (Christian
|
||||
Brabandt)
|
||||
Files: src/normal.c, src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0067
|
||||
Problem: VMS has a problem with infinity.
|
||||
Solution: Avoid an overflow. (Zoltan Arpadffy)
|
||||
Files: src/json.c, src/macros.h
|
||||
|
||||
Patch 8.0.0068
|
||||
Problem: Checking did_throw after executing autocommands is wrong. (Daniel
|
||||
Hahler)
|
||||
Solution: Call aborting() instead, and only when autocommands were executed.
|
||||
Files: src/quickfix.c, src/if_cscope.c, src/testdir/test_quickfix.vim
|
||||
|
||||
Patch 8.0.0069
|
||||
Problem: Compiler warning for self-comparison.
|
||||
Solution: Define ONE_WINDOW and add #ifdef.
|
||||
Files: src/globals.h, src/buffer.c, src/ex_docmd.c, src/move.c,
|
||||
src/screen.c, src/quickfix.c, src/window.c
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.0. Last change: 2016 Aug 23
|
||||
*windows.txt* For Vim version 8.0. Last change: 2016 Oct 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -295,8 +295,8 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
|
||||
:1quit " quit the first window
|
||||
:$quit " quit the last window
|
||||
:9quit " quit the last window
|
||||
" if there are less than 9 windows opened
|
||||
:-quit " quit the previews window
|
||||
" if there are fewer than 9 windows opened
|
||||
:-quit " quit the previous window
|
||||
:+quit " quit the next window
|
||||
:+2quit " quit the second next window
|
||||
<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Sep 22
|
||||
" Last Change: 2016 Oct 31
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -862,7 +862,7 @@ au BufNewFile,BufRead *.ht setf haste
|
||||
au BufNewFile,BufRead *.htpp setf hastepreproc
|
||||
|
||||
" Hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
|
||||
|
||||
" HEX (Intel)
|
||||
au BufNewFile,BufRead *.hex,*.h32 setf hex
|
||||
@@ -1760,6 +1760,9 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby
|
||||
" RubyGems
|
||||
au BufNewFile,BufRead *.gemspec setf ruby
|
||||
|
||||
" Rust
|
||||
au BufNewFile,BufRead *.rs setf rust
|
||||
|
||||
" Rackup
|
||||
au BufNewFile,BufRead *.ru setf ruby
|
||||
|
||||
@@ -2254,7 +2257,7 @@ func! s:FTtex()
|
||||
endfunc
|
||||
|
||||
" ConTeXt
|
||||
au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv setf context
|
||||
au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv,*.mkvi setf context
|
||||
|
||||
" Texinfo
|
||||
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
@@ -2668,6 +2671,9 @@ au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
" Nroff macros
|
||||
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
|
||||
|
||||
" OpenBSD hostname.if
|
||||
au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config')
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,16 +12,26 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo<"
|
||||
if !exists('current_compiler')
|
||||
compiler context
|
||||
endif
|
||||
|
||||
setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tcroql
|
||||
let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo< ofu<"
|
||||
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
|
||||
|
||||
setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tjcroql2
|
||||
if get(b:, 'context_metapost', get(g:, 'context_metapost', 1))
|
||||
setlocal omnifunc=contextcomplete#Complete
|
||||
let g:omni_syntax_group_include_context = 'mf\w\+,mp\w\+'
|
||||
let g:omni_syntax_group_exclude_context = 'mfTodoComment'
|
||||
endif
|
||||
|
||||
let &l:define='\\\%([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\='
|
||||
\ . 'def\|\\font\|\\\%(future\)\=let'
|
||||
\ . '\|\\new\%(count\|dimen\|skip\|muskip\|box\|toks\|read\|write'
|
||||
\ . '\|fam\|insert\|if\)'
|
||||
|
||||
let &l:include = '^\s*\%(input\|component\)'
|
||||
let &l:include = '^\s*\\\%(input\|component\|product\|project\|environment\)'
|
||||
|
||||
setlocal suffixesadd=.tex
|
||||
|
||||
@@ -31,5 +42,61 @@ if exists("loaded_matchit")
|
||||
\ '\\start\(\a\+\):\\stop\1'
|
||||
endif
|
||||
|
||||
let s:context_regex = {
|
||||
\ 'beginsection' : '\\\%(start\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>',
|
||||
\ 'endsection' : '\\\%(stop\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>',
|
||||
\ 'beginblock' : '\\\%(start\|setup\|define\)',
|
||||
\ 'endblock' : '\\\%(stop\|setup\|define\)'
|
||||
\ }
|
||||
|
||||
function! s:move_around(count, what, flags, visual)
|
||||
if a:visual
|
||||
exe "normal! gv"
|
||||
endif
|
||||
call search(s:context_regex[a:what], a:flags.'s') " 's' sets previous context mark
|
||||
call map(range(2, a:count), 'search(s:context_regex[a:what], a:flags)')
|
||||
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>
|
||||
|
||||
" Other useful mappings
|
||||
if get(g:, 'context_mappings', 1)
|
||||
let s:tp_regex = '?^$\|^\s*\\\(item\|start\|stop\|blank\|\%(sub\)*section\|chapter\|\%(sub\)*subject\|title\|part\)'
|
||||
|
||||
fun! s:tp()
|
||||
call cursor(search(s:tp_regex, 'bcW') + 1, 1)
|
||||
normal! V
|
||||
call cursor(search(s:tp_regex, 'W') - 1, 1)
|
||||
endf
|
||||
|
||||
" Reflow paragraphs with commands like gqtp ("gq TeX paragraph")
|
||||
onoremap <silent><buffer> tp :<c-u>call <sid>tp()<cr>
|
||||
" Select TeX paragraph
|
||||
vnoremap <silent><buffer> tp <esc>:<c-u>call <sid>tp()<cr>
|
||||
|
||||
" $...$ text object
|
||||
onoremap <silent><buffer> i$ :<c-u>normal! T$vt$<cr>
|
||||
onoremap <silent><buffer> a$ :<c-u>normal! F$vf$<cr>
|
||||
vnoremap <buffer> i$ T$ot$
|
||||
vnoremap <buffer> a$ F$of$
|
||||
endif
|
||||
|
||||
" Commands for asynchronous typesetting
|
||||
command! -buffer -nargs=? -complete=file ConTeXt call context#typeset(<q-args>)
|
||||
command! -nargs=0 ConTeXtJobStatus call context#job_status()
|
||||
command! -nargs=0 ConTeXtStopJobs call context#stop_jobs()
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
" ConTeXt indent file
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Last Change: 2016 Oct 15
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !get(b:, 'context_metapost', get(g:, 'context_metapost', 1))
|
||||
finish
|
||||
endif
|
||||
|
||||
" Load MetaPost indentation script
|
||||
runtime! indent/mp.vim
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal indentexpr=GetConTeXtIndent()
|
||||
|
||||
let b:undo_indent = "setl indentexpr<"
|
||||
|
||||
function! GetConTeXtIndent()
|
||||
" Use MetaPost rules inside MetaPost graphic environments
|
||||
if len(synstack(v:lnum, 1)) > 0 &&
|
||||
\ synIDattr(synstack(v:lnum, 1)[0], "name") ==# 'contextMPGraphic'
|
||||
return GetMetaPostIndent()
|
||||
endif
|
||||
return -1
|
||||
endfunc
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:sw=2
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.46
|
||||
" Last Change: 2016 Sep. 27
|
||||
" Version: 47
|
||||
" Last Change: 2016 Oct. 29
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
@@ -100,9 +100,9 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
"Add a shiftwidth to statements following if, else, else if, case,
|
||||
"Add a shiftwidth to statements following if, else, else if, case, class,
|
||||
"where, else where, forall, type, interface and associate statements
|
||||
if prevstat =~? '^\s*\(case\|else\|else\s*if\|else\s*where\)\>'
|
||||
if prevstat =~? '^\s*\(case\|class\|else\|else\s*if\|else\s*where\)\>'
|
||||
\ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>'
|
||||
\ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>'
|
||||
\ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>'
|
||||
@@ -136,11 +136,11 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
"Subtract a shiftwidth from else, else if, elsewhere, case, end if,
|
||||
"Subtract a shiftwidth from else, else if, elsewhere, case, class, end if,
|
||||
" end where, end select, end forall, end interface, end associate,
|
||||
" end enum, end type, end block and end type statements
|
||||
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|class\|'
|
||||
\. 'end\s*\(if\|where\|select\|interface\|'
|
||||
\. 'type\|forall\|associate\|enum\|block\)\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
" Vim Keymap file for kazakh characters, layout 'jcuken', classical variant
|
||||
|
||||
" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
|
||||
" Maintainer: Darkhan Kubigenov <darkhanu@gmail.com>
|
||||
" Last Changed: 2016 Oct 25
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "kk"
|
||||
|
||||
loadkeymap
|
||||
~ ) CYRILLIC CAPITAL LETTER IO
|
||||
` ( CYRILLIC SMALL LETTER IO
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B И CYRILLIC CAPITAL LETTER I
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Щ CYRILLIC CAPITAL LETTER SHCHA
|
||||
} Ъ CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
S Ы CYRILLIC CAPITAL LETTER YERU
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Э CYRILLIC CAPITAL LETTER E
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b и CYRILLIC SMALL LETTER I
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o щ CYRILLIC SMALL LETTER SHCHA
|
||||
] ъ CYRILLIC SMALL LETTER HARD SIGN
|
||||
s ы CYRILLIC SMALL LETTER YERU
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' э CYRILLIC SMALL LETTER E
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
@ Ә CYRILLIC CAPITAL LETTER SCHWA
|
||||
# І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
$ Ң CYRILLIC CAPITAL LETTER EN WITH DESCENDER
|
||||
% Ғ CYRILLIC CAPITAL LETTER GHE WITH STROKE
|
||||
^ ;
|
||||
& :
|
||||
* Ү CYRILLIC CAPITAL LETTER STRAIGHT U
|
||||
( Ұ CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
|
||||
) Қ CYRILLIC CAPITAL LETTER KA WITH DESCENDER
|
||||
_ Ө CYRILLIC CAPITAL LETTER BARRED O
|
||||
+ Һ CYRILLIC CAPITAL LETTER SHHA
|
||||
1 "
|
||||
2 ә CYRILLIC SMALL LETTER SCHWA
|
||||
3 і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
4 ң CYRILLIC SMALL LETTER EN WITH DESCENDER
|
||||
5 ғ CYRILLIC SMALL LETTER GHE WITH STROKE
|
||||
6 ,
|
||||
7 .
|
||||
8 ү CYRILLIC SMALL LETTER STRAIGHT U
|
||||
9 ұ CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
|
||||
0 қ CYRILLIC SMALL LETTER KA WITH DESCENDER
|
||||
- ө CYRILLIC SMALL LETTER BARRED O
|
||||
= һ CYRILLIC SMALL LETTER SHHA
|
||||
@@ -1,7 +1,7 @@
|
||||
" Menu Translations: Slovenian / Slovensko
|
||||
" Maintainer: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
|
||||
" Originally By: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
|
||||
" Last Change: Sat, 17 Jun 2006
|
||||
" Last Change: 2016 Oct 17
|
||||
" vim:set foldmethod=marker tabstop=8:
|
||||
|
||||
" TODO: add/check all '&'s
|
||||
@@ -31,7 +31,7 @@ menutrans E&xit<Tab>:qa &Izhod<Tab>:qa
|
||||
|
||||
if has("diff")
|
||||
menutrans Split\ &Diff\ with\.\.\. Primerjaj\ z\ (di&ff)\ \.\.\.
|
||||
menutrans Split\ Patched\ &By\.\.\. &Popravi\ z\ (patch)\ \.\.\.
|
||||
menutrans Split\ Patched\ &By\.\.\. &Popravi\ s\ (patch)\ \.\.\.
|
||||
endif
|
||||
" }}} FILE / DATOTEKA
|
||||
|
||||
@@ -96,12 +96,12 @@ menutrans Soft\ &Tabstop
|
||||
menutrans Te&xt\ Width\.\.\. Širina\ besedila\ \.\.\.
|
||||
menutrans &File\ Format\.\.\. Format\ &datoteke\ \.\.\.
|
||||
menutrans C&olor\ Scheme &Barvna\ shema\ \.\.\.
|
||||
menutrans &Keymap &Keymap
|
||||
menutrans &Keymap Razporeditev\ tip&k
|
||||
menutrans Select\ Fo&nt\.\.\. Pisava\ \.\.\.
|
||||
" }}} EDIT / UREDI
|
||||
|
||||
" {{{ TOOLS / ORODJA
|
||||
menutrans &Tools &Orodja
|
||||
menutrans &Tools O&rodja
|
||||
menutrans &Jump\ to\ this\ tag<Tab>g^] &Skoèi\ k\ tej\ znaèki<Tab>g^]
|
||||
menutrans Jump\ &back<Tab>^T Skoèi\ Na&zaj<Tab>^T
|
||||
menutrans Build\ &Tags\ File Napravi\ datoteke\ z\ znaèkami\ (tag)
|
||||
@@ -175,7 +175,7 @@ menutrans &Set\ Compiler Nastavi\ &prevajalnik
|
||||
menutrans Se&T\ Compiler Nastavi\ &prevajalnik " bug in original translation?
|
||||
|
||||
menutrans &Convert\ to\ HEX<Tab>:%!xxd Pretvori\ v\ HE&X<Tab>:%!xxd
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Pretvori\ nazaj<Tab>:%!xxd\ -r
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Povrni\ pretvo&rbo<Tab>:%!xxd\ -r
|
||||
" }}} TOOLS / ORODJA
|
||||
|
||||
" {{{ SYNTAX / BARVANJE KODE
|
||||
@@ -242,7 +242,7 @@ menutrans &About &O\ programu
|
||||
" {{{ POPUP
|
||||
menutrans &Undo &Razveljavi
|
||||
menutrans Cu&t &Izreži
|
||||
menutrans &Copy &Kopieraj
|
||||
menutrans &Copy &Kopiraj
|
||||
menutrans &Paste &Prilepi
|
||||
menutrans &Delete &Zbriši
|
||||
menutrans Select\ Blockwise Izbiraj\ po\ blokih
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Menu Translations: Slovenian / Slovensko
|
||||
" Maintainer: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
|
||||
" Originally By: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
|
||||
" Last Change: Mon, 12 Jun 2006 00:00:00 CEST
|
||||
" Last Change: 2016 Oct 17
|
||||
" vim:set foldmethod=marker tabstop=8:
|
||||
|
||||
" TODO: add/check all '&'s
|
||||
@@ -31,7 +31,7 @@ menutrans E&xit<Tab>:qa &Izhod<Tab>:qa
|
||||
|
||||
if has("diff")
|
||||
menutrans Split\ &Diff\ with\.\.\. Primerjaj\ z\ (di&ff)\ \.\.\.
|
||||
menutrans Split\ Patched\ &By\.\.\. &Popravi\ z\ (patch)\ \.\.\.
|
||||
menutrans Split\ Patched\ &By\.\.\. &Popravi\ s\ (patch)\ \.\.\.
|
||||
endif
|
||||
" }}} FILE / DATOTEKA
|
||||
|
||||
@@ -96,12 +96,12 @@ menutrans Soft\ &Tabstop
|
||||
menutrans Te&xt\ Width\.\.\. ©irina\ besedila\ \.\.\.
|
||||
menutrans &File\ Format\.\.\. Format\ &datoteke\ \.\.\.
|
||||
menutrans C&olor\ Scheme &Barvna\ shema\ \.\.\.
|
||||
menutrans &Keymap &Keymap
|
||||
menutrans &Keymap Razporeditev\ tip&k
|
||||
menutrans Select\ Fo&nt\.\.\. Pisava\ \.\.\.
|
||||
" }}} EDIT / UREDI
|
||||
|
||||
" {{{ TOOLS / ORODJA
|
||||
menutrans &Tools &Orodja
|
||||
menutrans &Tools O&rodja
|
||||
menutrans &Jump\ to\ this\ tag<Tab>g^] &Skoèi\ k\ tej\ znaèki<Tab>g^]
|
||||
menutrans Jump\ &back<Tab>^T Skoèi\ Na&zaj<Tab>^T
|
||||
menutrans Build\ &Tags\ File Napravi\ datoteke\ z\ znaèkami\ (tag)
|
||||
@@ -175,7 +175,7 @@ menutrans &Set\ Compiler Nastavi\ &prevajalnik
|
||||
menutrans Se&T\ Compiler Nastavi\ &prevajalnik " bug in original translation?
|
||||
|
||||
menutrans &Convert\ to\ HEX<Tab>:%!xxd Pretvori\ v\ HE&X<Tab>:%!xxd
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Pretvori\ nazaj<Tab>:%!xxd\ -r
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Povrni\ pretvo&rbo<Tab>:%!xxd\ -r
|
||||
" }}} TOOLS / ORODJA
|
||||
|
||||
" {{{ SYNTAX / BARVANJE KODE
|
||||
@@ -242,7 +242,7 @@ menutrans &About &O\ programu
|
||||
" {{{ POPUP
|
||||
menutrans &Undo &Razveljavi
|
||||
menutrans Cu&t &Izre¾i
|
||||
menutrans &Copy &Kopieraj
|
||||
menutrans &Copy &Kopiraj
|
||||
menutrans &Paste &Prilepi
|
||||
menutrans &Delete &Zbri¹i
|
||||
menutrans Select\ Blockwise Izbiraj\ po\ blokih
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Menu Translations: Slovenian / Slovensko
|
||||
" Maintainer: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
|
||||
" Originally By: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
|
||||
" Last Change: Sat, 17 Jun 2006
|
||||
" Last Change: 2016 Oct 17
|
||||
" vim:set foldmethod=marker tabstop=8:
|
||||
|
||||
" TODO: add/check all '&'s
|
||||
@@ -31,7 +31,7 @@ menutrans E&xit<Tab>:qa &Izhod<Tab>:qa
|
||||
|
||||
if has("diff")
|
||||
menutrans Split\ &Diff\ with\.\.\. Primerjaj\ z\ (di&ff)\ \.\.\.
|
||||
menutrans Split\ Patched\ &By\.\.\. &Popravi\ z\ (patch)\ \.\.\.
|
||||
menutrans Split\ Patched\ &By\.\.\. &Popravi\ s\ (patch)\ \.\.\.
|
||||
endif
|
||||
" }}} FILE / DATOTEKA
|
||||
|
||||
@@ -96,12 +96,12 @@ menutrans Soft\ &Tabstop Širina\ &tabulatorja
|
||||
menutrans Te&xt\ Width\.\.\. Širina\ besedila\ \.\.\.
|
||||
menutrans &File\ Format\.\.\. Format\ &datoteke\ \.\.\.
|
||||
menutrans C&olor\ Scheme &Barvna\ shema\ \.\.\.
|
||||
menutrans &Keymap &Keymap
|
||||
menutrans &Keymap Razporeditev\ tip&k
|
||||
menutrans Select\ Fo&nt\.\.\. Pisava\ \.\.\.
|
||||
" }}} EDIT / UREDI
|
||||
|
||||
" {{{ TOOLS / ORODJA
|
||||
menutrans &Tools &Orodja
|
||||
menutrans &Tools O&rodja
|
||||
menutrans &Jump\ to\ this\ tag<Tab>g^] &Skoči\ k\ tej\ znački<Tab>g^]
|
||||
menutrans Jump\ &back<Tab>^T Skoči\ Na&zaj<Tab>^T
|
||||
menutrans Build\ &Tags\ File Napravi\ datoteke\ z\ značkami\ (tag)
|
||||
@@ -175,7 +175,7 @@ menutrans &Set\ Compiler Nastavi\ &prevajalnik
|
||||
menutrans Se&T\ Compiler Nastavi\ &prevajalnik " bug in original translation?
|
||||
|
||||
menutrans &Convert\ to\ HEX<Tab>:%!xxd Pretvori\ v\ HE&X<Tab>:%!xxd
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Pretvori\ nazaj<Tab>:%!xxd\ -r
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Povrni\ pretvo&rbo<Tab>:%!xxd\ -r
|
||||
" }}} TOOLS / ORODJA
|
||||
|
||||
" {{{ SYNTAX / BARVANJE KODE
|
||||
@@ -242,7 +242,7 @@ menutrans &About &O\ programu
|
||||
" {{{ POPUP
|
||||
menutrans &Undo &Razveljavi
|
||||
menutrans Cu&t &Izreži
|
||||
menutrans &Copy &Kopieraj
|
||||
menutrans &Copy &Kopiraj
|
||||
menutrans &Paste &Prilepi
|
||||
menutrans &Delete &Zbriši
|
||||
menutrans Select\ Blockwise Izbiraj\ po\ blokih
|
||||
|
||||
@@ -1345,10 +1345,18 @@ if exists("&pythondll")
|
||||
call append("$", "pythondll\tname of the Python 2 dynamic library")
|
||||
call <SID>OptionG("pythondll", &pythondll)
|
||||
endif
|
||||
if exists("&pythonhome")
|
||||
call append("$", "pythonhome\tname of the Python 2 home directory")
|
||||
call <SID>OptionG("pythonhome", &pythonhome)
|
||||
endif
|
||||
if exists("&pythonthreedll")
|
||||
call append("$", "pythonthreedll\tname of the Python 3 dynamic library")
|
||||
call <SID>OptionG("pythonthreedll", &pythonthreedll)
|
||||
endif
|
||||
if exists("&pythonthreehome")
|
||||
call append("$", "pythonthreehome\tname of the Python 3 home directory")
|
||||
call <SID>OptionG("pythonthreehome", &pythonthreehome)
|
||||
endif
|
||||
if exists("&rubydll")
|
||||
call append("$", "rubydll\tname of the Ruby dynamic library")
|
||||
call <SID>OptionG("rubydll", &rubydll)
|
||||
|
||||
+10
-2
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Mar 10
|
||||
" Last Change: 2016 Oct 30
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded
|
||||
@@ -20,25 +20,33 @@ augroup gzip
|
||||
"
|
||||
" Set binary mode before reading the file.
|
||||
" Use "gzip -d", gunzip isn't always available.
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin
|
||||
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
|
||||
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
|
||||
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
|
||||
autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
|
||||
autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
|
||||
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
|
||||
autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
|
||||
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
|
||||
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
|
||||
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
|
||||
autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
|
||||
autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
|
||||
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
|
||||
autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
|
||||
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
|
||||
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
|
||||
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
|
||||
autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
|
||||
autocmd FileAppendPre *.xz call gzip#appre("xz -d")
|
||||
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
|
||||
autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
|
||||
autocmd FileAppendPost *.gz call gzip#write("gzip")
|
||||
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
|
||||
autocmd FileAppendPost *.Z call gzip#write("compress -f")
|
||||
autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
|
||||
autocmd FileAppendPost *.xz call gzip#write("xz -z")
|
||||
autocmd FileAppendPost *.lz call gzip#write("lzip")
|
||||
autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
|
||||
augroup END
|
||||
|
||||
+24
-24
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Jul 07
|
||||
" Last Change: 2016 Nov 17
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -358,36 +358,36 @@ if !exists("c_no_c99") " ISO C99
|
||||
endif
|
||||
|
||||
" Accept %: for # (C99)
|
||||
syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||
syn match cPreConditMatch display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||
syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||
syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
endif
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
else
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
endif
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
endif
|
||||
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match cIncluded display contained "<[^>]*>"
|
||||
syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
|
||||
syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
|
||||
"syn match cLineSkip "\\$"
|
||||
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
|
||||
syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
|
||||
" Highlight User Labels
|
||||
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
|
||||
@@ -396,21 +396,21 @@ if s:ft ==# 'c' || exists("cpp_no_cpp11")
|
||||
endif
|
||||
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
|
||||
syn cluster cLabelGroup contains=cUserLabel
|
||||
syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
|
||||
if s:ft ==# 'cpp'
|
||||
syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
else
|
||||
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
endif
|
||||
|
||||
syn match cUserLabel display "\I\i*" contained
|
||||
|
||||
" Avoid recognizing most bitfields as labels
|
||||
syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||
syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||
|
||||
if exists("c_minlines")
|
||||
let b:c_minlines = c_minlines
|
||||
|
||||
+74
-41
@@ -1,7 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-08-10
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 16
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -13,65 +14,93 @@ unlet b:current_syntax
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('g:context_include')
|
||||
let g:context_include = ['mp', 'javascript', 'xml']
|
||||
" Dictionary of (filetype, group) pairs to highlight between \startGROUP \stopGROUP.
|
||||
let s:context_include = get(b:, 'context_include', get(g:, 'context_include', {'xml': 'XML'}))
|
||||
|
||||
" For backward compatibility (g:context_include used to be a List)
|
||||
if type(s:context_include) ==# type([])
|
||||
let g:context_metapost = (index(s:context_include, 'mp') != -1)
|
||||
let s:context_include = filter(
|
||||
\ {'c': 'C', 'javascript': 'JS', 'ruby': 'Ruby', 'xml': 'XML'},
|
||||
\ { k,_ -> index(s:context_include, k) != -1 }
|
||||
\ )
|
||||
endif
|
||||
|
||||
syn iskeyword @,48-57,a-z,A-Z,192-255
|
||||
|
||||
syn spell toplevel
|
||||
|
||||
syn match contextBlockDelim display '\\\%(start\|stop\)\a\+'
|
||||
\ contains=@NoSpell
|
||||
" ConTeXt options, i.e., [...] blocks
|
||||
syn region contextOptions matchgroup=contextDelimiter start='\[' end=']\|\ze\\stop' skip='\\\[\|\\\]' contains=ALLBUT,contextBeginEndLua,@Spell
|
||||
|
||||
syn region contextEscaped display matchgroup=contextPreProc
|
||||
\ start='\\type\z(\A\)' end='\z1'
|
||||
syn region contextEscaped display matchgroup=contextPreProc
|
||||
\ start='\\type\={' end='}'
|
||||
syn region contextEscaped display matchgroup=contextPreProc
|
||||
\ start='\\type\=<<' end='>>'
|
||||
" Highlight braces
|
||||
syn match contextDelimiter '[{}]'
|
||||
|
||||
" Comments
|
||||
syn match contextComment '\\\@<!\%(\\\\\)*\zs%.*$' display contains=initexTodo
|
||||
syn match contextComment '^\s*%[CDM].*$' display contains=initexTodo
|
||||
|
||||
syn match contextBlockDelim '\\\%(start\|stop\)\a\+' contains=@NoSpell
|
||||
|
||||
syn region contextEscaped matchgroup=contextPreProc start='\\type\%(\s*\|\n\)*\z([^A-Za-z%]\)' end='\z1'
|
||||
syn region contextEscaped matchgroup=contextPreProc start='\\type\=\%(\s\|\n\)*{' end='}'
|
||||
syn region contextEscaped matchgroup=contextPreProc start='\\type\=\%(\s*\|\n\)*<<' end='>>'
|
||||
syn region contextEscaped matchgroup=contextPreProc
|
||||
\ start='\\start\z(\a*\%(typing\|typen\)\)'
|
||||
\ end='\\stop\z1' contains=plaintexComment keepend
|
||||
syn region contextEscaped display matchgroup=contextPreProc
|
||||
\ start='\\\h\+Type{' end='}'
|
||||
syn region contextEscaped display matchgroup=contextPreProc
|
||||
\ start='\\Typed\h\+{' end='}'
|
||||
syn region contextEscaped matchgroup=contextPreProc start='\\\h\+Type\%(\s\|\n\)*{' end='}'
|
||||
syn region contextEscaped matchgroup=contextPreProc start='\\Typed\h\+\%(\s\|\n\)*{' end='}'
|
||||
|
||||
syn match contextBuiltin display contains=@NoSpell
|
||||
\ '\\\%(unprotect\|protect\|unexpanded\)'
|
||||
\ '\\\%(unprotect\|protect\|unexpanded\)\>'
|
||||
|
||||
syn match contextPreProc '^\s*\\\%(start\|stop\)\=\%(component\|environment\|project\|product\).*$'
|
||||
syn match contextPreProc '^\s*\\\%(start\|stop\)\=\%(component\|environment\|project\|product\)\>'
|
||||
\ contains=@NoSpell
|
||||
|
||||
if index(g:context_include, 'mp') != -1
|
||||
if get(b:, 'context_metapost', get(g:, 'context_metapost', 1))
|
||||
let b:mp_metafun_macros = 1 " Highlight MetaFun keywords
|
||||
syn include @mpTop syntax/mp.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
syn region contextMPGraphic transparent matchgroup=contextBlockDelim
|
||||
\ start='\\start\z(\a*MPgraphic\|MP\%(page\|inclusions\|run\)\).*'
|
||||
syn region contextMPGraphic matchgroup=contextBlockDelim
|
||||
\ start='\\start\z(MP\%(clip\|code\|definitions\|drawing\|environment\|extensions\|inclusions\|initializations\|page\|\)\)\>.*$'
|
||||
\ end='\\stop\z1'
|
||||
\ contains=@mpTop
|
||||
\ contains=@mpTop,@NoSpell
|
||||
syn region contextMPGraphic matchgroup=contextBlockDelim
|
||||
\ start='\\start\z(\%(\%[re]usable\|use\|unique\|static\)MPgraphic\|staticMPfigure\|uniqueMPpagegraphic\)\>.*$'
|
||||
\ end='\\stop\z1'
|
||||
\ contains=@mpTop,@NoSpell
|
||||
endif
|
||||
|
||||
" TODO: also need to implement this for \\typeC or something along those
|
||||
" lines.
|
||||
function! s:include_syntax(name, group)
|
||||
if index(g:context_include, a:name) != -1
|
||||
execute 'syn include @' . a:name . 'Top' 'syntax/' . a:name . '.vim'
|
||||
unlet b:current_syntax
|
||||
execute 'syn region context' . a:group . 'Code'
|
||||
\ 'transparent matchgroup=contextBlockDelim'
|
||||
\ 'start=+\\start' . a:group . '+ end=+\\stop' . a:group . '+'
|
||||
\ 'contains=@' . a:name . 'Top'
|
||||
endif
|
||||
endfunction
|
||||
if get(b:, 'context_lua', get(g:, 'context_lua', 1))
|
||||
syn include @luaTop syntax/lua.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
call s:include_syntax('c', 'C')
|
||||
call s:include_syntax('ruby', 'Ruby')
|
||||
call s:include_syntax('javascript', 'JS')
|
||||
call s:include_syntax('xml', 'XML')
|
||||
syn region contextLuaCode matchgroup=contextBlockDelim
|
||||
\ start='\\startluacode\>'
|
||||
\ end='\\stopluacode\>' keepend
|
||||
\ contains=@luaTop,@NoSpell
|
||||
|
||||
syn match contextSectioning '\\chapter\>' contains=@NoSpell
|
||||
syn match contextSectioning '\\\%(sub\)*section\>' contains=@NoSpell
|
||||
syn match contextDirectLua "\\\%(directlua\|ctxlua\)\>\%(\s*%.*$\)\="
|
||||
\ nextgroup=contextBeginEndLua skipwhite skipempty
|
||||
\ contains=initexComment
|
||||
syn region contextBeginEndLua matchgroup=contextSpecial
|
||||
\ start="{" end="}" skip="\\[{}]"
|
||||
\ contained contains=@luaTop,@NoSpell
|
||||
endif
|
||||
|
||||
for synname in keys(s:context_include)
|
||||
execute 'syn include @' . synname . 'Top' 'syntax/' . synname . '.vim'
|
||||
unlet b:current_syntax
|
||||
execute 'syn region context' . s:context_include[synname] . 'Code'
|
||||
\ 'matchgroup=contextBlockDelim'
|
||||
\ 'start=+\\start' . s:context_include[synname] . '+'
|
||||
\ 'end=+\\stop' . s:context_include[synname] . '+'
|
||||
\ 'contains=@' . synname . 'Top,@NoSpell'
|
||||
endfor
|
||||
|
||||
syn match contextSectioning '\\\%(start\|stop\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>'
|
||||
\ contains=@NoSpell
|
||||
|
||||
syn match contextSpecial '\\crlf\>\|\\par\>\|-\{2,3}\||[<>/]\=|'
|
||||
\ contains=@NoSpell
|
||||
@@ -92,15 +121,19 @@ syn match contextFont '\\\%(vi\{1,3}\|ix\|xi\{0,2}\)\>'
|
||||
syn match contextFont '\\\%(tf\|b[si]\|s[cl]\|os\)\%(xx\|[xabcd]\)\=\>'
|
||||
\ contains=@NoSpell
|
||||
|
||||
hi def link contextOptions Typedef
|
||||
hi def link contextComment Comment
|
||||
hi def link contextBlockDelim Keyword
|
||||
hi def link contextBuiltin Keyword
|
||||
hi def link contextDelimiter Delimiter
|
||||
hi def link contextEscaped String
|
||||
hi def link contextPreProc PreProc
|
||||
hi def link contextSectioning PreProc
|
||||
hi def link contextSpecial Special
|
||||
hi def link contextType Type
|
||||
hi def link contextStyle contextType
|
||||
hi def link contextFont contextType
|
||||
hi def link contextDirectLua Keyword
|
||||
|
||||
let b:current_syntax = "context"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2016 Jul 07
|
||||
" Last Change: 2016 Oct 28
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -31,7 +31,7 @@ syn keyword cppConstant __cplusplus
|
||||
" C++ 11 extensions
|
||||
if !exists("cpp_no_cpp11")
|
||||
syn keyword cppModifier override final
|
||||
syn keyword cppType nullptr_t
|
||||
syn keyword cppType nullptr_t auto
|
||||
syn keyword cppExceptions noexcept
|
||||
syn keyword cppStorageClass constexpr decltype thread_local
|
||||
syn keyword cppConstant nullptr
|
||||
@@ -46,7 +46,11 @@ endif
|
||||
|
||||
" C++ 14 extensions
|
||||
if !exists("cpp_no_cpp14")
|
||||
syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn case ignore
|
||||
syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn case match
|
||||
endif
|
||||
|
||||
" The minimum and maximum operators in GNU C++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.99
|
||||
" Last Change: 2016 Sep. 23
|
||||
" Version: 100
|
||||
" Last Change: 2016 Oct. 29
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
@@ -397,6 +397,7 @@ if exists("fortran_fold")
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
||||
else
|
||||
@@ -406,6 +407,7 @@ if exists("fortran_fold")
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\s*[!#].*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
||||
endif
|
||||
@@ -415,12 +417,12 @@ if exists("fortran_fold")
|
||||
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
else
|
||||
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: 2016 Oct 01
|
||||
" Last Change: 2016 Oct 14
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -233,7 +233,10 @@ if get(g:, "other_mp_macros", 1)
|
||||
endif
|
||||
|
||||
" Up to date as of 23-Sep-2016.
|
||||
if get(g:, "mp_metafun_macros", 0)
|
||||
if get(b:, 'mp_metafun_macros', get(g:, 'mp_metafun_macros', 0))
|
||||
" Highlight TeX keywords (for use in ConTeXt documents)
|
||||
syn match mpTeXKeyword '\\[a-zA-Z@]\+'
|
||||
|
||||
" These keywords have been added manually.
|
||||
syn keyword mpPrimitive runscript
|
||||
|
||||
@@ -756,6 +759,7 @@ hi def link mpVariable mfVariable
|
||||
hi def link mpConstant mfConstant
|
||||
hi def link mpOnOff mpPrimitive
|
||||
hi def link mpDash mpPrimitive
|
||||
hi def link mpTeXKeyword Identifier
|
||||
|
||||
let b:current_syntax = "mp"
|
||||
|
||||
|
||||
+52
-45
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Sep 14
|
||||
" Last Change: 2016 Oct 29
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -46,6 +46,29 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("python_no_doctest_highlight")
|
||||
let python_no_doctest_code_highlight = 1
|
||||
endif
|
||||
|
||||
if exists("python_highlight_all")
|
||||
if exists("python_no_builtin_highlight")
|
||||
unlet python_no_builtin_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_code_highlight")
|
||||
unlet python_no_doctest_code_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_highlight")
|
||||
unlet python_no_doctest_highlight
|
||||
endif
|
||||
if exists("python_no_exception_highlight")
|
||||
unlet python_no_exception_highlight
|
||||
endif
|
||||
if exists("python_no_number_highlight")
|
||||
unlet python_no_number_highlight
|
||||
endif
|
||||
let python_space_error_highlight = 1
|
||||
endif
|
||||
|
||||
" Keep Python keywords in alphabetical order inside groups for easy
|
||||
" comparison with the table in the 'Python Language Reference'
|
||||
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
|
||||
@@ -81,30 +104,31 @@ syn keyword pythonInclude from import
|
||||
syn keyword pythonAsync async await
|
||||
|
||||
" Decorators (new in Python 2.4)
|
||||
" Python 3.5 introduced the use of the same symbol for matrix
|
||||
" multiplication. We now have to exclude the symbol from being
|
||||
" highlighted when used in that context. Hence, the check that it's
|
||||
" preceded by empty space only (possibly in a docstring/doctest) and
|
||||
" 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*\%((\_\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*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\)\@="
|
||||
\ contained display nextgroup=pythonFunction skipnl
|
||||
syn match pythonDecorator "@" display contained
|
||||
syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator
|
||||
|
||||
" The zero-length non-grouping match of def or class before the function
|
||||
" name is extremely important in pythonFunction. Without it, everything
|
||||
" is interpreted as a function inside the contained environment of
|
||||
" doctests.
|
||||
syn match pythonFunction
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\%(def\|class\)\s\+\)\@<=\h\w*"
|
||||
\ contained
|
||||
" Python 3.5 introduced the use of the same symbol for matrix multiplication:
|
||||
" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the
|
||||
" symbol from highlighting when used in that context.
|
||||
" Single line multiplication.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "\%(\w\|[])]\)\s*@"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
" Multiplication continued on the next line after backslash.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
" Multiplication in a parenthesized expression over multiple lines with @ at
|
||||
" the start of each continued line; very similar to decorators and complex.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
|
||||
syn match pythonFunction "\h\w*" display contained
|
||||
|
||||
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
|
||||
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
@@ -131,25 +155,6 @@ syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
if exists("python_highlight_all")
|
||||
if exists("python_no_builtin_highlight")
|
||||
unlet python_no_builtin_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_code_highlight")
|
||||
unlet python_no_doctest_code_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_highlight")
|
||||
unlet python_no_doctest_highlight
|
||||
endif
|
||||
if exists("python_no_exception_highlight")
|
||||
unlet python_no_exception_highlight
|
||||
endif
|
||||
if exists("python_no_number_highlight")
|
||||
unlet python_no_number_highlight
|
||||
endif
|
||||
let python_space_error_highlight = 1
|
||||
endif
|
||||
|
||||
" It is very important to understand all details before changing the
|
||||
" regular expressions below or their order.
|
||||
" The word boundaries are *not* the floating-point number boundaries
|
||||
@@ -213,7 +218,9 @@ if !exists("python_no_builtin_highlight")
|
||||
" non-essential built-in functions; Python 2 only
|
||||
syn keyword pythonBuiltin apply buffer coerce intern
|
||||
" avoid highlighting attributes as builtins
|
||||
syn match pythonAttribute /\.\h\w*/hs=s+1 contains=ALLBUT,pythonBuiltin transparent
|
||||
syn match pythonAttribute /\.\h\w*/hs=s+1
|
||||
\ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync
|
||||
\ transparent
|
||||
endif
|
||||
|
||||
" From the 'Python Library Reference' class hierarchy at the bottom.
|
||||
@@ -275,7 +282,7 @@ if !exists("python_no_doctest_highlight")
|
||||
if !exists("python_no_doctest_code_highlight")
|
||||
syn region pythonDoctest
|
||||
\ start="^\s*>>>\s" end="^\s*$"
|
||||
\ contained contains=ALLBUT,pythonDoctest,@Spell
|
||||
\ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell
|
||||
syn region pythonDoctestValue
|
||||
\ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$"
|
||||
\ contained
|
||||
@@ -287,7 +294,7 @@ if !exists("python_no_doctest_highlight")
|
||||
endif
|
||||
|
||||
" Sync at the beginning of class, function, or method definition.
|
||||
syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*("
|
||||
syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]"
|
||||
|
||||
" The default highlight links. Can be overridden later.
|
||||
hi def link pythonStatement Statement
|
||||
|
||||
+10
-6
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Aug 31, 2016
|
||||
" Version: 162
|
||||
" Last Change: Sep 22, 2016
|
||||
" Version: 165
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
|
||||
@@ -170,7 +170,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
|
||||
" Touch: {{{1
|
||||
" =====
|
||||
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd
|
||||
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd,shDoubleQuote,shSingleQuote,shDeref,shDerefSimple
|
||||
syn match shTouchCmd '\<touch\>' contained
|
||||
endif
|
||||
|
||||
@@ -220,7 +220,7 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")"
|
||||
"=======
|
||||
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
|
||||
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
|
||||
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' contained
|
||||
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' contained contains=shDerefSimple,shDeref
|
||||
syn match shAstQuote contained '\*\ze"' nextgroup=shString
|
||||
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
|
||||
syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
|
||||
@@ -355,7 +355,11 @@ syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ e
|
||||
" Comments: {{{1
|
||||
"==========
|
||||
syn cluster shCommentGroup contains=shTodo,@Spell
|
||||
syn keyword shTodo contained COMBAK FIXME TODO XXX
|
||||
if exists("b:is_bash")
|
||||
syn match shTodo contained "\<\%(COMBAK\|FIXME\|TODO\|XXX\)\ze:\=\>"
|
||||
else
|
||||
syn keyword shTodo contained COMBAK FIXME TODO XXX
|
||||
endif
|
||||
syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup
|
||||
syn match shComment "\s\zs#.*$" contains=@shCommentGroup
|
||||
syn match shComment contained "#.*$" contains=@shCommentGroup
|
||||
@@ -381,7 +385,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 it's a posix
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
|
||||
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
|
||||
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
|
||||
endif
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: sendmail
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Oct 23, 2014
|
||||
" Version: 7
|
||||
" Last Change: Oct 25, 2016
|
||||
" Version: 8
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
@@ -62,10 +61,10 @@ hi def link smClause Special
|
||||
hi def link smClauseError Error
|
||||
hi def link smComment Comment
|
||||
hi def link smDefine Statement
|
||||
hi def link smElse Delimiter
|
||||
hi def link smElse Delimiter
|
||||
hi def link smHeader Statement
|
||||
hi def link smHeaderSep String
|
||||
hi def link smMesg Special
|
||||
hi def link smMesg Special
|
||||
hi def link smPrecedence Number
|
||||
hi def link smRewrite Statement
|
||||
hi def link smRewriteComment Comment
|
||||
@@ -76,7 +75,6 @@ hi def link smRuleset Preproc
|
||||
hi def link smTrusted Special
|
||||
hi def link smVar String
|
||||
|
||||
|
||||
let b:current_syntax = "sm"
|
||||
|
||||
" vim: ts=18
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Sep 25
|
||||
" Last Change: 2016 Nov 04
|
||||
|
||||
" This file sets up for syntax highlighting.
|
||||
" It is loaded from "syntax.vim" and "manual.vim".
|
||||
@@ -69,8 +69,11 @@ au Syntax c,cpp,cs,idl,java,php,datascript
|
||||
|
||||
|
||||
" Source the user-specified syntax highlighting file
|
||||
if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
|
||||
execute "source " . mysyntaxfile
|
||||
if exists("mysyntaxfile")
|
||||
let s:fname = expand(mysyntaxfile)
|
||||
if filereadable(s:fname)
|
||||
execute "source " . fnameescape(s:fname)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Restore 'cpoptions'
|
||||
|
||||
+14
-18
@@ -1,7 +1,7 @@
|
||||
" Language: tags
|
||||
" Maintainer: Charles E. Campbell <NdrOchip@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Aug 31, 2016
|
||||
" Version: 6
|
||||
" Last Change: Oct 26, 2016
|
||||
" Version: 7
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -9,27 +9,23 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath
|
||||
syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile
|
||||
syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath
|
||||
syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile
|
||||
syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained
|
||||
syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment
|
||||
syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment
|
||||
syn match tagComment ";.*$" contained contains=tagField
|
||||
syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment
|
||||
syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment
|
||||
syn match tagComment ";.*$" contained contains=tagField
|
||||
syn match tagComment "^!_TAG_.*$"
|
||||
syn match tagField contained "[a-z]*:"
|
||||
syn match tagField contained "[a-z]*:"
|
||||
|
||||
" Define the default highlighting.
|
||||
if !exists("skip_drchip_tags_inits")
|
||||
|
||||
hi def link tagBaseFile PreProc
|
||||
hi def link tagComment Comment
|
||||
hi def link tagDelim Delimiter
|
||||
hi def link tagField Number
|
||||
hi def link tagName Identifier
|
||||
hi def link tagPath PreProc
|
||||
|
||||
hi def link tagBaseFile PreProc
|
||||
hi def link tagComment Comment
|
||||
hi def link tagDelim Delimiter
|
||||
hi def link tagField Number
|
||||
hi def link tagName Identifier
|
||||
hi def link tagPath PreProc
|
||||
endif
|
||||
|
||||
let b:current_syntax = "tags"
|
||||
|
||||
" vim: ts=12
|
||||
|
||||
+44
-38
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: Aug 31, 2016
|
||||
" Version: 100
|
||||
" Last Change: Sep 20, 2016
|
||||
" Version: 101
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -160,15 +160,17 @@ syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,tex
|
||||
syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell
|
||||
if !s:tex_nospell
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
|
||||
else
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
|
||||
endif
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
|
||||
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
|
||||
if !exists("g:tex_no_math")
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
|
||||
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
|
||||
syn cluster texMatchGroup add=@texMathZones
|
||||
syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
|
||||
@@ -199,9 +201,13 @@ if s:tex_fast =~# 'm'
|
||||
if !s:tex_no_error
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
|
||||
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
|
||||
else
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
|
||||
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup
|
||||
endif
|
||||
if !s:tex_nospell
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
||||
@@ -399,7 +405,7 @@ if !exists("g:tex_no_math")
|
||||
" TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2
|
||||
" Starred forms are created if starform is true. Starred
|
||||
" forms have syntax group and synchronization groups with a
|
||||
" "S" appended. Handles: cluster, syntax, sync, and hi link.
|
||||
" "S" appended. Handles: cluster, syntax, sync, and highlighting.
|
||||
fun! TexNewMathZone(sfx,mathzone,starform)
|
||||
let grpname = "texMathZone".a:sfx
|
||||
let syncname = "texSyncMathZone".a:sfx
|
||||
@@ -1262,13 +1268,13 @@ if !exists("skip_tex_syntax_inits")
|
||||
if !exists("g:tex_no_error")
|
||||
if !exists("g:tex_no_math")
|
||||
hi def link texBadMath texError
|
||||
hi def link texMathDelimBad texError
|
||||
hi def link texMathDelimBad texError
|
||||
hi def link texMathError texError
|
||||
if !b:tex_stylish
|
||||
hi def link texOnlyMath texError
|
||||
hi def link texOnlyMath texError
|
||||
endif
|
||||
endif
|
||||
hi def link texError Error
|
||||
hi def link texError Error
|
||||
endif
|
||||
|
||||
hi texBoldStyle gui=bold cterm=bold
|
||||
@@ -1277,59 +1283,59 @@ if !exists("skip_tex_syntax_inits")
|
||||
hi texItalBoldStyle gui=bold,italic cterm=bold,italic
|
||||
hi def link texCite texRefZone
|
||||
hi def link texDefCmd texDef
|
||||
hi def link texDefName texDef
|
||||
hi def link texDocType texCmdName
|
||||
hi def link texDocTypeArgs texCmdArgs
|
||||
hi def link texDefName texDef
|
||||
hi def link texDocType texCmdName
|
||||
hi def link texDocTypeArgs texCmdArgs
|
||||
hi def link texInputFileOpt texCmdArgs
|
||||
hi def link texInputCurlies texDelimiter
|
||||
hi def link texLigature texSpecialChar
|
||||
hi def link texLigature texSpecialChar
|
||||
if !exists("g:tex_no_math")
|
||||
hi def link texMathDelimSet1 texMathDelim
|
||||
hi def link texMathDelimSet2 texMathDelim
|
||||
hi def link texMathDelimKey texMathDelim
|
||||
hi def link texMathMatcher texMath
|
||||
hi def link texAccent texStatement
|
||||
hi def link texAccent texStatement
|
||||
hi def link texGreek texStatement
|
||||
hi def link texSuperscript texStatement
|
||||
hi def link texSubscript texStatement
|
||||
hi def link texSubscript texStatement
|
||||
hi def link texSuperscripts texSuperscript
|
||||
hi def link texSubscripts texSubscript
|
||||
hi def link texMathSymbol texStatement
|
||||
hi def link texMathZoneV texMath
|
||||
hi def link texMathZoneW texMath
|
||||
hi def link texMathZoneX texMath
|
||||
hi def link texMathZoneY texMath
|
||||
hi def link texMathZoneV texMath
|
||||
hi def link texMathZoneZ texMath
|
||||
hi def link texMathSymbol texStatement
|
||||
hi def link texMathZoneV texMath
|
||||
hi def link texMathZoneW texMath
|
||||
hi def link texMathZoneX texMath
|
||||
hi def link texMathZoneY texMath
|
||||
hi def link texMathZoneV texMath
|
||||
hi def link texMathZoneZ texMath
|
||||
endif
|
||||
hi def link texBeginEnd texCmdName
|
||||
hi def link texBeginEnd texCmdName
|
||||
hi def link texBeginEndName texSection
|
||||
hi def link texSpaceCode texStatement
|
||||
hi def link texSpaceCode texStatement
|
||||
hi def link texStyleStatement texStatement
|
||||
hi def link texTypeSize texType
|
||||
hi def link texTypeStyle texType
|
||||
hi def link texTypeSize texType
|
||||
hi def link texTypeStyle texType
|
||||
|
||||
" Basic TeX highlighting groups
|
||||
hi def link texCmdArgs Number
|
||||
hi def link texCmdName Statement
|
||||
hi def link texComment Comment
|
||||
hi def link texDef Statement
|
||||
hi def link texDefParm Special
|
||||
hi def link texDelimiter Delimiter
|
||||
hi def link texCmdArgs Number
|
||||
hi def link texCmdName Statement
|
||||
hi def link texComment Comment
|
||||
hi def link texDef Statement
|
||||
hi def link texDefParm Special
|
||||
hi def link texDelimiter Delimiter
|
||||
hi def link texInput Special
|
||||
hi def link texInputFile Special
|
||||
hi def link texInputFile Special
|
||||
hi def link texLength Number
|
||||
hi def link texMath Special
|
||||
hi def link texMathDelim Statement
|
||||
hi def link texMathOper Operator
|
||||
hi def link texMathDelim Statement
|
||||
hi def link texMathOper Operator
|
||||
hi def link texNewCmd Statement
|
||||
hi def link texNewEnv Statement
|
||||
hi def link texOption Number
|
||||
hi def link texRefZone Special
|
||||
hi def link texSection PreCondit
|
||||
hi def link texRefZone Special
|
||||
hi def link texSection PreCondit
|
||||
hi def link texSpaceCodeChar Special
|
||||
hi def link texSpecialChar SpecialChar
|
||||
hi def link texStatement Statement
|
||||
hi def link texSpecialChar SpecialChar
|
||||
hi def link texStatement Statement
|
||||
hi def link texString String
|
||||
hi def link texTodo Todo
|
||||
hi def link texType Type
|
||||
|
||||
+21
-20
@@ -1,8 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.4 script
|
||||
" Language: Vim 8.0 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: September 06, 2016
|
||||
" Version: 7.4-54
|
||||
" Last Change: September 29, 2016
|
||||
" Version: 8.0-01
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -18,12 +19,12 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] cc cf[ile] changes cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa l[ist] lat lcl[ose] lex[pr] lgetb[uffer] lhi[story] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
|
||||
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt la[st] later lcs lf[ile] lgete[xpr] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] lad[dexpr] lb[uffer] lcscope lfdo lgr[ep] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in ju[mps] keepp[atterns] laddb[uffer] lbo[ttom] ld[o] lfir[st] lgrepa[dd] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k lN[ext] laddf[ile] lc[d] le[ft] lg[etfile] lh[elpgrep] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lNf[ile] lan[guage] lch[dir] lefta[bove]
|
||||
syn keyword vimCommand contained a argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i in ju[mps] keepp[atterns] lad[dexpr] later lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
|
||||
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] iabc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcs lex[pr] lgetb[uffer] lhi[story] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] if is[earch] kee[pmarks] lNf[ile] laddf[ile] lbo[ttom] lcscope lf[ile] lgete[xpr] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi ij[ump] isp[lit] keepa l[ist] lan[guage] lc[d] ld[o] lfdo lgr[ep] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
|
||||
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] il[ist] iuna[bbrev] keepalt la[st] lat lch[dir] le[ft] lfir[st] lgrepa[dd] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] cc cf[ile] changes cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] imapc[lear] j[oin] keepj[umps]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
|
||||
|
||||
@@ -48,15 +49,15 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautoc
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_8b t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_8f t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EI
|
||||
syn match vimOption contained "t_%1"
|
||||
syn keyword vimOption contained t_8b t_AB t_AL t_CV t_Co t_DL t_F1 t_F3 t_F5 t_F7 t_F9 t_IS t_K1 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_KA t_KB t_KC t_KD t_KE t_KF t_KG t_KH t_KI t_KJ t_KK t_KL t_RB t_RI t_RV t_SI t_SR t_Sb t_Sf t_WP t_WS t_ZH t_ZR t_al t_bc t_cd t_ce t_cl t_cm t_cs t_da t_db t_dl t_fs t_k1 t_k2 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_kB t_kD t_kI t_kN t_kP t_kb t_kd t_ke t_kh t_kl t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_se t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_xn t_xs
|
||||
syn keyword vimOption contained t_8f t_AF t_CS t_Ce t_Cs t_EI t_F2 t_F4 t_F6 t_F8 t_IE
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
syn match vimOption contained "t_@7"
|
||||
syn match vimOption contained "t_*7"
|
||||
syn match vimOption contained "t_&8"
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_%i"
|
||||
syn match vimOption contained "t_&8"
|
||||
syn match vimOption contained "t_*7"
|
||||
syn match vimOption contained "t_@7"
|
||||
syn match vimOption contained "t_k;"
|
||||
|
||||
" unsupported settings: some were supported by vi but don't do anything in vim {{{2
|
||||
@@ -76,10 +77,10 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan2 buflisted bufwinid byteidxcomp char2nr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlID index inputrestore invert items job_start js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan test_alloc_fail test_garbagecollect_now test_null_job test_null_string timer_pause timer_stopall tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
|
||||
syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch browse bufloaded bufwinnr call ch_close ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synID synstack tabpagebuflist tagfiles tanh test_autochdir test_null_channel test_null_list test_settime timer_start tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true browsedir bufname byte2line ceil ch_close_in ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDattr system tabpagenr taglist tempname test_disable_char_avail test_null_dict test_null_partial timer_info timer_stop toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
|
||||
syn keyword vimFuncName contained and arglistid assert_exception assert_match atan bufexists bufnr byteidx changenr ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlexists indent inputlist insert isnan job_setoptions join
|
||||
syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan2 buflisted bufwinid byteidxcomp ch_close_in ch_getjob ch_open ch_sendraw char2nr complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlexists index inputrestore invert items job_start js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synID synconcealed systemlist tabpagewinnr tan test_alloc_fail test_garbagecollect_now test_null_job test_null_string timer_pause timer_stopall tr undofile values wildmenumode win_gotoid winbufnr winline winrestview wordcount
|
||||
syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch browse bufloaded bufwinnr call ch_evalexpr ch_info ch_read ch_setoptions cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synIDattr synstack tabpagebuflist tagfiles tanh test_autochdir test_null_channel test_null_list test_settime timer_start tolower trunc undotree virtcol win_findbuf win_id2tabwin wincol winnr winsaveview writefile
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true browsedir bufname byte2line ceil ch_evalraw ch_log ch_readraw ch_status clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDtrans system tabpagenr taglist tempname test_disable_char_avail test_null_dict test_null_partial timer_info timer_stop toupper type uniq visualmode win_getid win_id2win winheight winrestcmd winwidth xor
|
||||
syn keyword vimFuncName contained and arglistid assert_exception assert_match atan bufexists bufnr byteidx ch_close ch_getbufnr ch_logfile ch_sendexpr changenr col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlID indent inputlist insert isnan job_setoptions join
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -498,7 +499,7 @@ syn cluster vimFuncBodyList add=vimSynType
|
||||
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
|
||||
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
|
||||
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
|
||||
syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||
syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||
if has("conceal")
|
||||
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar
|
||||
syn match vimSynMtchCchar contained "\S"
|
||||
|
||||
@@ -61,8 +61,8 @@ NOTE : Les touches fl
|
||||
Ceci quitte l'éditeur SANS enregistrer les changements que vous avez
|
||||
faits.
|
||||
|
||||
3. Lorsque l'invite du shell vous sera présentée, tapez la commande qui
|
||||
vous a mené dans ce tutoriel. Cela pourrait être : vimtutor <Entrée>
|
||||
3. Revenez ici en tapant la commande qui vous a mené à ce tutoriel.
|
||||
Cela pourrait être : vimtutor <Entrée>
|
||||
|
||||
4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes
|
||||
1 à 3 pour sortir puis rentrer dans l'éditeur.
|
||||
@@ -154,7 +154,7 @@ NOTE : En avan
|
||||
!! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !!
|
||||
|
||||
1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q!
|
||||
Ou, si vous avez accès à un autre terminal, exécutez y les actions
|
||||
Ou, si vous avez accès à un autre terminal, exécutez-y les actions
|
||||
qui suivent.
|
||||
|
||||
2. À l'invite du shell, tapez cette commande : vim tutor <Entrée>
|
||||
@@ -704,7 +704,7 @@ NOTE : Si vous quittez Vim et le red
|
||||
3. Appuyez : . En bas de l'écran :'<,'> va apparaître.
|
||||
|
||||
4. Tapez w TEST , où TEST est un nom de fichier qui n'existe pas.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entrée>.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant d'appuyer sur <Entrée>.
|
||||
|
||||
5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST.
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le compl
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2016 Jul 02
|
||||
Last Change : 2016 Nov 08
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -61,8 +61,8 @@ NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisan
|
||||
Ceci quitte l'éditeur SANS enregistrer les changements que vous avez
|
||||
faits.
|
||||
|
||||
3. Lorsque l'invite du shell vous sera présentée, tapez la commande qui
|
||||
vous a mené dans ce tutoriel. Cela pourrait être : vimtutor <Entrée>
|
||||
3. Revenez ici en tapant la commande qui vous a mené à ce tutoriel.
|
||||
Cela pourrait être : vimtutor <Entrée>
|
||||
|
||||
4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes
|
||||
1 à 3 pour sortir puis rentrer dans l'éditeur.
|
||||
@@ -154,7 +154,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par
|
||||
!! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !!
|
||||
|
||||
1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q!
|
||||
Ou, si vous avez accès à un autre terminal, exécutez y les actions
|
||||
Ou, si vous avez accès à un autre terminal, exécutez-y les actions
|
||||
qui suivent.
|
||||
|
||||
2. À l'invite du shell, tapez cette commande : vim tutor <Entrée>
|
||||
@@ -704,7 +704,7 @@ NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST,
|
||||
3. Appuyez : . En bas de l'écran :'<,'> va apparaître.
|
||||
|
||||
4. Tapez w TEST , où TEST est un nom de fichier qui n'existe pas.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entrée>.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant d'appuyer sur <Entrée>.
|
||||
|
||||
5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST.
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2016 Jul 02
|
||||
Last Change : 2016 Nov 08
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+2
-2
@@ -221,8 +221,8 @@ diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
The file `configure.ac' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.ac' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>113</string>
|
||||
<string>117</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
+40
-1
@@ -198,6 +198,9 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
#ifdef FEAT_BEVAL
|
||||
- (void)bevalCallback:(id)sender;
|
||||
#endif
|
||||
#ifdef MESSAGE_QUEUE
|
||||
- (void)checkForProcessEvents:(NSTimer *)timer;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
||||
@@ -679,13 +682,26 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
|
||||
// Only start the run loop if the input queue is empty, otherwise process
|
||||
// the input first so that the input on queue isn't delayed.
|
||||
if ([inputQueue count]) {
|
||||
if ([inputQueue count] || input_available()) {
|
||||
inputReceived = YES;
|
||||
} else {
|
||||
// Wait for the specified amount of time, unless 'milliseconds' is
|
||||
// negative in which case we wait "forever" (1e6 seconds translates to
|
||||
// approximately 11 days).
|
||||
CFTimeInterval dt = (milliseconds >= 0 ? .001*milliseconds : 1e6);
|
||||
NSTimer *timer = nil;
|
||||
|
||||
// Set interval timer which checks for the events of job and channel
|
||||
// when there is any pending job or channel.
|
||||
if (dt > 0.1 && (has_any_channel() || has_pending_job())) {
|
||||
timer = [NSTimer scheduledTimerWithTimeInterval:0.1
|
||||
target:self
|
||||
selector:@selector(checkForProcessEvents:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
[[NSRunLoop currentRunLoop] addTimer:timer
|
||||
forMode:NSDefaultRunLoopMode];
|
||||
}
|
||||
|
||||
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, dt, true)
|
||||
== kCFRunLoopRunHandledSource) {
|
||||
@@ -695,6 +711,11 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
dt = 0.0;
|
||||
inputReceived = YES;
|
||||
}
|
||||
|
||||
if (input_available())
|
||||
inputReceived = YES;
|
||||
|
||||
[timer invalidate];
|
||||
}
|
||||
|
||||
// The above calls may have placed messages on the input queue so process
|
||||
@@ -3004,6 +3025,24 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MESSAGE_QUEUE
|
||||
- (void)checkForProcessEvents:(NSTimer *)timer
|
||||
{
|
||||
# ifdef FEAT_TIMERS
|
||||
did_add_timer = FALSE;
|
||||
# endif
|
||||
|
||||
parse_queued_messages();
|
||||
|
||||
if (input_available()
|
||||
# ifdef FEAT_TIMERS
|
||||
|| did_add_timer
|
||||
# endif
|
||||
)
|
||||
CFRunLoopStop(CFRunLoopGetCurrent());
|
||||
}
|
||||
#endif
|
||||
|
||||
@end // MMBackend (Private)
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
CGPoint *positions;
|
||||
NSMutableArray *fontCache;
|
||||
|
||||
BOOL cgLayerEnabled;
|
||||
CGLayerRef cgLayer;
|
||||
CGContextRef cgLayerContext;
|
||||
|
||||
// These are used in MMCoreTextView+ToolTip.m
|
||||
id trackingRectOwner_; // (not retained)
|
||||
void *trackingRectUserData_;
|
||||
@@ -85,6 +89,7 @@
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
- (NSRect)rectForRow:(int)row column:(int)column numRows:(int)nr
|
||||
numColumns:(int)nc;
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled;
|
||||
|
||||
//
|
||||
// NSTextView methods
|
||||
|
||||
+100
-14
@@ -592,6 +592,27 @@ defaultAdvanceForFont(NSFont *font)
|
||||
[self batchDrawData:data];
|
||||
|
||||
[drawData removeAllObjects];
|
||||
|
||||
if (cgLayerEnabled) {
|
||||
// during a live resize, we will have around a stale layer until the
|
||||
// refresh messages travel back from the vim process. We push the old
|
||||
// layer in at an offset to get rid of jitter due to lines changing
|
||||
// position.
|
||||
CGLayerRef l = [self getCGLayer];
|
||||
CGSize cgLayerSize = CGLayerGetSize(l);
|
||||
CGSize frameSize = [self frame].size;
|
||||
NSRect drawRect = NSMakeRect(
|
||||
0,
|
||||
frameSize.height - cgLayerSize.height,
|
||||
cgLayerSize.width,
|
||||
cgLayerSize.height);
|
||||
|
||||
CGContextRef cgContext = [context graphicsPort];
|
||||
CGContextSaveGState(cgContext);
|
||||
CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
|
||||
CGContextDrawLayerInRect(cgContext, drawRect, l);
|
||||
CGContextRestoreGState(cgContext);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)performBatchDrawWithData:(NSData *)data
|
||||
@@ -605,6 +626,47 @@ defaultAdvanceForFont(NSFont *font)
|
||||
[self display];
|
||||
}
|
||||
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled
|
||||
{
|
||||
cgLayerEnabled = enabled;
|
||||
|
||||
if (!cgLayerEnabled)
|
||||
[self releaseCGLayer];
|
||||
}
|
||||
|
||||
- (void)releaseCGLayer
|
||||
{
|
||||
if (cgLayer) {
|
||||
CGLayerRelease(cgLayer);
|
||||
cgLayer = nil;
|
||||
cgLayerContext = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (CGLayerRef)getCGLayer
|
||||
{
|
||||
NSParameterAssert(cgLayerEnabled);
|
||||
if (!cgLayer) {
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
NSRect frame = [self frame];
|
||||
cgLayer = CGLayerCreateWithContext(
|
||||
[context graphicsPort], frame.size, NULL);
|
||||
}
|
||||
return cgLayer;
|
||||
}
|
||||
|
||||
- (CGContextRef)getCGContext
|
||||
{
|
||||
if (cgLayerEnabled) {
|
||||
if (!cgLayerContext)
|
||||
cgLayerContext = CGLayerGetContext([self getCGLayer]);
|
||||
return cgLayerContext;
|
||||
} else {
|
||||
return [[NSGraphicsContext currentContext] graphicsPort];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size
|
||||
{
|
||||
// TODO:
|
||||
@@ -852,7 +914,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
const void *end = bytes + [data length];
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
ASLogNotice(@"====> BEGIN %s", _cmd);
|
||||
ASLogNotice(@"====> BEGIN");
|
||||
#endif
|
||||
// TODO: Sanity check input
|
||||
|
||||
@@ -908,10 +970,18 @@ defaultAdvanceForFont(NSFont *font)
|
||||
column:col
|
||||
numRows:height
|
||||
numColumns:width];
|
||||
[signImg drawInRect:r
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
if (cgLayerEnabled) {
|
||||
CGContextRef context = [self getCGContext];
|
||||
CGImageRef cgImage = [signImg CGImageForProposedRect:&r
|
||||
context:nil
|
||||
hints:nil];
|
||||
CGContextDrawImage(context, r, cgImage);
|
||||
} else {
|
||||
[signImg drawInRect:r
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
}
|
||||
} else if (DrawStringDrawType == type) {
|
||||
int bg = *((int*)bytes); bytes += sizeof(int);
|
||||
int fg = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -1013,11 +1083,11 @@ defaultAdvanceForFont(NSFont *font)
|
||||
}
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
ASLogNotice(@"<==== END %s", _cmd);
|
||||
ASLogNotice(@"<==== END");
|
||||
#endif
|
||||
}
|
||||
|
||||
static CTFontRef
|
||||
static CTFontRef
|
||||
lookupFont(NSMutableArray *fontCache, const unichar *chars, UniCharCount count,
|
||||
CTFontRef currFontRef)
|
||||
{
|
||||
@@ -1294,7 +1364,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
withFlags:(int)flags foregroundColor:(int)fg
|
||||
backgroundColor:(int)bg specialColor:(int)sp
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect frame = [self bounds];
|
||||
float x = col*cellSize.width + insetSize.width;
|
||||
float y = frame.size.height - insetSize.height - (1+row)*cellSize.height;
|
||||
@@ -1412,8 +1482,23 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
|
||||
- (void)scrollRect:(NSRect)rect lineCount:(int)count
|
||||
{
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
if (cgLayerEnabled) {
|
||||
CGContextRef context = [self getCGContext];
|
||||
int yOffset = count * cellSize.height;
|
||||
NSRect clipRect = rect;
|
||||
clipRect.origin.y -= yOffset;
|
||||
|
||||
// draw self on top of self, offset so as to "scroll" lines vertically
|
||||
CGContextSaveGState(context);
|
||||
CGContextClipToRect(context, clipRect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
CGContextDrawLayerAtPoint(
|
||||
context, CGPointMake(0, -yOffset), [self getCGLayer]);
|
||||
CGContextRestoreGState(context);
|
||||
} else {
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)deleteLinesFromRow:(int)row lineCount:(int)count
|
||||
@@ -1455,7 +1540,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
- (void)clearBlockFromRow:(int)row1 column:(int)col1 toRow:(int)row2
|
||||
column:(int)col2 color:(int)color
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect rect = [self rectFromRow:row1 column:col1 toRow:row2 column:col2];
|
||||
|
||||
CGContextSetRGBFillColor(context, RED(color), GREEN(color), BLUE(color),
|
||||
@@ -1468,7 +1553,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
|
||||
- (void)clearAll
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
[self releaseCGLayer];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect rect = [self bounds];
|
||||
float r = [defaultBackgroundColor redComponent];
|
||||
float g = [defaultBackgroundColor greenComponent];
|
||||
@@ -1484,7 +1570,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent color:(int)color
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect rect = [self rectForRow:row column:col numRows:1 numColumns:1];
|
||||
|
||||
CGContextSaveGState(context);
|
||||
@@ -1533,7 +1619,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
numColumns:(int)ncols
|
||||
{
|
||||
// TODO: THIS CODE HAS NOT BEEN TESTED!
|
||||
CGContextRef cgctx = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef cgctx = [self getCGContext];
|
||||
CGContextSaveGState(cgctx);
|
||||
CGContextSetBlendMode(cgctx, kCGBlendModeDifference);
|
||||
CGContextSetRGBFillColor(cgctx, 1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
@@ -172,6 +172,8 @@ enum {
|
||||
oldPosition = [view frame].origin;
|
||||
|
||||
[view removeFromSuperviewWithoutNeedingDisplay];
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12)
|
||||
[[view textView] setCGLayerEnabled:YES];
|
||||
[[self contentView] addSubview:view];
|
||||
[self setInitialFirstResponder:[view textView]];
|
||||
|
||||
@@ -284,6 +286,9 @@ enum {
|
||||
[view setFrameOrigin:oldPosition];
|
||||
[self close];
|
||||
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12)
|
||||
[[view textView] setCGLayerEnabled:NO];
|
||||
|
||||
// Set the text view to initial first responder, otherwise the 'plus'
|
||||
// button on the tabline steals the first responder status.
|
||||
[target setInitialFirstResponder:[view textView]];
|
||||
|
||||
@@ -72,4 +72,5 @@
|
||||
// NOT IMPLEMENTED (only in Core Text renderer)
|
||||
- (void)deleteSign:(NSString *)signName;
|
||||
- (void)setToolTipAtMousePoint:(NSString *)string;
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled;
|
||||
@end
|
||||
|
||||
@@ -517,6 +517,11 @@
|
||||
// ONLY in Core Text!
|
||||
}
|
||||
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled
|
||||
{
|
||||
// ONLY in Core Text!
|
||||
}
|
||||
|
||||
- (BOOL)isOpaque
|
||||
{
|
||||
return NO;
|
||||
|
||||
@@ -969,7 +969,6 @@
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification
|
||||
{
|
||||
[[MMAppController sharedInstance] setMainMenu:[vimController mainMenu]];
|
||||
[vimController sendMessage:GotFocusMsgID data:nil];
|
||||
|
||||
if ([vimView textView]) {
|
||||
NSFontManager *fm = [NSFontManager sharedFontManager];
|
||||
@@ -977,7 +976,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidResignMain:(NSNotification *)notification
|
||||
- (void)windowDidBecomeKey:(NSNotificationCenter *)notification
|
||||
{
|
||||
[vimController sendMessage:GotFocusMsgID data:nil];
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[vimController sendMessage:LostFocusMsgID data:nil];
|
||||
}
|
||||
|
||||
+24
-5
@@ -30,13 +30,15 @@
|
||||
# define MAC_OS_X_VERSION_10_12 101200
|
||||
#endif
|
||||
|
||||
// Needed for pre-10.11 SDK
|
||||
#ifndef NSAppKitVersionNumber10_10
|
||||
# define NSAppKitVersionNumber10_10 1343
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber10_10_Max
|
||||
# define NSAppKitVersionNumber10_10_Max 1349
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber10_12
|
||||
# define NSAppKitVersionNumber10_12 1504
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
// Deprecated constants in 10.12 SDK
|
||||
@@ -70,8 +72,8 @@
|
||||
# define NSWindowStyleMaskUnifiedTitleAndToolbar NSUnifiedTitleAndToolbarWindowMask
|
||||
#endif
|
||||
|
||||
#import <asl.h>
|
||||
#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>
|
||||
@@ -425,9 +427,26 @@ void ASLInit();
|
||||
# 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]); \
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) { \
|
||||
os_log_with_type(OS_LOG_DEFAULT, level, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
[[NSString stringWithFormat:fmt, ##__VA_ARGS__] UTF8String]); \
|
||||
} else { \
|
||||
int logLevel; \
|
||||
switch (level) { \
|
||||
case OS_LOG_TYPE_FAULT: logLevel = ASL_LEVEL_CRIT; break; \
|
||||
case OS_LOG_TYPE_ERROR: logLevel = ASL_LEVEL_ERR; break; \
|
||||
case OS_LOG_TYPE_INFO: logLevel = ASL_LEVEL_INFO; break; \
|
||||
case OS_LOG_TYPE_DEBUG: logLevel = ASL_LEVEL_DEBUG; break; \
|
||||
default: logLevel = ASL_LEVEL_NOTICE; break; \
|
||||
} \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
|
||||
asl_log(NULL, NULL, logLevel, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
[[NSString stringWithFormat:fmt, ##__VA_ARGS__] UTF8String]); \
|
||||
_Pragma("clang diagnostic pop") \
|
||||
} \
|
||||
}
|
||||
|
||||
# define ASLogCrit(fmt, ...) ASLog(OS_LOG_TYPE_FAULT, fmt, ##__VA_ARGS__)
|
||||
|
||||
@@ -13,3 +13,25 @@ set backspace+=indent,eol,start
|
||||
" the entire MacVim menu is set up in a nib file which currently only is
|
||||
" translated to English).
|
||||
set langmenu=none
|
||||
|
||||
" Python2
|
||||
" MacVim uses Homebrew python2 if installed, otherwise configured one
|
||||
if exists("&pythondll") && exists("&pythonhome")
|
||||
if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
|
||||
" Homebrew python 2.7
|
||||
set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
|
||||
set pythonhome=/usr/local/Frameworks/Python.framework/Versions/2.7
|
||||
endif
|
||||
endif
|
||||
|
||||
" Python3
|
||||
" MacVim uses Homebrew python3 if installed, next try to use python.org binary
|
||||
if exists("&pythonthreedll") && exists("&pythonthreehome") &&
|
||||
\ !filereadable(&pythonthreedll)
|
||||
if filereadable("/Library/Frameworks/Python.framework/Versions/3.5/Python")
|
||||
" https://www.python.org/downloads/mac-osx/
|
||||
set pythonthreedll=/Library/Frameworks/Python.framework/Versions/3.5/Python
|
||||
set pythonthreehome=/Library/Frameworks/Python.framework/Versions/3.5
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -297,6 +297,9 @@ CPU = ix86
|
||||
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
|
||||
WP64CHECK = /Wp64
|
||||
|
||||
# Use multiprocess build
|
||||
USE_MP = yes
|
||||
|
||||
#>>>>> path of the compiler and linker; name of include and lib directories
|
||||
# PATH = c:\msvc20\bin;$(PATH)
|
||||
# INCLUDE = c:\msvc20\include
|
||||
@@ -473,6 +476,14 @@ NODEFAULTLIB =
|
||||
NODEFAULTLIB = /nodefaultlib
|
||||
!endif
|
||||
|
||||
# Use multiprocess build on MSVC 10
|
||||
!if "$(USE_MP)"=="yes"
|
||||
!if $(MSVC_MAJOR) >= 10
|
||||
CFLAGS = $(CFLAGS) /MP
|
||||
!endif
|
||||
!endif
|
||||
|
||||
|
||||
!ifdef NODEBUG
|
||||
VIM = vim
|
||||
!if "$(OPTIMIZE)" == "SPACE"
|
||||
|
||||
+43
-11
@@ -2,7 +2,7 @@
|
||||
# Makefile for Vim on OpenVMS
|
||||
#
|
||||
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
|
||||
# Last change: 2016 Jul 02
|
||||
# Last change: 2016 Nov 04
|
||||
#
|
||||
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
|
||||
# with MMS and MMK
|
||||
@@ -38,7 +38,7 @@ MODEL = HUGE
|
||||
# GUI or terminal mode executable.
|
||||
# Comment out if you want just the character terminal mode only.
|
||||
# GUI with Motif
|
||||
# GUI = YES
|
||||
GUI = YES
|
||||
|
||||
# GUI with GTK
|
||||
# If you have GTK installed you might want to enable this option.
|
||||
@@ -299,22 +299,22 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
|
||||
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
|
||||
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
|
||||
|
||||
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
|
||||
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
|
||||
hardcopy.c hashtab.c json.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
|
||||
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
|
||||
ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
|
||||
hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
|
||||
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
|
||||
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
|
||||
spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
|
||||
window.c os_unix.c os_vms.c pathdef.c \
|
||||
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
|
||||
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
|
||||
|
||||
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
|
||||
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
|
||||
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
|
||||
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
|
||||
evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
|
||||
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
|
||||
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
|
||||
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
|
||||
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
|
||||
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
|
||||
regexp.obj search.obj sha256.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
|
||||
ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
|
||||
os_vms.obj pathdef.obj if_mzsch.obj\
|
||||
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
|
||||
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
|
||||
@@ -496,6 +496,18 @@ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
@@ -512,6 +524,10 @@ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h version.h
|
||||
evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
@@ -569,6 +585,10 @@ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h version.h
|
||||
list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
@@ -653,10 +673,18 @@ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
@@ -681,6 +709,10 @@ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
|
||||
+10
-5
@@ -681,13 +681,17 @@ SANITIZER_LIBS = $(SANITIZER_CFLAGS)
|
||||
#LEAK_CFLAGS = -DEXITFREE
|
||||
#LEAK_LIBS = -lccmalloc
|
||||
|
||||
# Uncomment this line to have Vim call abort() when an internal error is
|
||||
# detected. Useful when using a tool to find errors.
|
||||
#ABORT_CLFAGS = -DABORT_ON_INTERNAL_ERROR
|
||||
|
||||
#####################################################
|
||||
### Specific systems, check if yours is listed! ### {{{
|
||||
#####################################################
|
||||
|
||||
### Uncomment things here only if the values chosen by configure are wrong.
|
||||
### It's better to adjust configure.in and "make autoconf", if you can!
|
||||
### Then send the required changes to configure.in to the bugs list.
|
||||
### It's better to adjust configure.ac and "make autoconf", if you can!
|
||||
### Then send the required changes to configure.ac to the bugs list.
|
||||
|
||||
### (1) BSD/OS 2.0.1, 2.1 or 3.0 using shared libraries
|
||||
###
|
||||
@@ -1426,7 +1430,7 @@ SHELL = /bin/sh
|
||||
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(EXTRA_DEFS)
|
||||
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS)
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(ABORT_CLFAGS) $(POST_DEFS)
|
||||
|
||||
# Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together
|
||||
# with "-E".
|
||||
@@ -1845,7 +1849,7 @@ reconfig: scratch clean
|
||||
# - DO NOT RUN autoconf MANUALLY! It will overwrite ./configure instead of
|
||||
# producing auto/configure.
|
||||
# - autoconf is not run automatically, because a patch usually changes both
|
||||
# configure.in and auto/configure but can't update the timestamps. People
|
||||
# configure.ac and auto/configure but can't update the timestamps. People
|
||||
# who do not have (the correct version of) autoconf would run into trouble.
|
||||
#
|
||||
# Two tricks are required to make autoconf put its output in the "auto" dir:
|
||||
@@ -2042,7 +2046,6 @@ run_message_test: $(MESSAGE_TEST_TARGET)
|
||||
test1 \
|
||||
test_autocmd_option \
|
||||
test_autoformat_join \
|
||||
test_breakindent \
|
||||
test_changelist \
|
||||
test_close_count \
|
||||
test_comparators \
|
||||
@@ -2077,6 +2080,7 @@ test_arglist \
|
||||
test_autochdir \
|
||||
test_autocmd \
|
||||
test_backspace_opt \
|
||||
test_breakindent \
|
||||
test_bufwintabinfo \
|
||||
test_cdo \
|
||||
test_channel \
|
||||
@@ -2110,6 +2114,7 @@ test_arglist \
|
||||
test_gui \
|
||||
test_hardcopy \
|
||||
test_help_tagjump \
|
||||
test_hide \
|
||||
test_history \
|
||||
test_hlsearch \
|
||||
test_increment \
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ typedef union {
|
||||
/* MS-Windows is always little endian */
|
||||
#else
|
||||
# ifdef HAVE_CONFIG_H
|
||||
/* in configure.in AC_C_BIGENDIAN() defines WORDS_BIGENDIAN when needed */
|
||||
/* in configure.ac AC_C_BIGENDIAN() defines WORDS_BIGENDIAN when needed */
|
||||
# else
|
||||
error!
|
||||
Please change this code to define WORDS_BIGENDIAN for big-endian machines.
|
||||
@@ -426,7 +426,7 @@ bf_key_init(
|
||||
keylen = (int)STRLEN(key) / 2;
|
||||
if (keylen == 0)
|
||||
{
|
||||
EMSG(_("E831: bf_key_init() called with empty password"));
|
||||
IEMSG(_("E831: bf_key_init() called with empty password"));
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < keylen; i++)
|
||||
|
||||
+7
-6
@@ -451,7 +451,7 @@ close_buffer(
|
||||
int nwindows;
|
||||
bufref_T bufref;
|
||||
# ifdef FEAT_WINDOWS
|
||||
int is_curwin = (curwin!= NULL && curwin->w_buffer == buf);
|
||||
int is_curwin = (curwin != NULL && curwin->w_buffer == buf);
|
||||
win_T *the_curwin = curwin;
|
||||
tabpage_T *the_curtab = curtab;
|
||||
# endif
|
||||
@@ -1416,7 +1416,7 @@ do_buffer(
|
||||
# ifdef FEAT_AUTOCMD
|
||||
&& !(curwin->w_closing || curwin->w_buffer->b_locked > 0)
|
||||
# endif
|
||||
&& (firstwin != lastwin || first_tabpage->tp_next != NULL))
|
||||
&& (!ONE_WINDOW || first_tabpage->tp_next != NULL))
|
||||
{
|
||||
if (win_close(curwin, FALSE) == FAIL)
|
||||
break;
|
||||
@@ -1653,10 +1653,11 @@ set_curbuf(buf_T *buf, int action)
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf)
|
||||
# ifdef FEAT_EVAL
|
||||
|| (bufref_valid(&bufref) && !aborting()))
|
||||
|| (bufref_valid(&bufref) && !aborting())
|
||||
# else
|
||||
|| bufref_valid(&bufref))
|
||||
|| bufref_valid(&bufref)
|
||||
# endif
|
||||
)
|
||||
#endif
|
||||
{
|
||||
#ifdef FEAT_SYN_HL
|
||||
@@ -4944,7 +4945,7 @@ do_arg_all(
|
||||
}
|
||||
#ifdef FEAT_WINDOWS
|
||||
/* don't close last window */
|
||||
if (firstwin == lastwin
|
||||
if (ONE_WINDOW
|
||||
&& (first_tabpage->tp_next == NULL || !had_tab))
|
||||
#endif
|
||||
use_firstwin = TRUE;
|
||||
@@ -5149,7 +5150,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
: wp->w_width != Columns)
|
||||
|| (had_tab > 0 && wp != firstwin)
|
||||
#endif
|
||||
) && firstwin != lastwin
|
||||
) && !ONE_WINDOW
|
||||
#ifdef FEAT_AUTOCMD
|
||||
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)
|
||||
#endif
|
||||
|
||||
+139
-60
@@ -19,7 +19,7 @@
|
||||
# define CH_HAS_GUI (gui.in_use || gui.starting)
|
||||
#endif
|
||||
|
||||
/* Note: when making changes here also adjust configure.in. */
|
||||
/* Note: when making changes here also adjust configure.ac. */
|
||||
#ifdef WIN32
|
||||
/* WinSock API is separated from C API, thus we can't use read(), write(),
|
||||
* errno... */
|
||||
@@ -1362,7 +1362,7 @@ write_buf_line(buf_T *buf, linenr_T lnum, channel_T *channel)
|
||||
|
||||
p[len] = NL;
|
||||
p[len + 1] = NUL;
|
||||
channel_send(channel, PART_IN, p, len + 1, "write_buf_line()");
|
||||
channel_send(channel, PART_IN, p, len + 1, "write_buf_line");
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
@@ -2624,7 +2624,7 @@ channel_is_open(channel_T *channel)
|
||||
/*
|
||||
* Return TRUE if "channel" has JSON or other typeahead.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
channel_has_readahead(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
ch_mode_T ch_mode = channel->ch_part[part].ch_mode;
|
||||
@@ -3475,7 +3475,12 @@ channel_handle_events(void)
|
||||
* Return FAIL or OK.
|
||||
*/
|
||||
int
|
||||
channel_send(channel_T *channel, ch_part_T 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;
|
||||
@@ -3835,6 +3840,11 @@ channel_parse_messages(void)
|
||||
int ret = FALSE;
|
||||
int r;
|
||||
ch_part_T part = PART_SOCK;
|
||||
#ifdef ELAPSED_FUNC
|
||||
ELAPSED_TYPE start_tv;
|
||||
|
||||
ELAPSED_INIT(start_tv);
|
||||
#endif
|
||||
|
||||
++safe_to_invoke_callback;
|
||||
|
||||
@@ -3879,7 +3889,14 @@ channel_parse_messages(void)
|
||||
r = may_invoke_callback(channel, part);
|
||||
if (r == OK)
|
||||
ret = TRUE;
|
||||
if (channel_unref(channel) || r == OK)
|
||||
if (channel_unref(channel) || (r == OK
|
||||
#ifdef ELAPSED_FUNC
|
||||
/* Limit the time we loop here to 100 msec, otherwise
|
||||
* Vim becomes unresponsive when the callback takes
|
||||
* more than a bit of time. */
|
||||
&& ELAPSED_FUNC(start_tv) < 100L
|
||||
#endif
|
||||
))
|
||||
{
|
||||
/* channel was freed or something was done, start over */
|
||||
channel = first_channel;
|
||||
@@ -3907,6 +3924,31 @@ channel_parse_messages(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if any channel has readahead. That means we should not block on
|
||||
* waiting for input.
|
||||
*/
|
||||
int
|
||||
channel_any_readahead(void)
|
||||
{
|
||||
channel_T *channel = first_channel;
|
||||
ch_part_T part = PART_SOCK;
|
||||
|
||||
while (channel != NULL)
|
||||
{
|
||||
if (channel_has_readahead(channel, part))
|
||||
return TRUE;
|
||||
if (part < PART_ERR)
|
||||
++part;
|
||||
else
|
||||
{
|
||||
channel = channel->ch_next;
|
||||
part = PART_SOCK;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark references to lists used in channels.
|
||||
*/
|
||||
@@ -4453,19 +4495,66 @@ job_free(job_T *job)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(EXITFREE) || defined(PROTO)
|
||||
void
|
||||
job_free_all(void)
|
||||
{
|
||||
while (first_job != NULL)
|
||||
job_free(first_job);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if we need to check if the process of "job" has ended.
|
||||
*/
|
||||
static int
|
||||
job_need_end_check(job_T *job)
|
||||
{
|
||||
return job->jv_status == JOB_STARTED
|
||||
&& (job->jv_stoponexit != NULL || job->jv_exit_cb != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if the channel of "job" is still useful.
|
||||
*/
|
||||
static int
|
||||
job_channel_still_useful(job_T *job)
|
||||
{
|
||||
return job->jv_channel != NULL && channel_still_useful(job->jv_channel);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if the job should not be freed yet. Do not free the job when
|
||||
* it has not ended yet and there is a "stoponexit" flag, an exit callback
|
||||
* or when the associated channel will do something with the job output.
|
||||
*/
|
||||
static int
|
||||
job_still_useful(job_T *job)
|
||||
{
|
||||
return job_need_end_check(job) || job_channel_still_useful(job);
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: Must call job_cleanup() only once right after the status of "job"
|
||||
* changed to JOB_ENDED (i.e. after job_status() returned "dead" first or
|
||||
* mch_detect_ended_job() returned non-NULL).
|
||||
*/
|
||||
static void
|
||||
job_cleanup(job_T *job)
|
||||
{
|
||||
if (job->jv_status != JOB_ENDED)
|
||||
return;
|
||||
|
||||
/* Ready to cleanup the job. */
|
||||
job->jv_status = JOB_FINISHED;
|
||||
|
||||
if (job->jv_exit_cb != NULL)
|
||||
{
|
||||
typval_T argv[3];
|
||||
typval_T rettv;
|
||||
int dummy;
|
||||
|
||||
/* invoke the exit callback; make sure the refcount is > 0 */
|
||||
/* Invoke the exit callback. Make sure the refcount is > 0. */
|
||||
++job->jv_refcount;
|
||||
argv[0].v_type = VAR_JOB;
|
||||
argv[0].vval.v_job = job;
|
||||
@@ -4478,42 +4567,18 @@ job_cleanup(job_T *job)
|
||||
--job->jv_refcount;
|
||||
channel_need_redraw = TRUE;
|
||||
}
|
||||
if (job->jv_refcount == 0)
|
||||
|
||||
/* Do not free the job in case the close callback of the associated channel
|
||||
* isn't invoked yet and may get information by job_info(). */
|
||||
if (job->jv_refcount == 0 && !job_channel_still_useful(job))
|
||||
{
|
||||
/* The job was already unreferenced, now that it ended it can be
|
||||
* freed. Careful: caller must not use "job" after this! */
|
||||
/* The job was already unreferenced and the associated channel was
|
||||
* detached, now that it ended it can be freed. Careful: caller must
|
||||
* not use "job" after this! */
|
||||
job_free(job);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(EXITFREE) || defined(PROTO)
|
||||
void
|
||||
job_free_all(void)
|
||||
{
|
||||
while (first_job != NULL)
|
||||
job_free(first_job);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if the job should not be freed yet. Do not free the job when
|
||||
* it has not ended yet and there is a "stoponexit" flag, an exit callback
|
||||
* or when the associated channel will do something with the job output.
|
||||
*/
|
||||
static int
|
||||
job_still_useful(job_T *job)
|
||||
{
|
||||
return (job->jv_stoponexit != NULL || job->jv_exit_cb != NULL
|
||||
|| (job->jv_channel != NULL
|
||||
&& channel_still_useful(job->jv_channel)));
|
||||
}
|
||||
|
||||
static int
|
||||
job_still_alive(job_T *job)
|
||||
{
|
||||
return (job->jv_status == JOB_STARTED) && job_still_useful(job);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark references in jobs that are still useful.
|
||||
*/
|
||||
@@ -4525,7 +4590,7 @@ set_ref_in_job(int copyID)
|
||||
typval_T tv;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
if (job_still_alive(job))
|
||||
if (job_still_useful(job))
|
||||
{
|
||||
tv.v_type = VAR_JOB;
|
||||
tv.vval.v_job = job;
|
||||
@@ -4534,26 +4599,33 @@ set_ref_in_job(int copyID)
|
||||
return abort;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dereference "job". Note that after this "job" may have been freed.
|
||||
*/
|
||||
void
|
||||
job_unref(job_T *job)
|
||||
{
|
||||
if (job != NULL && --job->jv_refcount <= 0)
|
||||
{
|
||||
/* Do not free the job when it has not ended yet and there is a
|
||||
* "stoponexit" flag or an exit callback. */
|
||||
if (!job_still_alive(job))
|
||||
/* Do not free the job if there is a channel where the close callback
|
||||
* may get the job info. */
|
||||
if (!job_channel_still_useful(job))
|
||||
{
|
||||
job_free(job);
|
||||
}
|
||||
else if (job->jv_channel != NULL
|
||||
&& !channel_still_useful(job->jv_channel))
|
||||
{
|
||||
/* Do remove the link to the channel, otherwise it hangs
|
||||
* around until Vim exits. See job_free() for refcount. */
|
||||
ch_log(job->jv_channel, "detaching channel from job");
|
||||
job->jv_channel->ch_job = NULL;
|
||||
channel_unref(job->jv_channel);
|
||||
job->jv_channel = NULL;
|
||||
/* Do not free the job when it has not ended yet and there is a
|
||||
* "stoponexit" flag or an exit callback. */
|
||||
if (!job_need_end_check(job))
|
||||
{
|
||||
job_free(job);
|
||||
}
|
||||
else if (job->jv_channel != NULL)
|
||||
{
|
||||
/* Do remove the link to the channel, otherwise it hangs
|
||||
* around until Vim exits. See job_free() for refcount. */
|
||||
ch_log(job->jv_channel, "detaching channel from job");
|
||||
job->jv_channel->ch_job = NULL;
|
||||
channel_unref(job->jv_channel);
|
||||
job->jv_channel = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4566,7 +4638,7 @@ free_unused_jobs_contents(int copyID, int mask)
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
if ((job->jv_copyID & mask) != (copyID & mask)
|
||||
&& !job_still_alive(job))
|
||||
&& !job_still_useful(job))
|
||||
{
|
||||
/* Free the channel and ordinary items it contains, but don't
|
||||
* recurse into Lists, Dictionaries etc. */
|
||||
@@ -4586,7 +4658,7 @@ free_unused_jobs(int copyID, int mask)
|
||||
{
|
||||
job_next = job->jv_next;
|
||||
if ((job->jv_copyID & mask) != (copyID & mask)
|
||||
&& !job_still_alive(job))
|
||||
&& !job_still_useful(job))
|
||||
{
|
||||
/* Free the job struct itself. */
|
||||
job_free_job(job);
|
||||
@@ -4668,8 +4740,8 @@ job_stop_on_exit(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when there is any job that might exit, which means
|
||||
* job_check_ended() should be called once in a while.
|
||||
* Return TRUE when there is any job that has an exit callback and might exit,
|
||||
* which means job_check_ended() should be called more often.
|
||||
*/
|
||||
int
|
||||
has_pending_job(void)
|
||||
@@ -4677,7 +4749,10 @@ has_pending_job(void)
|
||||
job_T *job;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
if (job_still_alive(job))
|
||||
/* Only should check if the channel has been closed, if the channel is
|
||||
* open the job won't exit. */
|
||||
if (job->jv_status == JOB_STARTED && job->jv_exit_cb != NULL
|
||||
&& !job_channel_still_useful(job))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4692,14 +4767,18 @@ job_check_ended(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (first_job == NULL)
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_CHECK_ENDED; ++i)
|
||||
{
|
||||
/* NOTE: mch_detect_ended_job() must only return a job of which the
|
||||
* status was just set to JOB_ENDED. */
|
||||
job_T *job = mch_detect_ended_job(first_job);
|
||||
|
||||
if (job == NULL)
|
||||
break;
|
||||
if (job_still_useful(job))
|
||||
job_cleanup(job); /* may free "job" */
|
||||
job_cleanup(job); /* may free "job" */
|
||||
}
|
||||
|
||||
if (channel_need_redraw)
|
||||
@@ -4913,7 +4992,7 @@ job_status(job_T *job)
|
||||
{
|
||||
char *result;
|
||||
|
||||
if (job->jv_status == JOB_ENDED)
|
||||
if (job->jv_status >= JOB_ENDED)
|
||||
/* No need to check, dead is dead. */
|
||||
result = "dead";
|
||||
else if (job->jv_status == JOB_FAILED)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* config.h.in. Generated automatically from configure.in by autoheader, and
|
||||
* manually changed after that.
|
||||
* config.h.in. Originally generated automatically from configure.ac by
|
||||
* autoheader and manually changed after that.
|
||||
*/
|
||||
|
||||
/* Define if we have EBCDIC code */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dnl configure.in: autoconf script for Vim
|
||||
dnl configure.ac: autoconf script for Vim
|
||||
|
||||
dnl Process this file with autoconf 2.12 or 2.13 to produce "configure".
|
||||
dnl Should also work with autoconf 2.54 and later.
|
||||
+1
-1
@@ -214,7 +214,7 @@ dictitem_remove(dict_T *dict, dictitem_T *item)
|
||||
|
||||
hi = hash_find(&dict->dv_hashtab, item->di_key);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
EMSG2(_(e_intern2), "dictitem_remove()");
|
||||
internal_error("dictitem_remove()");
|
||||
else
|
||||
hash_remove(&dict->dv_hashtab, hi);
|
||||
dictitem_free(item);
|
||||
|
||||
@@ -1312,6 +1312,7 @@ static digr_T digraphdefault[] =
|
||||
{'/', '-', 0x2020},
|
||||
{'/', '=', 0x2021},
|
||||
{'.', '.', 0x2025},
|
||||
{',', '.', 0x2026},
|
||||
{'%', '0', 0x2030},
|
||||
{'1', '\'', 0x2032},
|
||||
{'2', '\'', 0x2033},
|
||||
|
||||
+2
-2
@@ -2308,7 +2308,7 @@ vim_is_ctrl_x_key(int c)
|
||||
case CTRL_X_EVAL:
|
||||
return (c == Ctrl_P || c == Ctrl_N);
|
||||
}
|
||||
EMSG(_(e_internal));
|
||||
internal_error("vim_is_ctrl_x_key()");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -5445,7 +5445,7 @@ ins_complete(int c, int enable_pum)
|
||||
}
|
||||
else
|
||||
{
|
||||
EMSG2(_(e_intern2), "ins_complete()");
|
||||
internal_error("ins_complete()");
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
||||
+21
-14
@@ -839,7 +839,7 @@ restore_vimvar(int idx, typval_T *save_tv)
|
||||
{
|
||||
hi = hash_find(&vimvarht, vimvars[idx].vv_di.di_key);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
EMSG2(_(e_intern2), "restore_vimvar()");
|
||||
internal_error("restore_vimvar()");
|
||||
else
|
||||
hash_remove(&vimvarht, hi);
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ ex_let_vars(
|
||||
}
|
||||
else if (*arg != ',' && *arg != ']')
|
||||
{
|
||||
EMSG2(_(e_intern2), "ex_let_vars()");
|
||||
internal_error("ex_let_vars()");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -2830,7 +2830,7 @@ do_unlet(char_u *name, int forceit)
|
||||
}
|
||||
if (d == NULL)
|
||||
{
|
||||
EMSG2(_(e_intern2), "do_unlet()");
|
||||
internal_error("do_unlet()");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -4339,10 +4339,17 @@ eval7(
|
||||
* use its contents. */
|
||||
s = deref_func_name(s, &len, &partial, !evaluate);
|
||||
|
||||
/* Invoke the function. */
|
||||
ret = get_func_tv(s, len, rettv, arg,
|
||||
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
|
||||
&len, evaluate, partial, NULL);
|
||||
/* Need to make a copy, in case evaluating the arguments makes
|
||||
* the name invalid. */
|
||||
s = vim_strsave(s);
|
||||
if (s == NULL)
|
||||
ret = FAIL;
|
||||
else
|
||||
/* Invoke the function. */
|
||||
ret = get_func_tv(s, len, rettv, arg,
|
||||
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
|
||||
&len, evaluate, partial, NULL);
|
||||
vim_free(s);
|
||||
|
||||
/* If evaluate is FALSE rettv->v_type was not set in
|
||||
* get_func_tv, but it's needed in handle_subscript() to parse
|
||||
@@ -5678,7 +5685,7 @@ get_var_special_name(int nr)
|
||||
case VVAL_NONE: return "v:none";
|
||||
case VVAL_NULL: return "v:null";
|
||||
}
|
||||
EMSG2(_(e_intern2), "get_var_special_name()");
|
||||
internal_error("get_var_special_name()");
|
||||
return "42";
|
||||
}
|
||||
|
||||
@@ -7152,7 +7159,7 @@ get_tv_number_chk(typval_T *varp, int *denote)
|
||||
break;
|
||||
#endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "get_tv_number(UNKNOWN)");
|
||||
internal_error("get_tv_number(UNKNOWN)");
|
||||
break;
|
||||
}
|
||||
if (denote == NULL) /* useful for values that must be unsigned */
|
||||
@@ -7199,7 +7206,7 @@ get_tv_float(typval_T *varp)
|
||||
break;
|
||||
# endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "get_tv_float(UNKNOWN)");
|
||||
internal_error("get_tv_float(UNKNOWN)");
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
@@ -7283,7 +7290,7 @@ get_tv_string_buf_chk(typval_T *varp, char_u *buf)
|
||||
if (job == NULL)
|
||||
return (char_u *)"no process";
|
||||
status = job->jv_status == JOB_FAILED ? "fail"
|
||||
: job->jv_status == JOB_ENDED ? "dead"
|
||||
: job->jv_status >= JOB_ENDED ? "dead"
|
||||
: "run";
|
||||
# ifdef UNIX
|
||||
vim_snprintf((char *)buf, NUMBUFLEN,
|
||||
@@ -7733,7 +7740,7 @@ set_var(
|
||||
return;
|
||||
}
|
||||
else if (v->di_tv.v_type != tv->v_type)
|
||||
EMSG2(_(e_intern2), "set_var()");
|
||||
internal_error("set_var()");
|
||||
}
|
||||
|
||||
clear_tv(&v->di_tv);
|
||||
@@ -7962,7 +7969,7 @@ copy_tv(typval_T *from, typval_T *to)
|
||||
}
|
||||
break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "copy_tv(UNKNOWN)");
|
||||
internal_error("copy_tv(UNKNOWN)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -8036,7 +8043,7 @@ item_copy(
|
||||
ret = FAIL;
|
||||
break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "item_copy(UNKNOWN)");
|
||||
internal_error("item_copy(UNKNOWN)");
|
||||
ret = FAIL;
|
||||
}
|
||||
--recurse;
|
||||
|
||||
+23
-2
@@ -76,6 +76,7 @@ static void f_call(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ceil(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
static void f_ch_canread(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ch_close(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ch_close_in(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ch_evalexpr(typval_T *argvars, typval_T *rettv);
|
||||
@@ -499,6 +500,7 @@ static struct fst
|
||||
{"ceil", 1, 1, f_ceil},
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
{"ch_canread", 1, 1, f_ch_canread},
|
||||
{"ch_close", 1, 1, f_ch_close},
|
||||
{"ch_close_in", 1, 1, f_ch_close_in},
|
||||
{"ch_evalexpr", 2, 3, f_ch_evalexpr},
|
||||
@@ -1778,6 +1780,21 @@ f_ceil(typval_T *argvars, typval_T *rettv)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
/*
|
||||
* "ch_canread()" function
|
||||
*/
|
||||
static void
|
||||
f_ch_canread(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], TRUE, TRUE, 0);
|
||||
|
||||
rettv->vval.v_number = 0;
|
||||
if (channel != NULL)
|
||||
rettv->vval.v_number = channel_has_readahead(channel, PART_SOCK)
|
||||
|| channel_has_readahead(channel, PART_OUT)
|
||||
|| channel_has_readahead(channel, PART_ERR);
|
||||
}
|
||||
|
||||
/*
|
||||
* "ch_close()" function
|
||||
*/
|
||||
@@ -2644,7 +2661,7 @@ f_empty(typval_T *argvars, typval_T *rettv)
|
||||
break;
|
||||
#endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "f_empty(UNKNOWN)");
|
||||
internal_error("f_empty(UNKNOWN)");
|
||||
n = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -5978,6 +5995,10 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
else if (STRICMP(name, "vim_starting") == 0)
|
||||
n = (starting != 0);
|
||||
else if (STRICMP(name, "ttyin") == 0)
|
||||
n = mch_input_isatty();
|
||||
else if (STRICMP(name, "ttyout") == 0)
|
||||
n = stdout_isatty;
|
||||
#ifdef FEAT_MBYTE
|
||||
else if (STRICMP(name, "multi_byte_encoding") == 0)
|
||||
n = has_mbyte;
|
||||
@@ -12722,7 +12743,7 @@ f_type(typval_T *argvars, typval_T *rettv)
|
||||
case VAR_JOB: n = VAR_TYPE_JOB; break;
|
||||
case VAR_CHANNEL: n = VAR_TYPE_CHANNEL; break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "f_type(UNKNOWN)");
|
||||
internal_error("f_type(UNKNOWN)");
|
||||
n = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4577,7 +4577,7 @@ ex_z(exarg_T *eap)
|
||||
if (eap->forceit)
|
||||
bigness = curwin->w_height;
|
||||
#ifdef FEAT_WINDOWS
|
||||
else if (firstwin != lastwin)
|
||||
else if (!ONE_WINDOW)
|
||||
bigness = curwin->w_height - 3;
|
||||
#endif
|
||||
else
|
||||
|
||||
+5
-5
@@ -391,10 +391,10 @@ EX(CMD_cquit, "cquit", ex_cquit,
|
||||
EX(CMD_crewind, "crewind", ex_cc,
|
||||
RANGE|NOTADR|COUNT|TRLBAR|BANG,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cscope, "cscope", do_cscope,
|
||||
EX(CMD_cscope, "cscope", ex_cscope,
|
||||
EXTRA|NOTRLCOM|XFILE,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cstag, "cstag", do_cstag,
|
||||
EX(CMD_cstag, "cstag", ex_cstag,
|
||||
BANG|TRLBAR|WORD1,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cunmap, "cunmap", ex_unmap,
|
||||
@@ -623,7 +623,7 @@ EX(CMD_highlight, "highlight", ex_highlight,
|
||||
BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_hide, "hide", ex_hide,
|
||||
BANG|RANGE|NOTADR|COUNT|EXTRA|NOTRLCOM,
|
||||
BANG|RANGE|NOTADR|COUNT|EXTRA|TRLBAR,
|
||||
ADDR_WINDOWS),
|
||||
EX(CMD_history, "history", ex_history,
|
||||
EXTRA|TRLBAR|CMDWIN,
|
||||
@@ -745,7 +745,7 @@ EX(CMD_lchdir, "lchdir", ex_cd,
|
||||
EX(CMD_lclose, "lclose", ex_cclose,
|
||||
RANGE|NOTADR|COUNT|TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lcscope, "lcscope", do_cscope,
|
||||
EX(CMD_lcscope, "lcscope", ex_cscope,
|
||||
EXTRA|NOTRLCOM|XFILE,
|
||||
ADDR_LINES),
|
||||
EX(CMD_ldo, "ldo", ex_listdo,
|
||||
@@ -1255,7 +1255,7 @@ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
|
||||
EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
|
||||
WORD1|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_scscope, "scscope", do_scscope,
|
||||
EX(CMD_scscope, "scscope", ex_scscope,
|
||||
EXTRA|NOTRLCOM,
|
||||
ADDR_LINES),
|
||||
EX(CMD_set, "set", ex_set,
|
||||
|
||||
+32
-39
@@ -245,9 +245,9 @@ static void ex_popup(exarg_T *eap);
|
||||
# define ex_helpfind ex_ni
|
||||
#endif
|
||||
#ifndef FEAT_CSCOPE
|
||||
# define do_cscope ex_ni
|
||||
# define do_scscope ex_ni
|
||||
# define do_cstag ex_ni
|
||||
# define ex_cscope ex_ni
|
||||
# define ex_scscope ex_ni
|
||||
# define ex_cstag ex_ni
|
||||
#endif
|
||||
#ifndef FEAT_SYN_HL
|
||||
# define ex_syntax ex_ni
|
||||
@@ -1395,8 +1395,6 @@ do_cmdline(
|
||||
break;
|
||||
case ET_INTERRUPT:
|
||||
break;
|
||||
default:
|
||||
p = vim_strsave((char_u *)_(e_internal));
|
||||
}
|
||||
|
||||
saved_sourcing_name = sourcing_name;
|
||||
@@ -5651,15 +5649,16 @@ find_nextcmd(char_u *p)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check if *p is a separator between Ex commands.
|
||||
* Return NULL if it isn't, (p + 1) if it is.
|
||||
* Check if *p is a separator between Ex commands, skipping over white space.
|
||||
* Return NULL if it isn't, the following character if it is.
|
||||
*/
|
||||
char_u *
|
||||
check_nextcmd(char_u *p)
|
||||
{
|
||||
p = skipwhite(p);
|
||||
if (*p == '|' || *p == '\n')
|
||||
return (p + 1);
|
||||
char_u *s = skipwhite(p);
|
||||
|
||||
if (*s == '|' || *s == '\n')
|
||||
return (s + 1);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -7256,7 +7255,7 @@ ex_quit(exarg_T *eap)
|
||||
* :h|wincmd w|1q - don't quit
|
||||
* :h|wincmd w|q - quit
|
||||
*/
|
||||
if (only_one_window() && (firstwin == lastwin || eap->addr_count == 0))
|
||||
if (only_one_window() && (ONE_WINDOW || eap->addr_count == 0))
|
||||
#endif
|
||||
getout(0);
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -7505,9 +7504,9 @@ tabpage_close(int forceit)
|
||||
{
|
||||
/* First close all the windows but the current one. If that worked then
|
||||
* close the last window in this tab, that will close it. */
|
||||
if (lastwin != firstwin)
|
||||
if (!ONE_WINDOW)
|
||||
close_others(TRUE, forceit);
|
||||
if (lastwin == firstwin)
|
||||
if (ONE_WINDOW)
|
||||
ex_win_close(forceit, curwin, NULL);
|
||||
# ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
@@ -7591,38 +7590,32 @@ ex_all(exarg_T *eap)
|
||||
static void
|
||||
ex_hide(exarg_T *eap)
|
||||
{
|
||||
if (*eap->arg != NUL && check_nextcmd(eap->arg) == NULL)
|
||||
eap->errmsg = e_invarg;
|
||||
else
|
||||
{
|
||||
/* ":hide" or ":hide | cmd": hide current window */
|
||||
eap->nextcmd = check_nextcmd(eap->arg);
|
||||
/* ":hide" or ":hide | cmd": hide current window */
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (!eap->skip)
|
||||
{
|
||||
if (!eap->skip)
|
||||
{
|
||||
# ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
need_mouse_correct = TRUE;
|
||||
# endif
|
||||
if (eap->addr_count == 0)
|
||||
win_close(curwin, FALSE); /* don't free buffer */
|
||||
else
|
||||
{
|
||||
int winnr = 0;
|
||||
win_T *win;
|
||||
if (eap->addr_count == 0)
|
||||
win_close(curwin, FALSE); /* don't free buffer */
|
||||
else
|
||||
{
|
||||
int winnr = 0;
|
||||
win_T *win;
|
||||
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
winnr++;
|
||||
if (winnr == eap->line2)
|
||||
break;
|
||||
}
|
||||
if (win == NULL)
|
||||
win = lastwin;
|
||||
win_close(win, FALSE);
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
winnr++;
|
||||
if (winnr == eap->line2)
|
||||
break;
|
||||
}
|
||||
if (win == NULL)
|
||||
win = lastwin;
|
||||
win_close(win, FALSE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -10456,7 +10449,7 @@ ex_tag_cmd(exarg_T *eap, char_u *name)
|
||||
#ifdef FEAT_CSCOPE
|
||||
if (p_cst && *eap->arg != NUL)
|
||||
{
|
||||
do_cstag(eap);
|
||||
ex_cstag(eap);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
+7
-7
@@ -16,7 +16,7 @@
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
|
||||
static void free_msglist(struct msglist *l);
|
||||
static int throw_exception(void *, int, char_u *);
|
||||
static int throw_exception(void *, except_type_T, char_u *);
|
||||
static char_u *get_end_emsg(struct condstack *cstack);
|
||||
|
||||
/*
|
||||
@@ -422,7 +422,7 @@ do_intthrow(struct condstack *cstack)
|
||||
char_u *
|
||||
get_exception_string(
|
||||
void *value,
|
||||
int type,
|
||||
except_type_T type,
|
||||
char_u *cmdname,
|
||||
int *should_free)
|
||||
{
|
||||
@@ -503,7 +503,7 @@ get_exception_string(
|
||||
* error exception.
|
||||
*/
|
||||
static int
|
||||
throw_exception(void *value, int type, char_u *cmdname)
|
||||
throw_exception(void *value, except_type_T type, char_u *cmdname)
|
||||
{
|
||||
except_T *excp;
|
||||
int should_free;
|
||||
@@ -595,7 +595,7 @@ discard_exception(except_T *excp, int was_finished)
|
||||
|
||||
if (excp == NULL)
|
||||
{
|
||||
EMSG(_(e_internal));
|
||||
internal_error("discard_exception()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -700,7 +700,7 @@ catch_exception(except_T *excp)
|
||||
finish_exception(except_T *excp)
|
||||
{
|
||||
if (excp != caught_stack)
|
||||
EMSG(_(e_internal));
|
||||
internal_error("finish_exception()");
|
||||
caught_stack = caught_stack->caught;
|
||||
if (caught_stack != NULL)
|
||||
{
|
||||
@@ -1603,7 +1603,7 @@ ex_catch(exarg_T *eap)
|
||||
* ":break", ":return", ":finish", error, interrupt, or another
|
||||
* exception. */
|
||||
if (cstack->cs_exception[cstack->cs_idx] != current_exception)
|
||||
EMSG(_(e_internal));
|
||||
internal_error("ex_catch()");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1737,7 +1737,7 @@ ex_finally(exarg_T *eap)
|
||||
* exception will be discarded. */
|
||||
if (did_throw && cstack->cs_exception[cstack->cs_idx]
|
||||
!= current_exception)
|
||||
EMSG(_(e_internal));
|
||||
internal_error("ex_finally()");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-4
@@ -250,7 +250,7 @@ add_buff(
|
||||
}
|
||||
else if (buf->bh_curr == NULL) /* buffer has already been read */
|
||||
{
|
||||
EMSG(_("E222: Add to read buffer"));
|
||||
IEMSG(_("E222: Add to read buffer"));
|
||||
return;
|
||||
}
|
||||
else if (buf->bh_index != 0)
|
||||
@@ -1321,11 +1321,11 @@ alloc_typebuf(void)
|
||||
free_typebuf(void)
|
||||
{
|
||||
if (typebuf.tb_buf == typebuf_init)
|
||||
EMSG2(_(e_intern2), "Free typebuf 1");
|
||||
internal_error("Free typebuf 1");
|
||||
else
|
||||
vim_free(typebuf.tb_buf);
|
||||
if (typebuf.tb_noremap == noremapbuf_init)
|
||||
EMSG2(_(e_intern2), "Free typebuf 2");
|
||||
internal_error("Free typebuf 2");
|
||||
else
|
||||
vim_free(typebuf.tb_noremap);
|
||||
}
|
||||
@@ -4868,7 +4868,7 @@ makemap(
|
||||
c1 = 'l';
|
||||
break;
|
||||
default:
|
||||
EMSG(_("E228: makemap: Illegal mode"));
|
||||
IEMSG(_("E228: makemap: Illegal mode"));
|
||||
return FAIL;
|
||||
}
|
||||
do /* do this twice if c2 is set, 3 times with c3 */
|
||||
|
||||
+5
-1
@@ -546,6 +546,7 @@ EXTERN int clip_unnamed_saved INIT(= 0);
|
||||
EXTERN win_T *firstwin; /* first window */
|
||||
EXTERN win_T *lastwin; /* last window */
|
||||
EXTERN win_T *prevwin INIT(= NULL); /* previous window */
|
||||
# define ONE_WINDOW (firstwin == lastwin)
|
||||
# define W_NEXT(wp) ((wp)->w_next)
|
||||
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
# define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
@@ -563,6 +564,7 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
|
||||
#else
|
||||
# define firstwin curwin
|
||||
# define lastwin curwin
|
||||
# define ONE_WINDOW 1
|
||||
# define W_NEXT(wp) NULL
|
||||
# define FOR_ALL_WINDOWS(wp) wp = curwin;
|
||||
# define FOR_ALL_TABPAGES(tp) for (;FALSE;)
|
||||
@@ -641,6 +643,8 @@ EXTERN int exiting INIT(= FALSE);
|
||||
EXTERN int really_exiting INIT(= FALSE);
|
||||
/* TRUE when we are sure to exit, e.g., after
|
||||
* a deadly signal */
|
||||
EXTERN int stdout_isatty INIT(= TRUE); /* is stdout a terminal? */
|
||||
|
||||
#if defined(FEAT_AUTOCHDIR)
|
||||
EXTERN int test_autochdir INIT(= FALSE);
|
||||
#endif
|
||||
@@ -1442,6 +1446,7 @@ EXTERN char_u e_font[] INIT(= N_("E235: Unknown font: %s"));
|
||||
EXTERN char_u e_fontwidth[] INIT(= N_("E236: Font \"%s\" is not fixed-width"));
|
||||
#endif
|
||||
EXTERN char_u e_internal[] INIT(= N_("E473: Internal error"));
|
||||
EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
|
||||
EXTERN char_u e_interr[] INIT(= N_("Interrupted"));
|
||||
EXTERN char_u e_invaddr[] INIT(= N_("E14: Invalid address"));
|
||||
EXTERN char_u e_invarg[] INIT(= N_("E474: Invalid argument"));
|
||||
@@ -1591,7 +1596,6 @@ EXTERN char_u e_invexprmsg[] INIT(= N_("E449: Invalid expression received"));
|
||||
EXTERN char_u e_guarded[] INIT(= N_("E463: Region is guarded, cannot modify"));
|
||||
EXTERN char_u e_nbreadonly[] INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
|
||||
#endif
|
||||
EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
|
||||
EXTERN char_u e_maxmempat[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
|
||||
EXTERN char_u e_emptybuf[] INIT(= N_("E749: empty buffer"));
|
||||
EXTERN char_u e_nobufnr[] INIT(= N_("E86: Buffer %ld does not exist"));
|
||||
|
||||
+12
-1
@@ -218,7 +218,7 @@ gui_mch_create_beval_area(
|
||||
|
||||
if (mesg != NULL && mesgCB != NULL)
|
||||
{
|
||||
EMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
IEMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1178,12 +1178,23 @@ drawBalloon(BalloonEval *beval)
|
||||
int y_offset = EVAL_OFFSET_Y;
|
||||
PangoLayout *layout;
|
||||
# ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(beval->balloonShell),
|
||||
gtk_widget_get_window(beval->balloonShell));
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
|
||||
screen_w = rect.width;
|
||||
screen_h = rect.height;
|
||||
# else
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = gtk_widget_get_screen(beval->target);
|
||||
gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
|
||||
screen_w = gdk_screen_get_width(screen);
|
||||
screen_h = gdk_screen_get_height(screen);
|
||||
# endif
|
||||
# else
|
||||
screen_w = gdk_screen_width();
|
||||
screen_h = gdk_screen_height();
|
||||
|
||||
@@ -1881,10 +1881,36 @@ gui_mch_show_popupmenu(vimmenu_T *menu)
|
||||
# endif
|
||||
# endif /* FEAT_XIM */
|
||||
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
{
|
||||
GdkEventButton trigger;
|
||||
|
||||
/* A pseudo event to have gtk_menu_popup_at_pointer() work. Since the
|
||||
* function calculates the popup menu position on the basis of the
|
||||
* actual pointer position when it is invoked, the fields x, y, x_root
|
||||
* and y_root are set to zero for convenience. */
|
||||
trigger.type = GDK_BUTTON_PRESS;
|
||||
trigger.window = gtk_widget_get_window(gui.drawarea);
|
||||
trigger.send_event = FALSE;
|
||||
trigger.time = gui.event_time;
|
||||
trigger.x = 0.0;
|
||||
trigger.y = 0.0;
|
||||
trigger.axes = NULL;
|
||||
trigger.state = 0;
|
||||
trigger.button = 3;
|
||||
trigger.device = NULL;
|
||||
trigger.x_root = 0.0;
|
||||
trigger.y_root = 0.0;
|
||||
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(menu->submenu_id),
|
||||
(GdkEvent *)&trigger);
|
||||
}
|
||||
#else
|
||||
gtk_menu_popup(GTK_MENU(menu->submenu_id),
|
||||
NULL, NULL,
|
||||
(GtkMenuPositionFunc)NULL, NULL,
|
||||
3U, gui.event_time);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to
|
||||
@@ -1942,10 +1968,55 @@ gui_make_popup(char_u *path_name, int mouse_pos)
|
||||
|
||||
if (menu != NULL && menu->submenu_id != NULL)
|
||||
{
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkWindow * const win = gtk_widget_get_window(gui.drawarea);
|
||||
GdkEventButton trigger;
|
||||
|
||||
/* A pseudo event to have gtk_menu_popup_at_*() functions work. Since
|
||||
* the position where the menu pops up is automatically adjusted by
|
||||
* the functions, none of the fields x, y, x_root and y_root has to be
|
||||
* set to a specific value here; therefore, they are set to zero for
|
||||
* convenience.*/
|
||||
trigger.type = GDK_BUTTON_PRESS;
|
||||
trigger.window = win;
|
||||
trigger.send_event = FALSE;
|
||||
trigger.time = GDK_CURRENT_TIME;
|
||||
trigger.x = 0.0;
|
||||
trigger.y = 0.0;
|
||||
trigger.axes = NULL;
|
||||
trigger.state = 0;
|
||||
trigger.button = 0;
|
||||
trigger.device = NULL;
|
||||
trigger.x_root = 0.0;
|
||||
trigger.y_root = 0.0;
|
||||
|
||||
if (mouse_pos)
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(menu->submenu_id),
|
||||
(GdkEvent *)&trigger);
|
||||
else
|
||||
{
|
||||
gint origin_x, origin_y;
|
||||
GdkRectangle rect = { 0, 0, 0, 0 };
|
||||
|
||||
gdk_window_get_origin(win, &origin_x, &origin_y);
|
||||
popup_menu_position_func(NULL, &rect.x, &rect.y, NULL, NULL);
|
||||
|
||||
rect.x -= origin_x;
|
||||
rect.y -= origin_y;
|
||||
|
||||
gtk_menu_popup_at_rect(GTK_MENU(menu->submenu_id),
|
||||
win,
|
||||
&rect,
|
||||
GDK_GRAVITY_SOUTH_EAST,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
(GdkEvent *)&trigger);
|
||||
}
|
||||
# else
|
||||
gtk_menu_popup(GTK_MENU(menu->submenu_id),
|
||||
NULL, NULL,
|
||||
&popup_menu_position_func, NULL,
|
||||
0U, (guint32)GDK_CURRENT_TIME);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+112
-2
@@ -3076,10 +3076,16 @@ drawarea_unrealize_cb(GtkWidget *widget UNUSED, gpointer data UNUSED)
|
||||
gui.blank_pointer = NULL;
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
static void
|
||||
drawarea_style_updated_cb(GtkWidget *widget UNUSED,
|
||||
gpointer data UNUSED)
|
||||
#else
|
||||
static void
|
||||
drawarea_style_set_cb(GtkWidget *widget UNUSED,
|
||||
GtkStyle *previous_style UNUSED,
|
||||
gpointer data UNUSED)
|
||||
#endif
|
||||
{
|
||||
gui_mch_new_colors();
|
||||
}
|
||||
@@ -3096,6 +3102,35 @@ drawarea_configure_event_cb(GtkWidget *widget,
|
||||
g_return_val_if_fail(event
|
||||
&& event->width >= 1 && event->height >= 1, TRUE);
|
||||
|
||||
# if GTK_CHECK_VERSION(3,22,2) && !GTK_CHECK_VERSION(3,22,4)
|
||||
/* As of 3.22.2, GdkWindows have started distributing configure events to
|
||||
* their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0).
|
||||
*
|
||||
* As can be seen from the implementation of move_native_children() and
|
||||
* configure_native_child() in gdkwindow.c, those functions actually
|
||||
* propagate configure events to every child, failing to distinguish
|
||||
* "native" one from non-native one.
|
||||
*
|
||||
* Naturally, configure events propagated to here like that are fallacious
|
||||
* and, as a matter of fact, they trigger a geometric collapse of
|
||||
* gui.drawarea in fullscreen and miximized modes.
|
||||
*
|
||||
* To filter out such nuisance events, we are making use of the fact that
|
||||
* the field send_event of such GdkEventConfigures is set to FALSE in
|
||||
* configure_native_child().
|
||||
*
|
||||
* Obviously, this is a terrible hack making GVim depend on GTK's
|
||||
* implementation details. Therefore, watch out any relevant internal
|
||||
* changes happening in GTK in the feature (sigh).
|
||||
*/
|
||||
/* Follow-up
|
||||
* After a few weeks later, the GdkWindow change mentioned above was
|
||||
* reverted (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=f70039cb9603a02d2369fec4038abf40a1711155).
|
||||
* The corresponding official release is 3.22.4. */
|
||||
if (event->send_event == FALSE)
|
||||
return TRUE;
|
||||
# endif
|
||||
|
||||
if (event->width == cur_width && event->height == cur_height)
|
||||
return TRUE;
|
||||
|
||||
@@ -3519,8 +3554,12 @@ on_tabline_menu(GtkWidget *widget, GdkEvent *event)
|
||||
/* If the event was generated for 3rd button popup the menu. */
|
||||
if (bevent->button == 3)
|
||||
{
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(widget), event);
|
||||
# else
|
||||
gtk_menu_popup(GTK_MENU(widget), NULL, NULL, NULL, NULL,
|
||||
bevent->button, bevent->time);
|
||||
# endif
|
||||
/* We handled the event. */
|
||||
return TRUE;
|
||||
}
|
||||
@@ -4116,6 +4155,9 @@ gui_mch_init(void)
|
||||
#endif
|
||||
|
||||
gui.drawarea = gtk_drawing_area_new();
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
gtk_widget_set_name(gui.drawarea, "vim-gui-drawarea");
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
gui.surface = NULL;
|
||||
gui.by_signal = FALSE;
|
||||
@@ -4167,8 +4209,13 @@ gui_mch_init(void)
|
||||
G_CALLBACK(drawarea_unrealize_cb), NULL);
|
||||
g_signal_connect(G_OBJECT(gui.drawarea), "configure-event",
|
||||
G_CALLBACK(drawarea_configure_event_cb), NULL);
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
g_signal_connect_after(G_OBJECT(gui.drawarea), "style-updated",
|
||||
G_CALLBACK(&drawarea_style_updated_cb), NULL);
|
||||
# else
|
||||
g_signal_connect_after(G_OBJECT(gui.drawarea), "style-set",
|
||||
G_CALLBACK(&drawarea_style_set_cb), NULL);
|
||||
# endif
|
||||
#else
|
||||
gtk_signal_connect(GTK_OBJECT(gui.drawarea), "realize",
|
||||
GTK_SIGNAL_FUNC(drawarea_realize_cb), NULL);
|
||||
@@ -4384,14 +4431,34 @@ set_cairo_source_rgba_from_color(cairo_t *cr, guicolor_T color)
|
||||
gui_mch_new_colors(void)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
# if !GTK_CHECK_VERSION(3,22,2)
|
||||
GdkWindow * const da_win = gtk_widget_get_window(gui.drawarea);
|
||||
# endif
|
||||
|
||||
if (gui.drawarea != NULL && gtk_widget_get_window(gui.drawarea) != NULL)
|
||||
#else
|
||||
if (gui.drawarea != NULL && gui.drawarea->window != NULL)
|
||||
#endif
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,4,0)
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
GtkStyleContext * const context
|
||||
= gtk_widget_get_style_context(gui.drawarea);
|
||||
GtkCssProvider * const provider = gtk_css_provider_new();
|
||||
gchar * const css = g_strdup_printf(
|
||||
"widget#vim-gui-drawarea {\n"
|
||||
" background-color: #%.2lx%.2lx%.2lx;\n"
|
||||
"}\n",
|
||||
(gui.back_pixel >> 16) & 0xff,
|
||||
(gui.back_pixel >> 8) & 0xff,
|
||||
gui.back_pixel & 0xff);
|
||||
|
||||
gtk_css_provider_load_from_data(provider, css, -1, NULL);
|
||||
gtk_style_context_add_provider(context,
|
||||
GTK_STYLE_PROVIDER(provider), G_MAXUINT);
|
||||
|
||||
g_free(css);
|
||||
g_object_unref(provider);
|
||||
#elif GTK_CHECK_VERSION(3,4,0) /* !GTK_CHECK_VERSION(3,22,2) */
|
||||
GdkRGBA rgba;
|
||||
|
||||
rgba = color_to_rgba(gui.back_pixel);
|
||||
@@ -4415,7 +4482,7 @@ gui_mch_new_colors(void)
|
||||
# else
|
||||
gdk_window_set_background(gui.drawarea->window, &color);
|
||||
# endif
|
||||
#endif /* !GTK_CHECK_VERSION(3,4,0) */
|
||||
#endif /* !GTK_CHECK_VERSION(3,22,2) */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4429,6 +4496,30 @@ form_configure_event(GtkWidget *widget UNUSED,
|
||||
{
|
||||
int usable_height = event->height;
|
||||
|
||||
#if GTK_CHECK_VERSION(3,22,2) && !GTK_CHECK_VERSION(3,22,4)
|
||||
/* As of 3.22.2, GdkWindows have started distributing configure events to
|
||||
* their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0).
|
||||
*
|
||||
* As can be seen from the implementation of move_native_children() and
|
||||
* configure_native_child() in gdkwindow.c, those functions actually
|
||||
* propagate configure events to every child, failing to distinguish
|
||||
* "native" one from non-native one.
|
||||
*
|
||||
* Naturally, configure events propagated to here like that are fallacious
|
||||
* and, as a matter of fact, they trigger a geometric collapse of
|
||||
* gui.formwin.
|
||||
*
|
||||
* To filter out such fallacious events, check if the given event is the
|
||||
* one that was sent out to the right place. Ignore it if not.
|
||||
*/
|
||||
/* Follow-up
|
||||
* After a few weeks later, the GdkWindow change mentioned above was
|
||||
* reverted (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=f70039cb9603a02d2369fec4038abf40a1711155).
|
||||
* The corresponding official release is 3.22.4. */
|
||||
if (event->window != gtk_widget_get_window(gui.formwin))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
/* When in a GtkPlug, we can't guarantee valid heights (as a round
|
||||
* no. of char-heights), so we have to manually sanitise them.
|
||||
* Widths seem to sort themselves out, don't ask me why.
|
||||
@@ -4890,6 +4981,16 @@ gui_mch_set_shellsize(int width, int height,
|
||||
gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(gui.mainwin),
|
||||
gtk_widget_get_window(gui.mainwin));
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
|
||||
*screen_w = rect.width;
|
||||
*screen_h = rect.height - p_ghr;
|
||||
# else
|
||||
GdkScreen* screen;
|
||||
|
||||
if (gui.mainwin != NULL && gtk_widget_has_screen(gui.mainwin))
|
||||
@@ -4899,6 +5000,7 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
|
||||
*screen_w = gdk_screen_get_width(screen);
|
||||
*screen_h = gdk_screen_get_height(screen) - p_ghr;
|
||||
# endif
|
||||
#else
|
||||
*screen_w = gdk_screen_width();
|
||||
/* Subtract 'guiheadroom' from the height to allow some room for the
|
||||
@@ -6626,11 +6728,15 @@ gui_mch_clear_block(int row1, int col1, int row2, int col2)
|
||||
};
|
||||
GdkWindow * const win = gtk_widget_get_window(gui.drawarea);
|
||||
cairo_t * const cr = cairo_create(gui.surface);
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# else
|
||||
cairo_pattern_t * const pat = gdk_window_get_background_pattern(win);
|
||||
if (pat != NULL)
|
||||
cairo_set_source(cr, pat);
|
||||
else
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# endif
|
||||
gdk_cairo_rectangle(cr, &rect);
|
||||
cairo_fill(cr);
|
||||
cairo_destroy(cr);
|
||||
@@ -6659,11 +6765,15 @@ gui_gtk_window_clear(GdkWindow *win)
|
||||
0, 0, gdk_window_get_width(win), gdk_window_get_height(win)
|
||||
};
|
||||
cairo_t * const cr = cairo_create(gui.surface);
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# else
|
||||
cairo_pattern_t * const pat = gdk_window_get_background_pattern(win);
|
||||
if (pat != NULL)
|
||||
cairo_set_source(cr, pat);
|
||||
else
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# endif
|
||||
gdk_cairo_rectangle(cr, &rect);
|
||||
cairo_fill(cr);
|
||||
cairo_destroy(cr);
|
||||
|
||||
+1
-1
@@ -8620,7 +8620,7 @@ gui_mch_create_beval_area(
|
||||
|
||||
if (mesg != NULL && mesgCB != NULL)
|
||||
{
|
||||
EMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
IEMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -590,7 +590,7 @@ hangul_automata2(char_u *buf, int_u *c)
|
||||
return AUTOMATA_CORRECT_NEW;
|
||||
|
||||
default:
|
||||
EMSG(_("E256: Hangul automata ERROR"));
|
||||
IEMSG(_("E256: Hangul automata ERROR"));
|
||||
break;
|
||||
}
|
||||
return AUTOMATA_ERROR; /* RrEeAaLlLlYy EeRrRrOoRr */
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ hash_add(hashtab_T *ht, char_u *key)
|
||||
hi = hash_lookup(ht, key, hash);
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
EMSG2(_(e_intern2), "hash_add()");
|
||||
internal_error("hash_add()");
|
||||
return FAIL;
|
||||
}
|
||||
return hash_add_item(ht, hi, key, hash);
|
||||
|
||||
+38
-101
@@ -201,8 +201,6 @@ set_context_in_cscope_cmd(
|
||||
#endif /* FEAT_CMDL_COMPL */
|
||||
|
||||
/*
|
||||
* PRIVATE: do_cscope_general
|
||||
*
|
||||
* Find the command, print help if invalid, and then call the corresponding
|
||||
* command function.
|
||||
*/
|
||||
@@ -242,31 +240,28 @@ do_cscope_general(
|
||||
}
|
||||
|
||||
/*
|
||||
* PUBLIC: do_cscope
|
||||
* Implementation of ":cscope" and ":lcscope"
|
||||
*/
|
||||
void
|
||||
do_cscope(exarg_T *eap)
|
||||
ex_cscope(exarg_T *eap)
|
||||
{
|
||||
do_cscope_general(eap, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* PUBLIC: do_scscope
|
||||
*
|
||||
* same as do_cscope, but splits window, too.
|
||||
* Implementation of ":scscope". Same as ex_cscope(), but splits window, too.
|
||||
*/
|
||||
void
|
||||
do_scscope(exarg_T *eap)
|
||||
ex_scscope(exarg_T *eap)
|
||||
{
|
||||
do_cscope_general(eap, TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* PUBLIC: do_cstag
|
||||
*
|
||||
* Implementation of ":cstag"
|
||||
*/
|
||||
void
|
||||
do_cstag(exarg_T *eap)
|
||||
ex_cstag(exarg_T *eap)
|
||||
{
|
||||
int ret = FALSE;
|
||||
|
||||
@@ -336,13 +331,11 @@ do_cstag(exarg_T *eap)
|
||||
#endif
|
||||
}
|
||||
|
||||
} /* do_cscope */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_find
|
||||
*
|
||||
* this simulates a vim_fgets(), but for cscope, returns the next line
|
||||
* This simulates a vim_fgets(), but for cscope, returns the next line
|
||||
* from the cscope output. should only be called from find_tags()
|
||||
*
|
||||
* returns TRUE if eof, FALSE otherwise
|
||||
@@ -361,9 +354,7 @@ cs_fgets(char_u *buf, int size)
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_free_tags
|
||||
*
|
||||
* called only from do_tag(), when popping the tag stack
|
||||
* Called only from do_tag(), when popping the tag stack.
|
||||
*/
|
||||
void
|
||||
cs_free_tags(void)
|
||||
@@ -373,9 +364,7 @@ cs_free_tags(void)
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_print_tags
|
||||
*
|
||||
* called from do_tag()
|
||||
* Called from do_tag().
|
||||
*/
|
||||
void
|
||||
cs_print_tags(void)
|
||||
@@ -467,12 +456,8 @@ cs_connection(int num, char_u *dbpath, char_u *ppath)
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_add
|
||||
*
|
||||
* add cscope database or a directory name (to look for cscope.out)
|
||||
* to the cscope connection list
|
||||
*
|
||||
* MAXPATHL 256
|
||||
* Add cscope database or a directory name (to look for cscope.out)
|
||||
* to the cscope connection list.
|
||||
*/
|
||||
static int
|
||||
cs_add(exarg_T *eap UNUSED)
|
||||
@@ -508,10 +493,8 @@ cs_stat_emsg(char *fname)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_add_common
|
||||
*
|
||||
* the common routine to add a new cscope connection. called by
|
||||
* cs_add() and cs_reset(). i really don't like to do this, but this
|
||||
* The common routine to add a new cscope connection. Called by
|
||||
* cs_add() and cs_reset(). I really don't like to do this, but this
|
||||
* routine uses a number of goto statements.
|
||||
*/
|
||||
static int
|
||||
@@ -666,9 +649,7 @@ cs_check_for_tags(void)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_cnt_connections
|
||||
*
|
||||
* count the number of cscope connections
|
||||
* Count the number of cscope connections.
|
||||
*/
|
||||
static int
|
||||
cs_cnt_connections(void)
|
||||
@@ -693,9 +674,7 @@ cs_reading_emsg(
|
||||
|
||||
#define CSREAD_BUFSIZE 2048
|
||||
/*
|
||||
* PRIVATE: cs_cnt_matches
|
||||
*
|
||||
* count the number of matches for a given cscope connection.
|
||||
* Count the number of matches for a given cscope connection.
|
||||
*/
|
||||
static int
|
||||
cs_cnt_matches(int idx)
|
||||
@@ -754,8 +733,6 @@ cs_cnt_matches(int idx)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_create_cmd
|
||||
*
|
||||
* Creates the actual cscope command query from what the user entered.
|
||||
*/
|
||||
static char *
|
||||
@@ -817,8 +794,6 @@ cs_create_cmd(char *csoption, char *pattern)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_create_connection
|
||||
*
|
||||
* This piece of code was taken/adapted from nvi. do we need to add
|
||||
* the BSD license notice?
|
||||
*/
|
||||
@@ -1056,8 +1031,6 @@ err_closing:
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_find
|
||||
*
|
||||
* Query cscope using command line interface. Parse the output and use tselect
|
||||
* to allow choices. Like Nvi, creates a pipe to send to/from query/cscope.
|
||||
*
|
||||
@@ -1102,9 +1075,7 @@ cs_find(exarg_T *eap)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_find_common
|
||||
*
|
||||
* common code for cscope find, shared by cs_find() and do_cstag()
|
||||
* Common code for cscope find, shared by cs_find() and ex_cstag().
|
||||
*/
|
||||
static int
|
||||
cs_find_common(
|
||||
@@ -1178,12 +1149,12 @@ cs_find_common(
|
||||
}
|
||||
|
||||
# ifdef FEAT_AUTOCMD
|
||||
if (*qfpos != '0')
|
||||
if (*qfpos != '0'
|
||||
&& apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope",
|
||||
curbuf->b_fname, TRUE, curbuf))
|
||||
{
|
||||
apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope",
|
||||
curbuf->b_fname, TRUE, curbuf);
|
||||
# ifdef FEAT_EVAL
|
||||
if (did_throw || force_abort)
|
||||
if (aborting())
|
||||
return FALSE;
|
||||
# endif
|
||||
}
|
||||
@@ -1323,9 +1294,7 @@ cs_find_common(
|
||||
} /* cs_find_common */
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_help
|
||||
*
|
||||
* print help
|
||||
* Print help.
|
||||
*/
|
||||
static int
|
||||
cs_help(exarg_T *eap UNUSED)
|
||||
@@ -1408,9 +1377,7 @@ GetWin32Error(void)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_insert_filelist
|
||||
*
|
||||
* insert a new cscope database filename into the filelist
|
||||
* Insert a new cscope database filename into the filelist.
|
||||
*/
|
||||
static int
|
||||
cs_insert_filelist(
|
||||
@@ -1551,9 +1518,7 @@ cs_insert_filelist(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_lookup_cmd
|
||||
*
|
||||
* find cscope command in command table
|
||||
* Find cscope command in command table.
|
||||
*/
|
||||
static cscmd_T *
|
||||
cs_lookup_cmd(exarg_T *eap)
|
||||
@@ -1582,9 +1547,7 @@ cs_lookup_cmd(exarg_T *eap)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_kill
|
||||
*
|
||||
* nuke em
|
||||
* Nuke em.
|
||||
*/
|
||||
static int
|
||||
cs_kill(exarg_T *eap UNUSED)
|
||||
@@ -1639,8 +1602,6 @@ cs_kill(exarg_T *eap UNUSED)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_kill_execute
|
||||
*
|
||||
* Actually kills a specific cscope connection.
|
||||
*/
|
||||
static void
|
||||
@@ -1659,22 +1620,20 @@ cs_kill_execute(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_make_vim_style_matches
|
||||
*
|
||||
* convert the cscope output into a ctags style entry (as might be found
|
||||
* Convert the cscope output into a ctags style entry (as might be found
|
||||
* in a ctags tags file). there's one catch though: cscope doesn't tell you
|
||||
* the type of the tag you are looking for. for example, in Darren Hiebert's
|
||||
* ctags (the one that comes with vim), #define's use a line number to find the
|
||||
* tag in a file while function definitions use a regexp search pattern.
|
||||
*
|
||||
* i'm going to always use the line number because cscope does something
|
||||
* I'm going to always use the line number because cscope does something
|
||||
* quirky (and probably other things i don't know about):
|
||||
*
|
||||
* if you have "# define" in your source file, which is
|
||||
* perfectly legal, cscope thinks you have "#define". this
|
||||
* will result in a failed regexp search. :(
|
||||
*
|
||||
* besides, even if this particular case didn't happen, the search pattern
|
||||
* Besides, even if this particular case didn't happen, the search pattern
|
||||
* would still have to be modified to escape all the special regular expression
|
||||
* characters to comply with ctags formatting.
|
||||
*/
|
||||
@@ -1721,9 +1680,7 @@ cs_make_vim_style_matches(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_manage_matches
|
||||
*
|
||||
* this is kind of hokey, but i don't see an easy way round this..
|
||||
* This is kind of hokey, but i don't see an easy way round this.
|
||||
*
|
||||
* Store: keep a ptr to the (malloc'd) memory of matches originally
|
||||
* generated from cs_find(). the matches are originally lines directly
|
||||
@@ -1792,7 +1749,7 @@ cs_manage_matches(
|
||||
cs_print_tags_priv(mp, cp, cnt);
|
||||
break;
|
||||
default: /* should not reach here */
|
||||
(void)EMSG(_("E570: fatal error in cs_manage_matches"));
|
||||
IEMSG(_("E570: fatal error in cs_manage_matches"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1801,9 +1758,7 @@ cs_manage_matches(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_parse_results
|
||||
*
|
||||
* parse cscope output
|
||||
* Parse cscope output.
|
||||
*/
|
||||
static char *
|
||||
cs_parse_results(
|
||||
@@ -1864,9 +1819,7 @@ cs_parse_results(
|
||||
|
||||
#ifdef FEAT_QUICKFIX
|
||||
/*
|
||||
* PRIVATE: cs_file_results
|
||||
*
|
||||
* write cscope find results to file
|
||||
* Write cscope find results to file.
|
||||
*/
|
||||
static void
|
||||
cs_file_results(FILE *f, int *nummatches_a)
|
||||
@@ -1919,10 +1872,8 @@ cs_file_results(FILE *f, int *nummatches_a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_fill_results
|
||||
*
|
||||
* get parsed cscope output and calls cs_make_vim_style_matches to convert
|
||||
* into ctags format
|
||||
* Get parsed cscope output and calls cs_make_vim_style_matches to convert
|
||||
* into ctags format.
|
||||
* When there are no matches sets "*matches_p" to NULL.
|
||||
*/
|
||||
static void
|
||||
@@ -2032,9 +1983,7 @@ cs_pathcomponents(char *path)
|
||||
}
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_print_tags_priv
|
||||
*
|
||||
* called from cs_manage_matches()
|
||||
* Called from cs_manage_matches().
|
||||
*/
|
||||
static void
|
||||
cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
||||
@@ -2182,9 +2131,7 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_read_prompt
|
||||
*
|
||||
* read a cscope prompt (basically, skip over the ">> ")
|
||||
* Read a cscope prompt (basically, skip over the ">> ").
|
||||
*/
|
||||
static int
|
||||
cs_read_prompt(int i)
|
||||
@@ -2280,8 +2227,6 @@ sig_handler SIGDEFARG(sigarg)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_release_csp
|
||||
*
|
||||
* Does the actual free'ing for the cs ptr with an optional flag of whether
|
||||
* or not to free the filename. Called by cs_kill and cs_reset.
|
||||
*/
|
||||
@@ -2408,9 +2353,7 @@ cs_release_csp(int i, int freefnpp)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_reset
|
||||
*
|
||||
* calls cs_kill on all cscope connections then reinits
|
||||
* Calls cs_kill on all cscope connections then reinits.
|
||||
*/
|
||||
static int
|
||||
cs_reset(exarg_T *eap UNUSED)
|
||||
@@ -2474,8 +2417,6 @@ cs_reset(exarg_T *eap UNUSED)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_resolve_file
|
||||
*
|
||||
* Construct the full pathname to a file found in the cscope database.
|
||||
* (Prepends ppath, if there is one and if it's not already prepended,
|
||||
* otherwise just uses the name found.)
|
||||
@@ -2544,9 +2485,7 @@ cs_resolve_file(int i, char *name)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_show
|
||||
*
|
||||
* show all cscope connections
|
||||
* Show all cscope connections.
|
||||
*/
|
||||
static int
|
||||
cs_show(exarg_T *eap UNUSED)
|
||||
@@ -2579,8 +2518,6 @@ cs_show(exarg_T *eap UNUSED)
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_end
|
||||
*
|
||||
* Only called when VIM exits to quit any cscope sessions.
|
||||
*/
|
||||
void
|
||||
|
||||
+9
-5
@@ -933,13 +933,17 @@ Python_Init(void)
|
||||
EMSG(_("E263: Sorry, this command is disabled, the Python library could not be loaded."));
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PYTHON_HOME
|
||||
# ifdef DYNAMIC_PYTHON
|
||||
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
# endif
|
||||
if (p_pyhome && *p_pyhome != '\0')
|
||||
Py_SetPythonHome((char *)p_pyhome);
|
||||
# ifdef PYTHON_HOME
|
||||
else if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
Py_SetPythonHome(PYTHON_HOME);
|
||||
# endif
|
||||
#else
|
||||
# ifdef PYTHON_HOME
|
||||
Py_SetPythonHome(PYTHON_HOME);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
init_structs();
|
||||
|
||||
+18
-5
@@ -860,12 +860,25 @@ Python3_Init(void)
|
||||
|
||||
init_structs();
|
||||
|
||||
|
||||
#ifdef PYTHON3_HOME
|
||||
# ifdef DYNAMIC_PYTHON3
|
||||
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
# endif
|
||||
#ifdef DYNAMIC_PYTHON3
|
||||
if (p_py3home && *p_py3home != '\0')
|
||||
{
|
||||
int len;
|
||||
wchar_t *buf;
|
||||
len = mbstowcs(NULL, (char *)p_py3home, 0) + 1;
|
||||
buf = (wchar_t *)alloc(len * sizeof(wchar_t));
|
||||
if (buf && mbstowcs(buf, (char *)p_py3home, len) != (size_t)-1)
|
||||
Py_SetPythonHome(buf);
|
||||
vim_free(buf);
|
||||
}
|
||||
# ifdef PYTHON3_HOME
|
||||
else if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
Py_SetPythonHome(PYTHON3_HOME);
|
||||
# endif
|
||||
#else
|
||||
# ifdef PYTHON3_HOME
|
||||
Py_SetPythonHome(PYTHON3_HOME);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
PyImport_AppendInittab("vim", Py3Init_vim);
|
||||
|
||||
+1
-1
@@ -328,7 +328,7 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
|
||||
break;
|
||||
#endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "json_encode_item()");
|
||||
internal_error("json_encode_item()");
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
|
||||
+6
-1
@@ -177,6 +177,7 @@
|
||||
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
|
||||
/* VMS does not have lstat() */
|
||||
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
|
||||
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
|
||||
#else
|
||||
# ifndef WIN32
|
||||
# define mch_access(n, p) access((n), (p))
|
||||
@@ -344,7 +345,11 @@
|
||||
# endif
|
||||
# if !defined(INFINITY)
|
||||
# if defined(DBL_MAX)
|
||||
# define INFINITY (DBL_MAX+DBL_MAX)
|
||||
# ifdef VMS
|
||||
# define INFINITY DBL_MAX
|
||||
# else
|
||||
# define INFINITY (DBL_MAX+DBL_MAX)
|
||||
# endif
|
||||
# else
|
||||
# define INFINITY (1.0 / 0.0)
|
||||
# endif
|
||||
|
||||
+2
-2
@@ -22,11 +22,11 @@
|
||||
# A U T O C O N F
|
||||
#
|
||||
|
||||
# Run autoconf when configure.in has been changed since it was last run.
|
||||
# Run autoconf when configure.ac has been changed since it was last run.
|
||||
# This is skipped when the signatures in "mysign" are up-to-date. When
|
||||
# there is no autoconf program skip this (the signature is often the only
|
||||
# thing that's outdated)
|
||||
auto/configure {signfile = mysign} : configure.in
|
||||
auto/configure {signfile = mysign} : configure.ac
|
||||
@if not program_path("autoconf"):
|
||||
:print Can't find autoconf, using existing configure script.
|
||||
@else:
|
||||
|
||||
+10
-4
@@ -1036,7 +1036,7 @@ common_init(mparm_T *paramp)
|
||||
* (needed for :! to * work). mch_check_win() will also handle the -d or
|
||||
* -dev argument.
|
||||
*/
|
||||
paramp->stdout_isatty = (mch_check_win(paramp->argc, paramp->argv) != FAIL);
|
||||
stdout_isatty = (mch_check_win(paramp->argc, paramp->argv) != FAIL);
|
||||
TIME_MSG("window checked");
|
||||
|
||||
/*
|
||||
@@ -1906,6 +1906,7 @@ command_line_scan(mparm_T *parmp)
|
||||
/* "--literal" take files literally */
|
||||
/* "--nofork" don't fork */
|
||||
/* "--not-a-term" don't warn for not a term */
|
||||
/* "--ttyfail" exit if not a term */
|
||||
/* "--noplugin[s]" skip plugins */
|
||||
/* "--cmd <cmd>" execute cmd before vimrc */
|
||||
if (STRICMP(argv[0] + argv_idx, "help") == 0)
|
||||
@@ -1935,6 +1936,8 @@ command_line_scan(mparm_T *parmp)
|
||||
p_lpl = FALSE;
|
||||
else if (STRNICMP(argv[0] + argv_idx, "not-a-term", 10) == 0)
|
||||
parmp->not_a_term = TRUE;
|
||||
else if (STRNICMP(argv[0] + argv_idx, "ttyfail", 7) == 0)
|
||||
parmp->tty_fail = TRUE;
|
||||
else if (STRNICMP(argv[0] + argv_idx, "cmd", 3) == 0)
|
||||
{
|
||||
want_argument = TRUE;
|
||||
@@ -2573,7 +2576,7 @@ check_tty(mparm_T *parmp)
|
||||
if (!input_isatty)
|
||||
silent_mode = TRUE;
|
||||
}
|
||||
else if (parmp->want_full_screen && (!parmp->stdout_isatty || !input_isatty)
|
||||
else if (parmp->want_full_screen && (!stdout_isatty || !input_isatty)
|
||||
#ifdef FEAT_GUI
|
||||
/* don't want the delay when started from the desktop */
|
||||
&& !gui.starting
|
||||
@@ -2588,7 +2591,7 @@ check_tty(mparm_T *parmp)
|
||||
* input buffer so fast I can't even kill the process in under 2
|
||||
* minutes (and it beeps continuously the whole time :-)
|
||||
*/
|
||||
if (netbeans_active() && (!parmp->stdout_isatty || !input_isatty))
|
||||
if (netbeans_active() && (!stdout_isatty || !input_isatty))
|
||||
{
|
||||
mch_errmsg(_("Vim: Error: Failure to start gvim from NetBeans\n"));
|
||||
exit(1);
|
||||
@@ -2601,11 +2604,13 @@ check_tty(mparm_T *parmp)
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
if (!parmp->stdout_isatty)
|
||||
if (!stdout_isatty)
|
||||
mch_errmsg(_("Vim: Warning: Output is not to a terminal\n"));
|
||||
if (!input_isatty)
|
||||
mch_errmsg(_("Vim: Warning: Input is not from a terminal\n"));
|
||||
out_flush();
|
||||
if (parmp->tty_fail && (!stdout_isatty || !input_isatty))
|
||||
exit(1);
|
||||
if (scriptin[0] == NULL)
|
||||
ui_delay(2000L, TRUE);
|
||||
TIME_MSG("Warning delay");
|
||||
@@ -3371,6 +3376,7 @@ usage(void)
|
||||
#endif
|
||||
main_msg(_("-T <terminal>\tSet terminal type to <terminal>"));
|
||||
main_msg(_("--not-a-term\t\tSkip warning for input/output not being a terminal"));
|
||||
main_msg(_("--ttyfail\t\tExit if input or output is not a terminal"));
|
||||
main_msg(_("-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"));
|
||||
#ifdef FEAT_GUI
|
||||
main_msg(_("-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc"));
|
||||
|
||||
+1
-1
@@ -482,7 +482,7 @@ mf_put(
|
||||
flags = hp->bh_flags;
|
||||
|
||||
if ((flags & BH_LOCKED) == 0)
|
||||
EMSG(_("E293: block was not locked"));
|
||||
IEMSG(_("E293: block was not locked"));
|
||||
flags &= ~BH_LOCKED;
|
||||
if (dirty)
|
||||
{
|
||||
|
||||
+14
-14
@@ -333,7 +333,7 @@ ml_open(buf_T *buf)
|
||||
goto error;
|
||||
if (hp->bh_bnum != 0)
|
||||
{
|
||||
EMSG(_("E298: Didn't get block nr 0?"));
|
||||
IEMSG(_("E298: Didn't get block nr 0?"));
|
||||
goto error;
|
||||
}
|
||||
b0p = (ZERO_BL *)(hp->bh_data);
|
||||
@@ -383,7 +383,7 @@ ml_open(buf_T *buf)
|
||||
goto error;
|
||||
if (hp->bh_bnum != 1)
|
||||
{
|
||||
EMSG(_("E298: Didn't get block nr 1?"));
|
||||
IEMSG(_("E298: Didn't get block nr 1?"));
|
||||
goto error;
|
||||
}
|
||||
pp = (PTR_BL *)(hp->bh_data);
|
||||
@@ -401,7 +401,7 @@ ml_open(buf_T *buf)
|
||||
goto error;
|
||||
if (hp->bh_bnum != 2)
|
||||
{
|
||||
EMSG(_("E298: Didn't get block nr 2?"));
|
||||
IEMSG(_("E298: Didn't get block nr 2?"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -950,7 +950,7 @@ ml_upd_block0(buf_T *buf, upd_block0_T what)
|
||||
|
||||
b0p = (ZERO_BL *)(hp->bh_data);
|
||||
if (ml_check_b0_id(b0p) == FAIL)
|
||||
EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
|
||||
IEMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
|
||||
else
|
||||
{
|
||||
if (what == UB_FNAME)
|
||||
@@ -2450,7 +2450,7 @@ ml_get_buf(
|
||||
/* Avoid giving this message for a recursive call, may happen when
|
||||
* the GUI redraws part of the text. */
|
||||
++recursive;
|
||||
EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
||||
IEMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
||||
--recursive;
|
||||
}
|
||||
errorret:
|
||||
@@ -2485,7 +2485,7 @@ errorret:
|
||||
/* Avoid giving this message for a recursive call, may happen
|
||||
* when the GUI redraws part of the text. */
|
||||
++recursive;
|
||||
EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
||||
IEMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
||||
--recursive;
|
||||
}
|
||||
goto errorret;
|
||||
@@ -2900,7 +2900,7 @@ ml_append_int(
|
||||
pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
EMSG(_("E317: pointer block id wrong 3"));
|
||||
IEMSG(_("E317: pointer block id wrong 3"));
|
||||
mf_put(mfp, hp, FALSE, FALSE);
|
||||
return FAIL;
|
||||
}
|
||||
@@ -3042,7 +3042,7 @@ ml_append_int(
|
||||
*/
|
||||
if (stack_idx < 0)
|
||||
{
|
||||
EMSG(_("E318: Updated too many blocks?"));
|
||||
IEMSG(_("E318: Updated too many blocks?"));
|
||||
buf->b_ml.ml_stack_top = 0; /* invalidate stack */
|
||||
}
|
||||
}
|
||||
@@ -3220,7 +3220,7 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int message)
|
||||
pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
EMSG(_("E317: pointer block id wrong 4"));
|
||||
IEMSG(_("E317: pointer block id wrong 4"));
|
||||
mf_put(mfp, hp, FALSE, FALSE);
|
||||
return FAIL;
|
||||
}
|
||||
@@ -3432,7 +3432,7 @@ ml_flush_line(buf_T *buf)
|
||||
|
||||
hp = ml_find_line(buf, lnum, ML_FIND);
|
||||
if (hp == NULL)
|
||||
EMSGN(_("E320: Cannot find line %ld"), lnum);
|
||||
IEMSGN(_("E320: Cannot find line %ld"), lnum);
|
||||
else
|
||||
{
|
||||
dp = (DATA_BL *)(hp->bh_data);
|
||||
@@ -3674,7 +3674,7 @@ ml_find_line(buf_T *buf, linenr_T lnum, int action)
|
||||
pp = (PTR_BL *)(dp); /* must be pointer block */
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
EMSG(_("E317: pointer block id wrong"));
|
||||
IEMSG(_("E317: pointer block id wrong"));
|
||||
goto error_block;
|
||||
}
|
||||
|
||||
@@ -3719,11 +3719,11 @@ ml_find_line(buf_T *buf, linenr_T lnum, int action)
|
||||
if (idx >= (int)pp->pb_count) /* past the end: something wrong! */
|
||||
{
|
||||
if (lnum > buf->b_ml.ml_line_count)
|
||||
EMSGN(_("E322: line number out of range: %ld past the end"),
|
||||
IEMSGN(_("E322: line number out of range: %ld past the end"),
|
||||
lnum - buf->b_ml.ml_line_count);
|
||||
|
||||
else
|
||||
EMSGN(_("E323: line count wrong in block %ld"), bnum);
|
||||
IEMSGN(_("E323: line count wrong in block %ld"), bnum);
|
||||
goto error_block;
|
||||
}
|
||||
if (action == ML_DELETE)
|
||||
@@ -3817,7 +3817,7 @@ ml_lineadd(buf_T *buf, int count)
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
mf_put(mfp, hp, FALSE, FALSE);
|
||||
EMSG(_("E317: pointer block id wrong 2"));
|
||||
IEMSG(_("E317: pointer block id wrong 2"));
|
||||
break;
|
||||
}
|
||||
pp->pb_pointer[ip->ip_index].pe_line_count += count;
|
||||
|
||||
@@ -662,6 +662,7 @@ emsg(char_u *s)
|
||||
return msg_attr(s, attr);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Print an error message with one "%s" and one string argument.
|
||||
*/
|
||||
@@ -671,6 +672,84 @@ emsg2(char_u *s, char_u *a1)
|
||||
return emsg3(s, a1, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print an error message with one or two "%s" and one or two string arguments.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsg3(char_u *s, char_u *a1, char_u *a2)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print an error message with one "%ld" and one long int argument.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsgn(char_u *s, long n)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as emsg(...), but abort on error when ABORT_ON_INTERNAL_ERROR is
|
||||
* defined. It is used for internal errors only, so that they can be
|
||||
* detected when fuzzing vim.
|
||||
*/
|
||||
void
|
||||
iemsg(char_u *s)
|
||||
{
|
||||
msg(s);
|
||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Same as emsg2(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
|
||||
* defined. It is used for internal errors only, so that they can be
|
||||
* detected when fuzzing vim.
|
||||
*/
|
||||
void
|
||||
iemsg2(char_u *s, char_u *a1)
|
||||
{
|
||||
emsg2(s, a1);
|
||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as emsgn(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
|
||||
* defined. It is used for internal errors only, so that they can be
|
||||
* detected when fuzzing vim.
|
||||
*/
|
||||
void
|
||||
iemsgn(char_u *s, long n)
|
||||
{
|
||||
emsgn(s, n);
|
||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Give an "Internal error" message.
|
||||
*/
|
||||
void
|
||||
internal_error(char *where)
|
||||
{
|
||||
IEMSG2(_(e_intern2), where);
|
||||
}
|
||||
|
||||
/* emsg3() and emsgn() are in misc2.c to avoid warnings for the prototypes. */
|
||||
|
||||
void
|
||||
|
||||
@@ -5768,6 +5768,7 @@ cin_is_cpp_namespace(char_u *s)
|
||||
{
|
||||
char_u *p;
|
||||
int has_name = FALSE;
|
||||
int has_name_start = FALSE;
|
||||
|
||||
s = cin_skipcomment(s);
|
||||
if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9])))
|
||||
@@ -5786,10 +5787,18 @@ cin_is_cpp_namespace(char_u *s)
|
||||
}
|
||||
else if (vim_iswordc(*p))
|
||||
{
|
||||
has_name_start = TRUE;
|
||||
if (has_name)
|
||||
return FALSE; /* word character after skipping past name */
|
||||
++p;
|
||||
}
|
||||
else if (p[0] == ':' && p[1] == ':' && vim_iswordc(p[2]))
|
||||
{
|
||||
if (!has_name_start || has_name)
|
||||
return FALSE;
|
||||
/* C++ 17 nested namespace */
|
||||
p += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
+31
-28
@@ -918,7 +918,7 @@ lalloc(long_u size, int message)
|
||||
{
|
||||
/* Don't hide this message */
|
||||
emsg_silent = 0;
|
||||
EMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
|
||||
IEMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1075,7 +1075,7 @@ free_all_mem(void)
|
||||
p_ea = FALSE;
|
||||
if (first_tabpage->tp_next != NULL)
|
||||
do_cmdline_cmd((char_u *)"tabonly!");
|
||||
if (firstwin != lastwin)
|
||||
if (!ONE_WINDOW)
|
||||
do_cmdline_cmd((char_u *)"only!");
|
||||
# endif
|
||||
|
||||
@@ -6046,32 +6046,6 @@ filewritable(char_u *fname)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Print an error message with one or two "%s" and one or two string arguments.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsg3(char_u *s, char_u *a1, char_u *a2)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print an error message with one "%ld" and one long int argument.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsgn(char_u *s, long n)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
#if defined(FEAT_SPELL) || defined(FEAT_PERSISTENT_UNDO) || defined(PROTO)
|
||||
/*
|
||||
* Read 2 bytes from "fd" and turn them into an int, MSB first.
|
||||
@@ -6262,6 +6236,7 @@ has_non_ascii(char_u *s)
|
||||
#if defined(MESSAGE_QUEUE) || defined(PROTO)
|
||||
/*
|
||||
* Process messages that have been queued for netbeans or clientserver.
|
||||
* Also check if any jobs have ended.
|
||||
* These functions can call arbitrary vimscript and should only be called when
|
||||
* it is safe to do so.
|
||||
*/
|
||||
@@ -6294,3 +6269,31 @@ parse_queued_messages(void)
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ELAPSED_TIMEVAL /* no PROTO here, proto is defined in vim.h */
|
||||
/*
|
||||
* Return time in msec since "start_tv".
|
||||
*/
|
||||
long
|
||||
elapsed(struct timeval *start_tv)
|
||||
{
|
||||
struct timeval now_tv;
|
||||
|
||||
gettimeofday(&now_tv, NULL);
|
||||
return (now_tv.tv_sec - start_tv->tv_sec) * 1000L
|
||||
+ (now_tv.tv_usec - start_tv->tv_usec) / 1000L;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ELAPSED_TICKCOUNT
|
||||
/*
|
||||
* Return time in msec since "start_tick".
|
||||
*/
|
||||
long
|
||||
elapsed(DWORD start_tick)
|
||||
{
|
||||
DWORD now = GetTickCount();
|
||||
|
||||
return (long)now - (long)start_tick;
|
||||
}
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -2340,7 +2340,7 @@ onepage(int dir, long count)
|
||||
#endif
|
||||
if (dir == FORWARD)
|
||||
{
|
||||
if (firstwin == lastwin && p_window > 0 && p_window < Rows - 1)
|
||||
if (ONE_WINDOW && p_window > 0 && p_window < Rows - 1)
|
||||
{
|
||||
/* Vi compatible scrolling */
|
||||
if (p_window <= 2)
|
||||
@@ -2390,7 +2390,7 @@ onepage(int dir, long count)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (firstwin == lastwin && p_window > 0 && p_window < Rows - 1)
|
||||
if (ONE_WINDOW && p_window > 0 && p_window < Rows - 1)
|
||||
{
|
||||
/* Vi compatible scrolling (sort of) */
|
||||
if (p_window <= 2)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
=auto/configure-lastupdate=1178970549.78-@buildcheck=dfc15c059b7ce88a951584995c49a201=configure.in@md5=e0d6e9a7d7b986d63ce4e8e7362fd0b9
|
||||
=auto/configure-lastupdate=1178970549.78-@buildcheck=dfc15c059b7ce88a951584995c49a201=configure.ac@md5=e0d6e9a7d7b986d63ce4e8e7362fd0b9
|
||||
|
||||
+11
-2
@@ -1995,6 +1995,11 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
|
||||
break;
|
||||
|
||||
case OP_FUNCTION:
|
||||
#ifdef FEAT_LINEBREAK
|
||||
/* Restore linebreak, so that when the user edits it looks as
|
||||
* before. */
|
||||
curwin->w_p_lbr = lbr_saved;
|
||||
#endif
|
||||
op_function(oap); /* call 'operatorfunc' */
|
||||
break;
|
||||
|
||||
@@ -5747,9 +5752,13 @@ nv_ident(cmdarg_T *cap)
|
||||
*/
|
||||
if (cmdchar == 'K' && !kp_help)
|
||||
{
|
||||
/* Escape the argument properly for a shell command */
|
||||
ptr = vim_strnsave(ptr, n);
|
||||
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
|
||||
if (kp_ex)
|
||||
/* Escape the argument properly for an Ex command */
|
||||
p = vim_strsave_fnameescape(ptr, FALSE);
|
||||
else
|
||||
/* Escape the argument properly for a shell command */
|
||||
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
|
||||
vim_free(ptr);
|
||||
if (p == NULL)
|
||||
{
|
||||
|
||||
+76
-25
@@ -458,10 +458,11 @@ struct vimoption
|
||||
#define P_NFNAME 0x400000L /* only normal file name chars allowed */
|
||||
#define P_INSECURE 0x800000L /* option was set from a modeline */
|
||||
#define P_PRI_MKRC 0x1000000L /* priority for :mkvimrc (setting option has
|
||||
side effects) */
|
||||
side effects) */
|
||||
#define P_NO_ML 0x2000000L /* not allowed in modeline */
|
||||
#define P_CURSWANT 0x4000000L /* update curswant required; not needed when
|
||||
* there is a redraw flag */
|
||||
#define P_NDNAME 0x8000000L /* only normal dir name chars allowed */
|
||||
|
||||
#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
|
||||
|
||||
@@ -1004,7 +1005,7 @@ static struct vimoption options[] =
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
|
||||
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
(char_u *)&p_dict, PV_DICT,
|
||||
#else
|
||||
@@ -2111,7 +2112,7 @@ static struct vimoption options[] =
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
#endif
|
||||
SCRIPTID_INIT},
|
||||
{"printexpr", "pexpr", P_STRING|P_VI_DEF,
|
||||
{"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE,
|
||||
#ifdef FEAT_POSTSCRIPT
|
||||
(char_u *)&p_pexpr, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
@@ -2186,12 +2187,20 @@ static struct vimoption options[] =
|
||||
(char_u *)&p_py3dll, PV_NONE,
|
||||
{(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
{"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_py3home, PV_NONE,
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON)
|
||||
{"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_pydll, PV_NONE,
|
||||
{(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
{"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_pyhome, PV_NONE,
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
|
||||
#ifdef FEAT_TEXTOBJ
|
||||
@@ -2712,7 +2721,7 @@ static struct vimoption options[] =
|
||||
{"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
|
||||
(char_u *)&p_tw, PV_TW,
|
||||
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
|
||||
{"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
(char_u *)&p_tsr, PV_TSR,
|
||||
#else
|
||||
@@ -5700,7 +5709,7 @@ was_set_insecurely(char_u *opt, int opt_flags)
|
||||
flagp = insecure_flag(idx, opt_flags);
|
||||
return (*flagp & P_INSECURE) != 0;
|
||||
}
|
||||
EMSG2(_(e_intern2), "was_set_insecurely()");
|
||||
internal_error("was_set_insecurely()");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -5781,7 +5790,7 @@ set_string_option_direct(
|
||||
if (idx < 0) /* not found (should not happen) */
|
||||
{
|
||||
EMSG2(_(e_intern2), "set_string_option_direct()");
|
||||
EMSG2(_("For option %s"), name);
|
||||
IEMSG2(_("For option %s"), name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -5907,6 +5916,23 @@ set_string_option(
|
||||
return r;
|
||||
}
|
||||
|
||||
#if defined(FEAT_KEYMAP) || defined(FEAT_AUTOCMD) || defined(FEAT_SYN_HL)
|
||||
/*
|
||||
* Return TRUE if "val" is a valid 'filetype' name.
|
||||
* Also used for 'syntax' and 'keymap'.
|
||||
*/
|
||||
static int
|
||||
valid_filetype(char_u *val)
|
||||
{
|
||||
char_u *s;
|
||||
|
||||
for (s = val; *s != NUL; ++s)
|
||||
if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handle string options that need some action to perform when changed.
|
||||
* Returns NULL for success, or an error message for an error.
|
||||
@@ -5944,11 +5970,15 @@ did_set_string_option(
|
||||
errmsg = e_secure;
|
||||
}
|
||||
|
||||
/* Check for a "normal" file name in some options. Disallow a path
|
||||
* separator (slash and/or backslash), wildcards and characters that are
|
||||
* often illegal in a file name. */
|
||||
else if ((options[opt_idx].flags & P_NFNAME)
|
||||
&& vim_strpbrk(*varp, (char_u *)"/\\*?[|<>") != NULL)
|
||||
/* Check for a "normal" directory or file name in some options. Disallow a
|
||||
* path separator (slash and/or backslash), wildcards and characters that
|
||||
* are often illegal in a file name. Be more permissive if "secure" is off.
|
||||
*/
|
||||
else if (((options[opt_idx].flags & P_NFNAME)
|
||||
&& vim_strpbrk(*varp, (char_u *)(secure
|
||||
? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
|
||||
|| ((options[opt_idx].flags & P_NDNAME)
|
||||
&& vim_strpbrk(*varp, (char_u *)"*?[|;&<>\r\n") != NULL))
|
||||
{
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
@@ -6324,8 +6354,11 @@ did_set_string_option(
|
||||
#ifdef FEAT_KEYMAP
|
||||
else if (varp == &curbuf->b_p_keymap)
|
||||
{
|
||||
/* load or unload key mapping tables */
|
||||
errmsg = keymap_init();
|
||||
if (!valid_filetype(*varp))
|
||||
errmsg = e_invarg;
|
||||
else
|
||||
/* load or unload key mapping tables */
|
||||
errmsg = keymap_init();
|
||||
|
||||
if (errmsg == NULL)
|
||||
{
|
||||
@@ -7091,6 +7124,7 @@ did_set_string_option(
|
||||
|
||||
|
||||
#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
|
||||
/* 'toolbar' */
|
||||
else if (varp == &p_toolbar)
|
||||
{
|
||||
if (opt_strings_flags(p_toolbar, p_toolbar_values,
|
||||
@@ -7315,6 +7349,7 @@ did_set_string_option(
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_RENDER_OPTIONS)
|
||||
/* 'renderoptions' */
|
||||
else if (varp == &p_rop && gui.in_use)
|
||||
{
|
||||
if (!gui_mch_set_rendering_options(p_rop))
|
||||
@@ -7322,23 +7357,39 @@ did_set_string_option(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
else if (gvarp == &p_ft)
|
||||
{
|
||||
if (!valid_filetype(*varp))
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_SYN_HL
|
||||
else if (gvarp == &p_syn)
|
||||
{
|
||||
if (!valid_filetype(*varp))
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Options that are a list of flags. */
|
||||
else
|
||||
{
|
||||
p = NULL;
|
||||
if (varp == &p_ww)
|
||||
if (varp == &p_ww) /* 'whichwrap' */
|
||||
p = (char_u *)WW_ALL;
|
||||
if (varp == &p_shm)
|
||||
if (varp == &p_shm) /* 'shortmess' */
|
||||
p = (char_u *)SHM_ALL;
|
||||
else if (varp == &(p_cpo))
|
||||
else if (varp == &(p_cpo)) /* 'cpoptions' */
|
||||
p = (char_u *)CPO_ALL;
|
||||
else if (varp == &(curbuf->b_p_fo))
|
||||
else if (varp == &(curbuf->b_p_fo)) /* 'formatoptions' */
|
||||
p = (char_u *)FO_ALL;
|
||||
#ifdef FEAT_CONCEAL
|
||||
else if (varp == &curwin->w_p_cocu)
|
||||
else if (varp == &curwin->w_p_cocu) /* 'concealcursor' */
|
||||
p = (char_u *)COCU_ALL;
|
||||
#endif
|
||||
else if (varp == &p_mouse)
|
||||
else if (varp == &p_mouse) /* 'mouse' */
|
||||
{
|
||||
#ifdef FEAT_MOUSE
|
||||
p = (char_u *)MOUSE_ALL;
|
||||
@@ -7348,7 +7399,7 @@ did_set_string_option(
|
||||
#endif
|
||||
}
|
||||
#if defined(FEAT_GUI)
|
||||
else if (varp == &p_go)
|
||||
else if (varp == &p_go) /* 'guioptions' */
|
||||
p = (char_u *)GO_ALL;
|
||||
#endif
|
||||
if (p != NULL)
|
||||
@@ -8663,7 +8714,7 @@ set_num_option(
|
||||
}
|
||||
|
||||
/* Change window height NOW */
|
||||
if (lastwin != firstwin)
|
||||
if (!ONE_WINDOW)
|
||||
{
|
||||
if (pp == &p_wh && curwin->w_height < p_wh)
|
||||
win_setheight((int)p_wh);
|
||||
@@ -8703,7 +8754,7 @@ set_num_option(
|
||||
}
|
||||
|
||||
/* Change window width NOW */
|
||||
if (lastwin != firstwin && curwin->w_width < p_wiw)
|
||||
if (!ONE_WINDOW && curwin->w_width < p_wiw)
|
||||
win_setwidth((int)p_wiw);
|
||||
}
|
||||
|
||||
@@ -9514,7 +9565,7 @@ option_iter_next(void **option, int opt_type)
|
||||
ret = NULL;
|
||||
break;
|
||||
default:
|
||||
EMSG2(_(e_intern2), "option_iter_next()");
|
||||
internal_error("option_iter_next()");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -10214,7 +10265,7 @@ istermoption(struct vimoption *p)
|
||||
comp_col(void)
|
||||
{
|
||||
#if defined(FEAT_CMDL_INFO) && defined(FEAT_WINDOWS)
|
||||
int last_has_status = (p_ls == 2 || (p_ls == 1 && firstwin != lastwin));
|
||||
int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW));
|
||||
|
||||
sc_col = 0;
|
||||
ru_col = 0;
|
||||
@@ -10638,7 +10689,7 @@ get_varp(struct vimoption *p)
|
||||
#ifdef FEAT_SIGNS
|
||||
case PV_SCL: return (char_u *)&(curwin->w_p_scl);
|
||||
#endif
|
||||
default: EMSG(_("E356: get_varp ERROR"));
|
||||
default: IEMSG(_("E356: get_varp ERROR"));
|
||||
}
|
||||
/* always return a valid pointer to avoid a crash! */
|
||||
return (char_u *)&(curbuf->b_p_wm);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user