mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 239a7e4f53 | |||
| 4d9d4ac26a | |||
| 7756e7465d | |||
| bbfcd01b07 | |||
| bb09ceb954 | |||
| 025e3e0baf | |||
| 9ec7fa82a2 | |||
| 3611fbfb56 | |||
| cbd3bd6cbe | |||
| a77a9b24dc | |||
| 869e35270e | |||
| 8507747600 | |||
| 265671c4a9 | |||
| 04d045a60f | |||
| d7e940584b | |||
| e9a431e6c3 | |||
| 3b3d235308 | |||
| a1a9cc7ef6 | |||
| 2ae331a486 | |||
| 156919f99a | |||
| ca291aec99 | |||
| 0a9046fbcb | |||
| 97792de276 | |||
| 472e85970e | |||
| 9e507ca8a3 | |||
| a6c27ee6db | |||
| 673a11a9d1 | |||
| 01765cd070 | |||
| 39c4be7ac4 | |||
| 9172041601 | |||
| 4575876dc8 | |||
| 3e8474dd50 | |||
| e8ef3a0934 | |||
| 0ba407012c | |||
| cea912af72 | |||
| a7c023ec88 | |||
| 4cf97cebcf | |||
| 0f16ec94a6 | |||
| dc08328821 | |||
| a8e1b3df21 | |||
| b28f194bcf | |||
| a550884a40 | |||
| 96dc4e1390 | |||
| 8743ed43c8 | |||
| 1e00286144 | |||
| dc0ccaee68 | |||
| 9b45794818 | |||
| 936c48f8ca | |||
| 8ddef48d1e | |||
| 70d6f82178 | |||
| 226630a030 | |||
| d22cb61149 | |||
| ec68a99464 | |||
| 8610e74d73 | |||
| 84dbd494dc | |||
| d76626f3c9 | |||
| 6100d02aab | |||
| 6c585c1bfd | |||
| c036347336 | |||
| fa649b7684 | |||
| f701767b4f | |||
| 8839232993 | |||
| 60ea35dac6 | |||
| 0b2421e4c5 | |||
| 2ec618c9fe | |||
| 51e4114a83 | |||
| b3435b0a3a | |||
| b9c31e71f5 | |||
| 3712d186e5 | |||
| 1777785751 | |||
| 890680ca63 | |||
| a683bab097 | |||
| 0e77b7691e | |||
| 7ef3810d28 | |||
| 1eceadaf48 | |||
| 677d665ca0 | |||
| c79d6aa01d | |||
| 3e496b0ea3 | |||
| 9af4184276 | |||
| 20eeb6129d | |||
| 947000d6e4 | |||
| 680e015bfe | |||
| 3f1c15b24a | |||
| 418b98e5f2 | |||
| 0d6868f0e0 | |||
| 50ba526fbf | |||
| 9e02cfa226 | |||
| 99ec74897a | |||
| bbe917d9d4 | |||
| 31b273e7c0 | |||
| 07026777ea | |||
| ebdd90ac28 | |||
| ff43fd2343 | |||
| 418cb178ab | |||
| d07969093a | |||
| e7f312f4ac | |||
| 3c4ebeba17 | |||
| fd2a19c144 | |||
| 5582ef1438 | |||
| 9c95c4f7ba | |||
| 0975715099 |
@@ -8,3 +8,5 @@ maintainer of the port.
|
||||
|
||||
- Vim README https://github.com/macvim-dev/macvim/blob/master/README_vim.md
|
||||
|
||||
- Travis CI <a href="https://travis-ci.org/macvim-dev/macvim"><img src="https://travis-ci.org/macvim-dev/macvim.svg?branch=master" alt="Build Status"></a><a href="https://travis-ci.org/macvim-dev/homebrew-macvim"><img src="https://travis-ci.org/macvim-dev/homebrew-macvim.svg?branch=master" alt="Build Status"></a>
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
`README.md` for version 7.4 of Vim: Vi IMproved.
|
||||
`README.md` for version 8.0 of Vim: Vi IMproved.
|
||||
[](https://travis-ci.org/vim/vim)
|
||||
[](https://coveralls.io/github/vim/vim?branch=master)
|
||||
[](https://ci.appveyor.com/project/chrisbra/vim)
|
||||
|
||||
@@ -41,7 +41,7 @@ These are the normal steps to install Vim from the .zip archives:
|
||||
located. Check the $VIM setting to see where it points to:
|
||||
set VIM
|
||||
For example, if you have
|
||||
C:\vim\vim74
|
||||
C:\vim\vim80
|
||||
do
|
||||
cd C:\
|
||||
Binary and runtime Vim archives are normally unpacked in the same location,
|
||||
|
||||
@@ -16,9 +16,6 @@ matrix:
|
||||
|
||||
before_build:
|
||||
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release'
|
||||
# Work around for Python 2.7.11's bug
|
||||
- reg copy HKLM\SOFTWARE\Python\PythonCore\2.7 HKLM\SOFTWARE\Python\PythonCore\2.7-32 /s /reg:32
|
||||
- reg copy HKLM\SOFTWARE\Python\PythonCore\2.7 HKLM\SOFTWARE\Python\PythonCore\2.7-32 /s /reg:64
|
||||
|
||||
build_script:
|
||||
- src/appveyor.bat
|
||||
|
||||
@@ -236,7 +236,7 @@ fun! getscript#GetLatestVimScripts()
|
||||
" call Decho("..depscript<".depscript.">")
|
||||
|
||||
" found a "GetLatestVimScripts: # #" line in the script;
|
||||
" check if its already in the datafile by searching backwards from llp1,
|
||||
" check if it's already in the datafile by searching backwards from llp1,
|
||||
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
|
||||
" for the script-id with no wrapping allowed.
|
||||
let curline = line(".")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Nov 05
|
||||
" Last Change: 2016 Sep 28
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -63,6 +63,9 @@ fun gzip#read(cmd)
|
||||
" set 'modifiable'
|
||||
let ma_save = &ma
|
||||
setlocal ma
|
||||
" set 'write'
|
||||
let write_save = &write
|
||||
set write
|
||||
" Reset 'foldenable', otherwise line numbers get adjusted.
|
||||
if has("folding")
|
||||
let fen_save = &fen
|
||||
@@ -127,6 +130,7 @@ fun gzip#read(cmd)
|
||||
let &pm = pm_save
|
||||
let &cpo = cpo_save
|
||||
let &l:ma = ma_save
|
||||
let &write = write_save
|
||||
if has("folding")
|
||||
let &l:fen = fen_save
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||
" Last Change: 2015 Jul 13
|
||||
" Last Change: 2016 Oct 10
|
||||
"
|
||||
" OPTIONS:
|
||||
"
|
||||
@@ -195,6 +195,8 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
" }}}
|
||||
elseif context =~? 'implements'
|
||||
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
|
||||
elseif context =~? 'instanceof'
|
||||
return phpcomplete#CompleteClassName(a:base, ['c', 'n'], current_namespace, imports)
|
||||
elseif context =~? 'extends\s\+.\+$' && a:base == ''
|
||||
return ['implements']
|
||||
elseif context =~? 'extends'
|
||||
@@ -787,6 +789,8 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
|
||||
|
||||
if kinds == ['c', 'i']
|
||||
let filterstr = 'v:val =~? "\\(class\\|interface\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
|
||||
elseif kinds == ['c', 'n']
|
||||
let filterstr = 'v:val =~? "\\(class\\|namespace\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
|
||||
elseif kinds == ['c']
|
||||
let filterstr = 'v:val =~? "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
|
||||
elseif kinds == ['i']
|
||||
@@ -931,7 +935,7 @@ function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibite
|
||||
endfor
|
||||
|
||||
for modifier in a:modifiers
|
||||
" if the modifier is prohibited its a no match
|
||||
" if the modifier is prohibited it's a no match
|
||||
if index(a:prohibited_modifiers, modifier) != -1
|
||||
return 0
|
||||
endif
|
||||
@@ -996,7 +1000,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
|
||||
let required_modifiers += ['static']
|
||||
endif
|
||||
let all_variable = filter(deepcopy(a:sccontent),
|
||||
\ 'v:val =~ "^\\s*\\(var\\s\\+\\|public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)\\+\\$"')
|
||||
\ 'v:val =~ "\\(^\\s*\\(var\\s\\+\\|public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)\\+\\$\\|^\\s*\\(\\/\\|\\*\\)*\\s*@property\\s\\+\\S\\+\\s\\S\\{-}\\s*$\\)"')
|
||||
|
||||
let variables = []
|
||||
for i in all_variable
|
||||
@@ -1160,6 +1164,14 @@ function! phpcomplete#GetTaglist(pattern) " {{{
|
||||
endif
|
||||
|
||||
let tags = taglist(a:pattern)
|
||||
for tag in tags
|
||||
for prop in keys(tag)
|
||||
if prop == 'cmd' || prop == 'static' || prop == 'kind' || prop == 'builtin'
|
||||
continue
|
||||
endif
|
||||
let tag[prop] = substitute(tag[prop], '\\\\', '\\', 'g')
|
||||
endfor
|
||||
endfor
|
||||
let s:cache_tags[a:pattern] = tags
|
||||
let has_key = has_key(s:cache_tags, a:pattern)
|
||||
let s:cache_tags_checksum = cache_checksum
|
||||
@@ -1379,7 +1391,7 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
|
||||
" Get Structured information of all classes and subclasses including namespace and includes
|
||||
" try to find the method's return type in docblock comment
|
||||
for classstructure in classcontents
|
||||
let docblock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
|
||||
let docblock_target_pattern = 'function\s\+&\?'.method.'\>\|\(public\|private\|protected\|var\).\+\$'.method.'\>\|@property.\+\$'.method.'\>'
|
||||
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
|
||||
if doc_str != ''
|
||||
break
|
||||
@@ -1387,8 +1399,17 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
|
||||
endfor
|
||||
if doc_str != ''
|
||||
let docblock = phpcomplete#ParseDocBlock(doc_str)
|
||||
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type')
|
||||
let type = has_key(docblock.return, 'type') ? docblock.return.type : docblock.var.type
|
||||
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0
|
||||
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
|
||||
|
||||
if type == ''
|
||||
for property in docblock.properties
|
||||
if property.description =~? method
|
||||
let type = property.type
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
" there's a namespace in the type, threat the type as FQCN
|
||||
if type =~ '\\'
|
||||
@@ -1554,6 +1575,9 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
elseif get(methodstack, 0) =~# function_invocation_pattern
|
||||
let function_name = matchstr(methodstack[0], '^\s*\zs'.function_name_pattern)
|
||||
let function_file = phpcomplete#GetFunctionLocation(function_name, a:current_namespace)
|
||||
if function_file == ''
|
||||
let function_file = phpcomplete#GetFunctionLocation(function_name, '\')
|
||||
endif
|
||||
|
||||
if function_file == 'VIMPHP_BUILTINFUNCTION'
|
||||
" built in function, grab the return type from the info string
|
||||
@@ -1569,7 +1593,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
|
||||
" try to expand the classname of the returned type with the context got from the function's source file
|
||||
|
||||
let [classname_candidate, unused] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
|
||||
endif
|
||||
endif
|
||||
if classname_candidate != ''
|
||||
@@ -1650,9 +1674,10 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*'))
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(
|
||||
\ classname,
|
||||
\ a:current_namespace,
|
||||
\ namespace_for_class,
|
||||
\ a:imports,
|
||||
\ sub_methodstack)
|
||||
|
||||
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
|
||||
endif
|
||||
endif
|
||||
@@ -1783,6 +1808,9 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let [function_name, function_namespace] = phpcomplete#ExpandClassName(function_name, a:current_namespace, a:imports)
|
||||
|
||||
let function_file = phpcomplete#GetFunctionLocation(function_name, function_namespace)
|
||||
if function_file == ''
|
||||
let function_file = phpcomplete#GetFunctionLocation(function_name, '\')
|
||||
endif
|
||||
|
||||
if function_file == 'VIMPHP_BUILTINFUNCTION'
|
||||
" built in function, grab the return type from the info string
|
||||
@@ -1798,7 +1826,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let classname_candidate = docblock.return.type
|
||||
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
|
||||
" try to expand the classname of the returned type with the context got from the function's source file
|
||||
let [classname_candidate, unused] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
|
||||
break
|
||||
endif
|
||||
endif
|
||||
@@ -1861,6 +1889,8 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
for tag in tags
|
||||
if tag.kind ==? 'v' && tag.cmd =~? '=\s*new\s\+\zs'.class_name_pattern.'\ze'
|
||||
let classname = matchstr(tag.cmd, '=\s*new\s\+\zs'.class_name_pattern.'\ze')
|
||||
" unescape the classname, it would have "\" doubled since it is an ex command
|
||||
let classname = substitute(classname, '\\\(\_.\)', '\1', 'g')
|
||||
return classname
|
||||
endif
|
||||
endfor
|
||||
@@ -2077,6 +2107,19 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
endif
|
||||
call searchpair('{', '', '}', 'W')
|
||||
let class_closing_bracket_line = line('.')
|
||||
|
||||
" Include class docblock
|
||||
let doc_line = cfline - 1
|
||||
if getline(doc_line) =~? '^\s*\*/'
|
||||
while doc_line != 0
|
||||
if getline(doc_line) =~? '^\s*/\*\*'
|
||||
let cfline = doc_line
|
||||
break
|
||||
endif
|
||||
let doc_line -= 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
|
||||
|
||||
let used_traits = []
|
||||
@@ -2241,8 +2284,19 @@ function! phpcomplete#GetDocBlock(sccontent, search) " {{{
|
||||
let line = a:sccontent[i]
|
||||
" search for a function declaration
|
||||
if line =~? a:search
|
||||
let l = i - 1
|
||||
" start backward serch for the comment block
|
||||
if line =~? '@property'
|
||||
let doc_line = i
|
||||
while doc_line != sccontent_len - 1
|
||||
if a:sccontent[doc_line] =~? '^\s*\*/'
|
||||
let l = doc_line
|
||||
break
|
||||
endif
|
||||
let doc_line += 1
|
||||
endwhile
|
||||
else
|
||||
let l = i - 1
|
||||
endif
|
||||
" start backward search for the comment block
|
||||
while l != 0
|
||||
let line = a:sccontent[l]
|
||||
" if it's a one line docblock like comment and we can just return it right away
|
||||
@@ -2263,7 +2317,7 @@ function! phpcomplete#GetDocBlock(sccontent, search) " {{{
|
||||
return ''
|
||||
end
|
||||
|
||||
while l != 0
|
||||
while l >= 0
|
||||
let line = a:sccontent[l]
|
||||
if line =~? '^\s*/\*\*'
|
||||
let comment_start = l
|
||||
@@ -2297,9 +2351,10 @@ function! phpcomplete#ParseDocBlock(docblock) " {{{
|
||||
\ 'return': {},
|
||||
\ 'throws': [],
|
||||
\ 'var': {},
|
||||
\ 'properties': [],
|
||||
\ }
|
||||
|
||||
let res.description = substitute(matchstr(a:docblock, '\zs\_.\{-}\ze\(@var\|@param\|@return\|$\)'), '\(^\_s*\|\_s*$\)', '', 'g')
|
||||
let res.description = substitute(matchstr(a:docblock, '\zs\_.\{-}\ze\(@type\|@var\|@param\|@return\|$\)'), '\(^\_s*\|\_s*$\)', '', 'g')
|
||||
let docblock_lines = split(a:docblock, "\n")
|
||||
|
||||
let param_lines = filter(copy(docblock_lines), 'v:val =~? "^@param"')
|
||||
@@ -2334,15 +2389,26 @@ function! phpcomplete#ParseDocBlock(docblock) " {{{
|
||||
endif
|
||||
endfor
|
||||
|
||||
let var_line = filter(copy(docblock_lines), 'v:val =~? "^@var"')
|
||||
let var_line = filter(copy(docblock_lines), 'v:val =~? "^\\(@var\\|@type\\)"')
|
||||
if len(var_line) > 0
|
||||
let var_parts = matchlist(var_line[0], '@var\s\+\(\S\+\)\s*\(.*\)')
|
||||
let var_parts = matchlist(var_line[0], '\(@var\|@type\)\s\+\(\S\+\)\s*\(.*\)')
|
||||
let res['var'] = {
|
||||
\ 'line': var_parts[0],
|
||||
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(var_parts, 1, '')),
|
||||
\ 'description': get(var_parts, 2, '')}
|
||||
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(var_parts, 2, '')),
|
||||
\ 'description': get(var_parts, 3, '')}
|
||||
endif
|
||||
|
||||
let property_lines = filter(copy(docblock_lines), 'v:val =~? "^@property"')
|
||||
for property_line in property_lines
|
||||
let parts = matchlist(property_line, '\(@property\)\s\+\(\S\+\)\s*\(.*\)')
|
||||
if len(parts) > 0
|
||||
call add(res.properties, {
|
||||
\ 'line': parts[0],
|
||||
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 2, '')),
|
||||
\ 'description': get(parts, 3, '')})
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res
|
||||
endfunction
|
||||
" }}}
|
||||
@@ -2498,6 +2564,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let name = matchstr(name, '\\\zs[^\\]\+\ze$')
|
||||
endif
|
||||
endif
|
||||
|
||||
" leading slash is not required use imports are always absolute
|
||||
let imports[name] = {'name': object, 'kind': ''}
|
||||
endfor
|
||||
@@ -2533,6 +2600,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
elseif !exists('no_namespace_candidate')
|
||||
" save the first namespacless match to be used if no better
|
||||
" candidate found later on
|
||||
let tag.namespace = namespace_for_classes
|
||||
let no_namespace_candidate = tag
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -196,7 +196,7 @@ function! rubycomplete#Complete(findstart, base)
|
||||
if c =~ '\w'
|
||||
continue
|
||||
elseif ! c =~ '\.'
|
||||
idx = -1
|
||||
let idx = -1
|
||||
break
|
||||
else
|
||||
break
|
||||
|
||||
@@ -117,7 +117,7 @@ fun! tar#Browse(tarfile)
|
||||
if !filereadable(a:tarfile)
|
||||
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
|
||||
if a:tarfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
" if it's an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
||||
endif
|
||||
|
||||
@@ -347,7 +347,7 @@ fun! vimball#Vimball(really,...)
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
|
||||
" set up help if its a doc/*.txt file
|
||||
" set up help if it's a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
|
||||
+66
-10
@@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jul 02, 2013
|
||||
" Version: 27
|
||||
" Date: Sep 13, 2016
|
||||
" Version: 28
|
||||
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
|
||||
@@ -20,10 +20,10 @@
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v27"
|
||||
let g:loaded_zip= "v28"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of zip needs vim 7.2"
|
||||
echo "***warning*** this version of zip needs vim 7.2 or later"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
@@ -53,6 +53,9 @@ endif
|
||||
if !exists("g:zip_unzipcmd")
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
endif
|
||||
if !exists("g:zip_extractcmd")
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -62,14 +65,14 @@ endif
|
||||
" zip#Browse: {{{2
|
||||
fun! zip#Browse(zipfile)
|
||||
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
|
||||
" sanity check: insure that the zipfile has "PK" as its first two letters
|
||||
" sanity check: ensure that the zipfile has "PK" as its first two letters
|
||||
" (zipped files have a leading PK as a "magic cookie")
|
||||
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
|
||||
exe "noautocmd e ".fnameescape(a:zipfile)
|
||||
" call Dret("zip#Browse : not a zipfile<".a:zipfile.">")
|
||||
return
|
||||
" else " Decho
|
||||
" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - its a zip file")
|
||||
" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - it's a zip file")
|
||||
endif
|
||||
|
||||
let repkeep= &report
|
||||
@@ -92,7 +95,7 @@ fun! zip#Browse(zipfile)
|
||||
endif
|
||||
if !filereadable(a:zipfile)
|
||||
if a:zipfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
" if it's an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
@@ -136,8 +139,10 @@ fun! zip#Browse(zipfile)
|
||||
return
|
||||
endif
|
||||
|
||||
" Maps associated with zip plugin
|
||||
setlocal noma nomod ro
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
noremap <silent> <buffer> x :call zip#Extract()<cr>
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse")
|
||||
@@ -204,6 +209,15 @@ fun! zip#Read(fname,mode)
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
" sanity check
|
||||
if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','',''))
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Read) sorry, your system doesn't appear to have the ".g:zip_unzipcmd." program" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
|
||||
" the following code does much the same thing as
|
||||
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
|
||||
@@ -236,9 +250,9 @@ fun! zip#Write(fname)
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:zip_zipcmd)
|
||||
if !executable(substitute(g:zip_zipcmd,'\s\+.*$','',''))
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
@@ -344,6 +358,48 @@ fun! zip#Write(fname)
|
||||
" call Dret("zip#Write")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" zip#Extract: extract a file from a zip archive {{{2
|
||||
fun! zip#Extract()
|
||||
" call Dfunc("zip#Extract()")
|
||||
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
" sanity check
|
||||
if fname =~ '^"'
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Extract")
|
||||
return
|
||||
endif
|
||||
if fname =~ '/$'
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Extract) Please specify a file, not a directory" | echohl None
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Extract")
|
||||
return
|
||||
endif
|
||||
|
||||
" extract the file mentioned under the cursor
|
||||
" call Decho("system(".g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell).")")
|
||||
call system(g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell))
|
||||
" call Decho("zipfile<".b:zipfile.">")
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!" | echohl NONE
|
||||
elseif !filereadable(fname)
|
||||
echohl Error | echo "***error*** attempted to extract ".fname." but it doesn't appear to be present!"
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
" restore option
|
||||
let &report= repkeep
|
||||
|
||||
" call Dret("zip#Extract")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Escape: {{{2
|
||||
fun! s:Escape(fname,isfilt)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim color file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Apr 14
|
||||
" Last Change: 2016 Oct 10
|
||||
|
||||
" This color scheme uses a dark grey background.
|
||||
|
||||
@@ -46,8 +46,8 @@ hi CursorColumn term=reverse ctermbg=Black guibg=grey40
|
||||
hi CursorLine term=underline cterm=underline guibg=grey40
|
||||
|
||||
" Groups for syntax highlighting
|
||||
hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0 guibg=grey5
|
||||
hi Special term=bold ctermfg=LightRed guifg=Orange guibg=grey5
|
||||
hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0
|
||||
hi Special term=bold ctermfg=LightRed guifg=Orange
|
||||
if &t_Co > 8
|
||||
hi Statement term=bold cterm=bold ctermfg=Yellow guifg=#ffff60 gui=bold
|
||||
endif
|
||||
|
||||
+15
-6
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 03
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -79,11 +79,15 @@ exception is that "<sfile>" is expanded when the autocmd is defined. Example:
|
||||
|
||||
Here Vim expands <sfile> to the name of the file containing this line.
|
||||
|
||||
When your .vimrc file is sourced twice, the autocommands will appear twice.
|
||||
To avoid this, put this command in your .vimrc file, before defining
|
||||
autocommands: >
|
||||
`:autocmd` adds to the list of autocommands regardless of whether they are
|
||||
already present. When your .vimrc file is sourced twice, the autocommands
|
||||
will appear twice. To avoid this, define your autocommands in a group, so
|
||||
that you can easily clear them: >
|
||||
|
||||
:autocmd! " Remove ALL autocommands for the current group.
|
||||
augroup vimrc
|
||||
autocmd! " Remove all vimrc autocommands
|
||||
au BufNewFile,BufRead *.html so <sfile>:h/html.vim
|
||||
augroup END
|
||||
|
||||
If you don't want to remove all autocommands, you can instead use a variable
|
||||
to ensure that Vim includes the autocommands only once: >
|
||||
@@ -130,8 +134,13 @@ prompt. When one command outputs two messages this can happen anyway.
|
||||
|
||||
:au[tocmd]! [group] {event}
|
||||
Remove ALL autocommands for {event}.
|
||||
Warning: You should not do this without a group for
|
||||
|BufRead| and other common events, it can break
|
||||
plugins, syntax highlighting, etc.
|
||||
|
||||
:au[tocmd]! [group] Remove ALL autocommands.
|
||||
Warning: You should normally not do this without a
|
||||
group, it breaks plugins, syntax highlighting, etc.
|
||||
|
||||
When the [group] argument is not given, Vim uses the current group (as defined
|
||||
with ":augroup"); otherwise, Vim uses the group defined with [group].
|
||||
@@ -983,7 +992,7 @@ WinLeave Before leaving a window. If the window to be
|
||||
|
||||
*WinNew*
|
||||
WinNew When a new window was created. Not done for
|
||||
the fist window, when Vim has just started.
|
||||
the first window, when Vim has just started.
|
||||
Before a WinEnter event.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Sep 11
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -913,8 +913,7 @@ Exceptions:
|
||||
Substitute with an expression *sub-replace-expression*
|
||||
*sub-replace-\=* *s/\=*
|
||||
When the substitute string starts with "\=" the remainder is interpreted as an
|
||||
expression. This does not work recursively: a |substitute()| function inside
|
||||
the expression cannot use "\=" for the substitute string.
|
||||
expression.
|
||||
|
||||
The special meaning for characters as mentioned at |sub-replace-special| does
|
||||
not apply except for "<CR>". A <NL> character is used as a line break, you
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Sep 11
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -33,7 +33,7 @@ The Netbeans interface also uses a channel. |netbeans|
|
||||
1. Overview *job-channel-overview*
|
||||
|
||||
There are four main types of jobs:
|
||||
1. A deamon, serving several Vim instances.
|
||||
1. A daemon, serving several Vim instances.
|
||||
Vim connects to it with a socket.
|
||||
2. One job working with one Vim instance, asynchronously.
|
||||
Uses a socket or pipes.
|
||||
@@ -465,6 +465,11 @@ it like this: >
|
||||
Without the handler you need to read the output with |ch_read()| or
|
||||
|ch_readraw()|. You can do this in the close callback, see |read-in-close-cb|.
|
||||
|
||||
Note that if the job exits before you read the output, the output may be lost.
|
||||
This depends on the system (on Unix this happens because closing the write end
|
||||
of a pipe causes the read end to get EOF). To avoid this make the job sleep
|
||||
for a short while before it exits.
|
||||
|
||||
The handler defined for "out_cb" will not receive stderr. If you want to
|
||||
handle that separately, add an "err_cb" handler: >
|
||||
let job = job_start(command, {"out_cb": "MyHandler",
|
||||
@@ -516,7 +521,7 @@ If the job can take some time and you don't need intermediate results, you can
|
||||
add a close callback and read the output there: >
|
||||
|
||||
func! CloseHandler(channel)
|
||||
while ch_status(a:channel) == 'buffered'
|
||||
while ch_status(a:channel, {'part': 'out'}) == 'buffered'
|
||||
echomsg ch_read(a:channel)
|
||||
endwhile
|
||||
endfunc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.0. Last change: 2016 Aug 27
|
||||
*cmdline.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -229,9 +229,10 @@ CTRL-Y When there is a modeless selection, copy the selection into
|
||||
the clipboard. |modeless-selection|
|
||||
If there is no selection CTRL-Y is inserted as a character.
|
||||
|
||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||
CTRL-M or CTRL-J *c_CTRL-M* *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||
<CR> or <NL> start entered command
|
||||
*c_<Esc>* *c_Esc*
|
||||
|
||||
CTRL-[ *c_CTRL-[* *c_<Esc>* *c_Esc*
|
||||
<Esc> When typed and 'x' not present in 'cpoptions', quit
|
||||
Command-line mode without executing. In macros or when 'x'
|
||||
present in 'cpoptions', start entered command.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Aug 06
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -181,7 +181,8 @@ start editing another file, Vim will refuse this. In order to overrule this
|
||||
protection, add a '!' to the command. The changes will then be lost. For
|
||||
example: ":q" will not work if the buffer was changed, but ":q!" will. To see
|
||||
whether the buffer was changed use the "CTRL-G" command. The message includes
|
||||
the string "[Modified]" if the buffer has been changed.
|
||||
the string "[Modified]" if the buffer has been changed, or "+" if the 'm' flag
|
||||
is in 'shortmess'.
|
||||
|
||||
If you want to automatically save the changes without asking, switch on the
|
||||
'autowriteall' option. 'autowrite' is the associated Vi-compatible option
|
||||
|
||||
+49
-25
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Sep 07
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -125,7 +125,8 @@ cleared. A List, Dictionary or Float is not a Number or String, thus
|
||||
evaluates to FALSE.
|
||||
|
||||
*E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
|
||||
List, Dictionary, Funcref and Job types are not automatically converted.
|
||||
List, Dictionary, Funcref, Job and Channel types are not automatically
|
||||
converted.
|
||||
|
||||
*E805* *E806* *E808*
|
||||
When mixing Number and Float the Number is converted to Float. Otherwise
|
||||
@@ -643,7 +644,7 @@ It's possible to form a variable name with curly braces, see
|
||||
|
||||
Expression syntax summary, from least to most significant:
|
||||
|
||||
|expr1| expr2
|
||||
|expr1| expr2
|
||||
expr2 ? expr1 : expr1 if-then-else
|
||||
|
||||
|expr2| expr3
|
||||
@@ -691,7 +692,7 @@ Expression syntax summary, from least to most significant:
|
||||
expr8.name entry in a |Dictionary|
|
||||
expr8(expr1, ...) function call with |Funcref| variable
|
||||
|
||||
|expr9| number number constant
|
||||
|expr9| number number constant
|
||||
"string" string constant, backslash is special
|
||||
'string' string constant, ' is doubled
|
||||
[expr1, ...] |List|
|
||||
@@ -957,7 +958,7 @@ expr8[expr1] item of String or |List| *expr-[]* *E111*
|
||||
*E909* *subscript*
|
||||
If expr8 is a Number or String this results in a String that contains the
|
||||
expr1'th single byte from expr8. expr8 is used as a String, expr1 as a
|
||||
Number. This doesn't recognize multi-byte encodings, see |byteidx()| for
|
||||
Number. This doesn't recognize multi-byte encodings, see `byteidx()` for
|
||||
an alternative, or use `split()` to turn the string into a list of characters.
|
||||
|
||||
Index zero gives the first byte. This is like it works in C. Careful:
|
||||
@@ -1244,7 +1245,7 @@ The arguments are optional. Example: >
|
||||
< error function
|
||||
*closure*
|
||||
Lambda expressions can access outer scope variables and arguments. This is
|
||||
often called a closure. Example where "i" a and "a:arg" are used in a lambda
|
||||
often called a closure. Example where "i" and "a:arg" are used in a lambda
|
||||
while they exist in the function scope. They remain valid even after the
|
||||
function returns: >
|
||||
:function Foo(arg)
|
||||
@@ -2030,7 +2031,8 @@ ch_sendraw({handle}, {string} [, {options}])
|
||||
any send {string} over raw {handle}
|
||||
ch_setoptions({handle}, {options})
|
||||
none set options for {handle}
|
||||
ch_status({handle}) String status of channel {handle}
|
||||
ch_status({handle} [, {options}])
|
||||
String status of channel {handle}
|
||||
changenr() Number current change number
|
||||
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
@@ -2072,8 +2074,8 @@ expand({expr} [, {nosuf} [, {list}]])
|
||||
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
filereadable({file}) Number |TRUE| if {file} is a readable file
|
||||
filewritable({file}) Number |TRUE| if {file} is a writable file
|
||||
filter({expr}, {string}) List/Dict remove items from {expr} where
|
||||
{string} is 0
|
||||
filter({expr1}, {expr2}) List/Dict remove items from {expr1} where
|
||||
{expr2} is 0
|
||||
finddir({name}[, {path}[, {count}]])
|
||||
String find directory {name} in {path}
|
||||
findfile({name}[, {path}[, {count}]])
|
||||
@@ -2097,7 +2099,7 @@ garbagecollect([{atexit}]) none free memory, breaking cyclic references
|
||||
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
|
||||
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
|
||||
get({func}, {what}) any get property of funcref/partial {func}
|
||||
getbufinfo([{expr}]) List information about buffers
|
||||
getbufinfo([{expr}]) List information about buffers
|
||||
getbufline({expr}, {lnum} [, {end}])
|
||||
List lines {lnum} to {end} of buffer {expr}
|
||||
getbufvar({expr}, {varname} [, {def}])
|
||||
@@ -2128,12 +2130,12 @@ getqflist([{what}]) List list of quickfix items
|
||||
getreg([{regname} [, 1 [, {list}]]])
|
||||
String or List contents of register
|
||||
getregtype([{regname}]) String type of register
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabvar({nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
|
||||
any {name} in {winnr} in tab page {tabnr}
|
||||
getwininfo([{winid}]) List list of windows
|
||||
getwininfo([{winid}]) List list of windows
|
||||
getwinposx() Number X coord in pixels of GUI Vim window
|
||||
getwinposy() Number Y coord in pixels of GUI Vim window
|
||||
getwinvar({nr}, {varname} [, {def}])
|
||||
@@ -2197,7 +2199,7 @@ localtime() Number current time
|
||||
log({expr}) Float natural logarithm (base e) of {expr}
|
||||
log10({expr}) Float logarithm of Float {expr} to base 10
|
||||
luaeval({expr}[, {expr}]) any evaluate |Lua| expression
|
||||
map({expr}, {string}) List/Dict change each item in {expr} to {expr}
|
||||
map({expr1}, {expr2}) List/Dict change each item in {expr1} to {expr}
|
||||
maparg({name}[, {mode} [, {abbr} [, {dict}]]])
|
||||
String or Dict
|
||||
rhs of mapping {name} in mode {mode}
|
||||
@@ -3041,7 +3043,8 @@ ch_info({handle}) *ch_info()*
|
||||
Returns a Dictionary with information about {handle}. The
|
||||
items are:
|
||||
"id" number of the channel
|
||||
"status" "open" (any part is open) or "closed"
|
||||
"status" "open", "buffered" or "closed", like
|
||||
ch_status()
|
||||
When opened with ch_open():
|
||||
"hostname" the hostname of the address
|
||||
"port" the port of the address
|
||||
@@ -3050,11 +3053,11 @@ ch_info({handle}) *ch_info()*
|
||||
"sock_io" "socket"
|
||||
"sock_timeout" timeout in msec
|
||||
When opened with job_start():
|
||||
"out_status" "open" or "closed"
|
||||
"out_status" "open", "buffered" or "closed"
|
||||
"out_mode" "NL", "RAW", "JSON" or "JS"
|
||||
"out_io" "null", "pipe", "file" or "buffer"
|
||||
"out_timeout" timeout in msec
|
||||
"err_status" "open" or "closed"
|
||||
"err_status" "open", "buffered" or "closed"
|
||||
"err_mode" "NL", "RAW", "JSON" or "JS"
|
||||
"err_io" "out", "null", "pipe", "file" or "buffer"
|
||||
"err_timeout" timeout in msec
|
||||
@@ -3069,7 +3072,7 @@ ch_log({msg} [, {handle}]) *ch_log()*
|
||||
When {handle} is passed the channel number is used for the
|
||||
message.
|
||||
{handle} can be Channel or a Job that has a Channel. The
|
||||
Channel must open.
|
||||
Channel must be open for the channel number to be used.
|
||||
|
||||
ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
Start logging channel activity to {fname}.
|
||||
@@ -3139,7 +3142,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()*
|
||||
These options cannot be changed:
|
||||
"waittime" only applies to |ch_open()|
|
||||
|
||||
ch_status({handle}) *ch_status()*
|
||||
ch_status({handle} [, {options}]) *ch_status()*
|
||||
Return the status of {handle}:
|
||||
"fail" failed to open the channel
|
||||
"open" channel can be used
|
||||
@@ -3149,6 +3152,11 @@ ch_status({handle}) *ch_status()*
|
||||
"buffered" is used when the channel was closed but there is
|
||||
still data that can be obtained with |ch_read()|.
|
||||
|
||||
If {options} is given it can contain a "part" entry to specify
|
||||
the part of the channel to return the status for: "out" or
|
||||
"err". For example, to get the error status: >
|
||||
ch_status(job, {"part": "err"})
|
||||
<
|
||||
*copy()*
|
||||
copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't
|
||||
different from using {expr} directly.
|
||||
@@ -3701,9 +3709,10 @@ filter({expr1}, {expr2}) *filter()*
|
||||
is zero remove the item from the |List| or |Dictionary|.
|
||||
{expr2} must be a |string| or |Funcref|.
|
||||
|
||||
if {expr2} is a |string|, inside {expr2} |v:val| has the value
|
||||
If {expr2} is a |string|, inside {expr2} |v:val| has the value
|
||||
of the current item. For a |Dictionary| |v:key| has the key
|
||||
of the current item.
|
||||
of the current item and for a |List| |v:key| has the index of
|
||||
the current item.
|
||||
Examples: >
|
||||
call filter(mylist, 'v:val !~ "OLD"')
|
||||
< Removes the items where "OLD" appears. >
|
||||
@@ -3725,6 +3734,10 @@ filter({expr1}, {expr2}) *filter()*
|
||||
return a:idx % 2 == 1
|
||||
endfunc
|
||||
call filter(mylist, function('Odd'))
|
||||
< It is shorter when using a |lambda|: >
|
||||
call filter(myList, {idx, val -> idx * val <= 42})
|
||||
< If you do not use "val" you can leave it out: >
|
||||
call filter(myList, {idx -> idx % 2 == 1})
|
||||
<
|
||||
The operation is done in-place. If you want a |List| or
|
||||
|Dictionary| to remain unmodified make a copy first: >
|
||||
@@ -4274,7 +4287,9 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
locale locale names (as output of locale -a)
|
||||
mapping mapping name
|
||||
menu menus
|
||||
messages |:messages| suboptions
|
||||
option options
|
||||
packadd optional package |pack-add| names
|
||||
shellcmd Shell command
|
||||
sign |:sign| suboptions
|
||||
syntax syntax file names |'syntax'|
|
||||
@@ -4356,7 +4371,7 @@ getfperm({fname}) *getfperm()*
|
||||
< This will hopefully (from a security point of view) display
|
||||
the string "rw-r--r--" or even "rw-------".
|
||||
|
||||
For setting permissins use |setfperm()|.
|
||||
For setting permissions use |setfperm()|.
|
||||
|
||||
getftime({fname}) *getftime()*
|
||||
The result is a Number, which is the last modification time of
|
||||
@@ -4503,7 +4518,8 @@ getqflist([{what}]) *getqflist()*
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
returns only the items listed in {what} as a dictionary. The
|
||||
following string items are supported in {what}:
|
||||
nr get information for this quickfix list
|
||||
nr get information for this quickfix list; zero
|
||||
means the current quickfix list
|
||||
title get the list title
|
||||
winid get the |window-ID| (if opened)
|
||||
all all of the above quickfix properties
|
||||
@@ -4782,6 +4798,7 @@ histadd({history}, {item}) *histadd()*
|
||||
"expr" or "=" typed expression history
|
||||
"input" or "@" input line history
|
||||
"debug" or ">" debug command history
|
||||
empty the current or last used history
|
||||
The {history} string does not need to be the whole name, one
|
||||
character is sufficient.
|
||||
If {item} does already exist in the history, it will be
|
||||
@@ -5439,6 +5456,10 @@ map({expr1}, {expr2}) *map()*
|
||||
return a:key . '-' . a:val
|
||||
endfunc
|
||||
call map(myDict, function('KeyValue'))
|
||||
< It is shorter when using a |lambda|: >
|
||||
call map(myDict, {key, val -> key . '-' . val})
|
||||
< If you do not use "val" you can leave it out: >
|
||||
call map(myDict, {key -> 'item: ' . key})
|
||||
<
|
||||
The operation is done in-place. If you want a |List| or
|
||||
|Dictionary| to remain unmodified make a copy first: >
|
||||
@@ -6149,9 +6170,9 @@ range({expr} [, {max} [, {stride}]]) *range()*
|
||||
*readfile()*
|
||||
readfile({fname} [, {binary} [, {max}]])
|
||||
Read file {fname} and return a |List|, each line of the file
|
||||
as an item. Lines broken at NL characters. Macintosh files
|
||||
separated with CR will result in a single long line (unless a
|
||||
NL appears somewhere).
|
||||
as an item. Lines are broken at NL characters. Macintosh
|
||||
files separated with CR will result in a single long line
|
||||
(unless a NL appears somewhere).
|
||||
All NUL characters are replaced with a NL character.
|
||||
When {binary} contains "b" binary mode is used:
|
||||
- When the last line ends in a NL an extra empty list item is
|
||||
@@ -7371,6 +7392,9 @@ submatch({nr}[, {list}]) *submatch()* *E935*
|
||||
|substitute()| this list will always contain one or zero
|
||||
items, since there are no real line breaks.
|
||||
|
||||
When substitute() is used recursively only the submatches in
|
||||
the current (deepest) call can be obtained.
|
||||
|
||||
Example: >
|
||||
:s/\d\+/\=submatch(0) + 1/
|
||||
< This finds the first number in the line and adds one to it.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_mac.txt* For Vim version 7.4. Last change: 2012 Jan 13
|
||||
*gui_mac.txt* For Vim version 8.0. Last change: 2012 Jan 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bjorn Winckler
|
||||
|
||||
+7
-28
@@ -49,10 +49,6 @@ If you want Vim to start with a maximized window, add this command to your
|
||||
vimrc or gvimrc file: >
|
||||
au GUIEnter * simalt ~x
|
||||
<
|
||||
*gui-w32s*
|
||||
There is a specific version of gvim.exe that runs under the Win32s subsystem
|
||||
of Windows 3.1 or 3.11. See |win32s|.
|
||||
|
||||
|
||||
Using Vim as a plugin *gui-w32-windowid*
|
||||
|
||||
@@ -100,9 +96,10 @@ when you have got a new version):
|
||||
You can also install Vim in the "Send To" menu:
|
||||
1. Start a Windows Explorer
|
||||
2. Navigate to your sendto directory:
|
||||
Windows 95: %windir%\sendto (e.g. "c:\windows\sendto")
|
||||
Windows NT: %windir%\profiles\%user%\sendto (e.g.
|
||||
"c:\winnt\profiles\mattha\sendto").
|
||||
"c:\winnt\profiles\mattha\sendto")
|
||||
Windows XP: C:\Documents and Settings\%user%\SendTo
|
||||
Windows Vista: C:\Users\%user%\AppData\Roaming\Microsoft\Windows\SendTo .
|
||||
3. Right-click in the file pane and select New->Shortcut
|
||||
4. Follow the shortcut wizard, using the full path to VIM/GVIM.
|
||||
|
||||
@@ -274,35 +271,17 @@ WARNING: If you close this window with the "X" button, and confirm the
|
||||
question if you really want to kill the application, Vim may be killed too!
|
||||
(This does not apply to commands run asynchronously with ":!start".)
|
||||
|
||||
In Windows 95, the window in which the commands are executed is always 25x80
|
||||
characters, to be as DOS compatible as possible (this matters!). The default
|
||||
system font is used. On NT, the window will be the default you have set up for
|
||||
"Console" in Control Panel. On Win32s, the properties of the DOS box are
|
||||
determined by _default.pif in the windows directory.
|
||||
|
||||
*msdos-mode*
|
||||
If you get a dialog that says "This program is set to run in MS-DOS mode..."
|
||||
when you run an external program, you can solve this by changing the
|
||||
properties of the associated shortcut:
|
||||
- Use a Windows Explorer to find the command.com that is used. It can be
|
||||
c:\command.com, c:\dos\command.com, c:\windows\command.com, etc.
|
||||
- With the right mouse button, select properties of this command.com.
|
||||
- In the Program tab select "Advanced".
|
||||
- Unselect "MS-DOS mode".
|
||||
- Click "OK" twice.
|
||||
The window in which the commands are executed will be the default you have set
|
||||
up for "Console" in Control Panel.
|
||||
|
||||
*win32-!start*
|
||||
Normally, Vim waits for a command to complete before continuing (this makes
|
||||
sense for most shell commands which produce output for Vim to use). If you
|
||||
want Vim to start a program and return immediately, you can use the following
|
||||
syntax on W95 & NT: >
|
||||
syntax: >
|
||||
:!start [/min] {command}
|
||||
The optional "/min" causes the window to be minimized.
|
||||
|
||||
On Win32s, you will have to go to another window instead. Don't forget that
|
||||
you must tell Windows 3.1x to keep executing a DOS command in the background
|
||||
while you switch back to Vim.
|
||||
|
||||
==============================================================================
|
||||
5. Special colors *win32-colors*
|
||||
|
||||
@@ -311,7 +290,7 @@ On Win32, the normal DOS colors can be used. See |dos-colors|.
|
||||
Additionally the system configured colors can also be used. These are known
|
||||
by the names Sys_XXX, where XXX is the appropriate system color name, from the
|
||||
following list (see the Win32 documentation for full descriptions). Case is
|
||||
ignored. Note: On Win32s not all of these colors are supported.
|
||||
ignored.
|
||||
|
||||
Sys_3DDKShadow Sys_3DFace Sys_BTNFace
|
||||
Sys_3DHilight Sys_3DHighlight Sys_BTNHilight
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 8.0. Last change: 2016 Aug 21
|
||||
*gui_x11.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -484,7 +484,7 @@ your system has a working pkg-config together with the .pc file of the
|
||||
required GTK+. For that, say, run the following on the command line to see if
|
||||
your pkg-config works with your GTK+ 2: >
|
||||
|
||||
$ pkgconfig --modversion gtk+-2.0
|
||||
$ pkg-config --modversion gtk+-2.0
|
||||
|
||||
Replace gtk+-2.0 with gtk+-3.0 for GTK+ 3. If you get the correct version
|
||||
number of your GTK+, you can proceed; if not, you probably need to do some
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 8.0. Last change: 2016 Mar 31
|
||||
*help.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -135,6 +135,7 @@ Advanced editing ~
|
||||
|autocmd.txt| automatically executing commands on an event
|
||||
|filetype.txt| settings done specifically for a type of file
|
||||
|eval.txt| expression evaluation, conditional commands
|
||||
|channel.txt| Jobs, Channels, inter-process communication
|
||||
|fold.txt| hide (fold) ranges of lines
|
||||
|
||||
Special issues ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*if_pyth.txt* For Vim version 8.0. Last change: 2016 Sep 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -748,11 +748,11 @@ match the Python 2.x or Python 3 version Vim was compiled with.
|
||||
The `:py3` and `:python3` commands work similar to `:python`. A simple check
|
||||
if the `:py3` command is working: >
|
||||
:py3 print("Hello")
|
||||
< *:py3file*
|
||||
|
||||
To see what version of Python you have: >
|
||||
:py3 import sys
|
||||
:py3 print(sys.version)
|
||||
|
||||
< *:py3file*
|
||||
The `:py3file` command works similar to `:pyfile`.
|
||||
*:py3do*
|
||||
The `:py3do` command works similar to `:pydo`.
|
||||
|
||||
@@ -207,21 +207,19 @@ MS-Windows ~
|
||||
|
||||
You need to install the right version of Ruby for this to work. You can find
|
||||
the package to download from:
|
||||
http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
|
||||
Currently that is ruby-1.9.2-p136-i386-mswin32.zip
|
||||
http://rubyinstaller.org/downloads/
|
||||
Currently that is rubyinstaller-2.2.5.exe
|
||||
|
||||
To use the Ruby interface the Ruby DLL must be in your search path. In a
|
||||
console window type "path" to see what directories are used. The 'rubydll'
|
||||
option can be also used to specify the Ruby DLL.
|
||||
|
||||
The name of the DLL must match the Ruby version Vim was compiled with.
|
||||
Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know
|
||||
Currently the name is "msvcrt-ruby220.dll". That is for Ruby 2.2.X. To know
|
||||
for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
|
||||
|
||||
If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file
|
||||
and comment-out the check for _MSC_VER.
|
||||
You may also need to rename the include directory name to match the version,
|
||||
strangely for Ruby 1.9.3 the directory is called 1.9.1.
|
||||
If you want to build Vim with RubyInstaller 1.9 or 2.X using MSVC, you need
|
||||
some tricks. See the src/INSTALLpc.txt for detail.
|
||||
|
||||
|
||||
Unix ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.0. Last change: 2016 Aug 27
|
||||
*index.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1002,7 +1002,7 @@ tag command action in Command-line editing mode ~
|
||||
|c_CTRL-L| CTRL-L do completion on the pattern in front of the
|
||||
cursor and insert the longest common part
|
||||
|c_<CR>| <CR> execute entered command
|
||||
|c_<CR>| CTRL-M same as <CR>
|
||||
|c_CTRL-M| CTRL-M same as <CR>
|
||||
|c_CTRL-N| CTRL-N after using 'wildchar' with multiple matches:
|
||||
go to next match, otherwise: same as <Down>
|
||||
CTRL-O not used
|
||||
@@ -1026,7 +1026,7 @@ tag command action in Command-line editing mode ~
|
||||
CTRL-Y copy (yank) modeless selection
|
||||
CTRL-Z not used (reserved for suspend)
|
||||
|c_<Esc>| <Esc> abandon command-line without executing it
|
||||
|c_<Esc>| CTRL-[ same as <Esc>
|
||||
|c_CTRL-[| CTRL-[ same as <Esc>
|
||||
|c_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode, abandon command-line
|
||||
|c_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode',
|
||||
abandon command-line
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 8.0. Last change: 2015 Jan 20
|
||||
*intro.txt* For Vim version 8.0. Last change: 2016 Sep 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -135,10 +135,14 @@ http://www.vim.org/maillist.php
|
||||
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will see
|
||||
the message. If you don't want that, e.g. because it is a security issue,
|
||||
send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram).
|
||||
There are two ways to report bugs, both work:
|
||||
1. Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will
|
||||
see the message. If you don't want that, e.g. because it is a security
|
||||
issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer
|
||||
(that's Bram).
|
||||
2. Open issue on GitHub: https://github.com/vim/vim/issues
|
||||
The text will be forwarded to the vim-dev maillist.
|
||||
|
||||
Please be brief; all the time that is spent on answering mail is subtracted
|
||||
from the time that is spent on improving Vim! Always give a reproducible
|
||||
|
||||
@@ -1280,6 +1280,7 @@ completion can be enabled:
|
||||
-complete=locale locale names (as output of locale -a)
|
||||
-complete=mapping mapping name
|
||||
-complete=menu menus
|
||||
-complete=messages |:messages| suboptions
|
||||
-complete=option options
|
||||
-complete=packadd optional package |pack-add| names
|
||||
-complete=shellcmd Shell command
|
||||
|
||||
+18
-14
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Sep 02
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,7 +10,7 @@ Options *options*
|
||||
2. Automatically setting options |auto-setting|
|
||||
3. Options summary |option-summary|
|
||||
|
||||
For an overview of options see help.txt |option-list|.
|
||||
For an overview of options see quickref.txt |option-list|.
|
||||
|
||||
Vim has a number of internal variables and switches which can be set to
|
||||
achieve special effects. These options come in three forms:
|
||||
@@ -1747,12 +1747,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
option + set value effect ~
|
||||
|
||||
'allowrevins' off no CTRL-_ command
|
||||
'backupcopy' Unix: "yes" backup file is a copy
|
||||
others: "auto" copy or rename backup file
|
||||
'backspace' "" normal backspace
|
||||
'backupcopy' Unix: "yes" backup file is a copy
|
||||
else: "auto" copy or rename backup file
|
||||
'backup' off no backup file
|
||||
'cindent' off no C code indentation
|
||||
'cedit' + "" no key to open the |cmdwin|
|
||||
'cindent' off no C code indentation
|
||||
'cpoptions' + (all flags) Vi-compatible flags
|
||||
'cscopetag' off don't use cscope for ":tag"
|
||||
'cscopetagorder' 0 see |cscopetagorder|
|
||||
@@ -1794,6 +1794,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'textwidth' 0 no automatic line wrap
|
||||
'tildeop' off tilde is not an operator
|
||||
'ttimeout' off no terminal timeout
|
||||
'viminfo' + {unchanged} no viminfo file
|
||||
'whichwrap' + "" left-right movements don't wrap
|
||||
'wildchar' + CTRL-E only when the current value is <Tab>
|
||||
use CTRL-E for cmdline completion
|
||||
@@ -2646,7 +2647,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
uhex Show unprintable characters hexadecimal as <xx>
|
||||
instead of using ^C and ~C.
|
||||
|
||||
When neither "lastline" or "truncate" is included, a last line that
|
||||
When neither "lastline" nor "truncate" is included, a last line that
|
||||
doesn't fit is replaced with "@" lines.
|
||||
|
||||
*'eadirection'* *'ead'*
|
||||
@@ -4440,8 +4441,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
original position when no match is found and when pressing <Esc>. You
|
||||
still need to finish the search command with <Enter> to move the
|
||||
cursor to the match.
|
||||
You can use the CTRL-N and CTRL-P keys to move to the next and
|
||||
previous match. |c_CTRL-N| |c_CTRL-P|
|
||||
You can use the CTRL-G and CTRL-T keys to move to the next and
|
||||
previous match. |c_CTRL-G| |c_CTRL-T|
|
||||
When compiled with the |+reltime| feature Vim only searches for about
|
||||
half a second. With a complicated pattern and/or a lot of text the
|
||||
match may not be found. This is to avoid that Vim hangs while you
|
||||
@@ -6274,7 +6275,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
personal preferences to overrule or add to the distributed defaults
|
||||
or system-wide settings (rarely needed).
|
||||
|
||||
More entries are added when using |packages|.
|
||||
More entries are added when using |packages|. If it gets very long
|
||||
then `:set rtp` will be truncated, use `:echo &rtp` to see the full
|
||||
string.
|
||||
|
||||
Note that, unlike 'path', no wildcards like "**" are allowed. Normal
|
||||
wildcards are allowed, but can significantly slow down searching for
|
||||
@@ -6335,7 +6338,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is set to 1 when 'compatible' is set.
|
||||
|
||||
*'scrolloff'* *'so'*
|
||||
'scrolloff' 'so' number (default 0)
|
||||
'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
Minimal number of screen lines to keep above and below the cursor.
|
||||
@@ -7840,7 +7843,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'timeout' 'to' boolean (default on)
|
||||
global
|
||||
*'ttimeout'* *'nottimeout'*
|
||||
'ttimeout' boolean (default off)
|
||||
'ttimeout' boolean (default off, set in |defaults.vim|))
|
||||
global
|
||||
{not in Vi}
|
||||
These two options together determine the behavior when part of a
|
||||
@@ -7875,7 +7878,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in all versions of Vi}
|
||||
*'ttimeoutlen'* *'ttm'*
|
||||
'ttimeoutlen' 'ttm' number (default -1)
|
||||
'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|))
|
||||
global
|
||||
{not in Vi}
|
||||
The time in milliseconds that is waited for a key code or mapped key
|
||||
@@ -8129,8 +8132,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict
|
||||
with them).
|
||||
This option is automatically set to "xterm", when the 'term' option is
|
||||
set to a name that starts with "xterm", "mlterm", "screen", "st" (full
|
||||
match only), "st-" or "stterm", and 'ttymouse' is not set already.
|
||||
set to a name that starts with "xterm", "mlterm", "screen", "tmux",
|
||||
"st" (full match only), "st-" or "stterm", and 'ttymouse' is not set
|
||||
already.
|
||||
Additionally, if vim is compiled with the |+termresponse| feature and
|
||||
|t_RV| is set to the escape sequence to request the xterm version
|
||||
number, more intelligent detection process runs.
|
||||
|
||||
+16
-134
@@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 8.0. Last change: 2016 Aug 28
|
||||
*os_win32.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
@@ -7,20 +7,18 @@
|
||||
*win32* *Win32* *MS-Windows*
|
||||
This file documents the idiosyncrasies of the Win32 version of Vim.
|
||||
|
||||
The Win32 version of Vim works on Windows NT, 95, 98, ME, XP, Vista and
|
||||
Windows 7. There are both console and GUI versions.
|
||||
The Win32 version of Vim works on Windows XP, Vista, 7, 8 and 10. There are
|
||||
both console and GUI versions.
|
||||
|
||||
The 32 bit version also runs on 64 bit MS-Windows systems.
|
||||
|
||||
There is GUI version for use in the Win32s subsystem in Windows 3.1[1]. You
|
||||
can also use the 32-bit DOS version of Vim instead. See |os_msdos.txt|.
|
||||
|
||||
1. Known problems |win32-problems|
|
||||
2. Startup |win32-startup|
|
||||
3. Restore screen contents |win32-restore|
|
||||
4. Using the mouse |win32-mouse|
|
||||
5. Running under Windows 3.1 |win32-win3.1|
|
||||
6. Win32 mini FAQ |win32-faq|
|
||||
5. Running under Windows 95 |win32-win95|
|
||||
6. Running under Windows 3.1 |win32-win3.1|
|
||||
7. Win32 mini FAQ |win32-faq|
|
||||
|
||||
Additionally, there are a number of common Win32 and DOS items:
|
||||
File locations |dos-locations|
|
||||
@@ -43,20 +41,7 @@ The GUI version was made by George V. Reilly and Robert Webb.
|
||||
For compiling see "src/INSTALLpc.txt". *win32-compiling*
|
||||
|
||||
==============================================================================
|
||||
1. Known problems *windows95* *win32-problems*
|
||||
|
||||
There are a few known problems with running in a console on Windows 95. As
|
||||
far as we know, this is the same in Windows 98 and Windows ME.
|
||||
|
||||
Comments from somebody working at Microsoft: "Win95 console support has always
|
||||
been and will always be flaky".
|
||||
1. Dead key support doesn't work.
|
||||
2. Resizing the window with ":set columns=nn lines=nn" works, but executing
|
||||
external commands MAY CAUSE THE SYSTEM TO HANG OR CRASH.
|
||||
3. Screen updating is slow, unless you change 'columns' or 'lines' to a
|
||||
non-DOS value. But then the second problem applies!
|
||||
|
||||
If this bothers you, use the 32 bit MS-DOS version or the Win32 GUI version.
|
||||
1. Known problems *win32-problems*
|
||||
|
||||
When doing file name completion, Vim also finds matches for the short file
|
||||
name. But Vim will still find and use the corresponding long file name. For
|
||||
@@ -141,60 +126,20 @@ When the mouse doesn't work, try disabling the "Quick Edit Mode" feature of
|
||||
the console.
|
||||
|
||||
==============================================================================
|
||||
5. Running under Windows 3.1 *win32-win3.1*
|
||||
5. Running under Windows 95 *win32-win95*
|
||||
*windows95* *windows98* *windowsme*
|
||||
Windows 95/98/ME support was removed in patch 8.0.0029 If you want to use it
|
||||
you will need to get a version older than that.
|
||||
|
||||
*win32s* *windows-3.1*
|
||||
==============================================================================
|
||||
6. Running under Windows 3.1 *win32-win3.1*
|
||||
|
||||
*win32s* *windows-3.1* *gui-w32s*
|
||||
There was a special version of Gvim that runs under Windows 3.1 and 3.11.
|
||||
Support was removed in patch 7.4.1363.
|
||||
|
||||
==============================================================================
|
||||
6. Win32 mini FAQ *win32-faq*
|
||||
|
||||
Q. Why does the Win32 version of Vim update the screen so slowly on Windows 95?
|
||||
A. The support for Win32 console mode applications is very buggy in Win95.
|
||||
For some unknown reason, the screen updates very slowly when Vim is run at
|
||||
one of the standard resolutions (80x25, 80x43, or 80x50) and the 16-bit DOS
|
||||
version updates the screen much more quickly than the Win32 version.
|
||||
However, if the screen is set to some other resolution, such as by ":set
|
||||
columns=100" or ":set lines=40", screen updating becomes about as fast as
|
||||
it is with the 16-bit version.
|
||||
|
||||
WARNING: Changing 'columns' may make Windows 95 crash while updating the
|
||||
window (complaints --> Microsoft). Since this mostly works, this has not
|
||||
been disabled, but be careful with changing 'columns'.
|
||||
|
||||
Changing the screen resolution makes updates faster, but it brings
|
||||
additional problems. External commands (e.g., ":!dir") can cause Vim to
|
||||
freeze when the screen is set to a non-standard resolution, particularly
|
||||
when 'columns' is not equal to 80. It is not possible for Vim to reliably
|
||||
set the screen resolution back to the value it had upon startup before
|
||||
running external commands, so if you change the number of 'lines' or
|
||||
'columns', be very, very careful. In fact, Vim will not allow you to
|
||||
execute external commands when 'columns' is not equal to 80, because it is
|
||||
so likely to freeze up afterwards.
|
||||
|
||||
None of the above applies on Windows NT. Screen updates are fast, no
|
||||
matter how many 'lines' or 'columns' the window has, and external commands
|
||||
do not cause Vim to freeze.
|
||||
|
||||
Q. So if the Win32 version updates the screen so slowly on Windows 95 and the
|
||||
16-bit DOS version updates the screen quickly, why would I want to run the
|
||||
Win32 version?
|
||||
A. Firstly, the Win32 version isn't that slow, especially when the screen is
|
||||
set to some non-standard number of 'lines' or 'columns'. Secondly, the
|
||||
16-bit DOS version has some severe limitations: It can't do big changes and
|
||||
it doesn't know about long file names. The Win32 version doesn't have these
|
||||
limitations and it's faster overall (the same is true for the 32-bit DJGPP
|
||||
DOS version of Vim). The Win32 version is smarter about handling the
|
||||
screen, the mouse, and the keyboard than the DJGPP version is.
|
||||
|
||||
Q. And what about the 16-bit DOS version versus the Win32 version on NT?
|
||||
A. There are no good reasons to run the 16-bit DOS version on NT. The Win32
|
||||
version updates the screen just as fast as the 16-bit version does when
|
||||
running on NT. All of the above disadvantages apply. Finally, DOS
|
||||
applications can take a long time to start up and will run more slowly. On
|
||||
non-Intel NT platforms, the DOS version is almost unusably slow, because it
|
||||
runs on top of an 80x86 emulator.
|
||||
7. Win32 mini FAQ *win32-faq*
|
||||
|
||||
Q. How do I change the font?
|
||||
A. In the GUI version, you can use the 'guifont' option. Example: >
|
||||
@@ -202,47 +147,6 @@ A. In the GUI version, you can use the 'guifont' option. Example: >
|
||||
< In the console version, you need to set the font of the console itself.
|
||||
You cannot do this from within Vim.
|
||||
|
||||
Q. When I change the size of the console window with ':set lines=xx' or
|
||||
similar, the font changes! (Win95)
|
||||
A. You have the console font set to 'Auto' in Vim's (or your MS-DOS prompt's)
|
||||
properties. This makes W95 guess (badly!) what font is best. Set an explicit
|
||||
font instead.
|
||||
|
||||
Q. Why can't I paste into Vim when running Windows 95?
|
||||
A. In the properties dialog box for the MS-DOS window, go to "MS-DOS
|
||||
Prompt/Misc/Fast pasting" and make sure that it is NOT checked. You should
|
||||
also do ":set paste" in Vim to avoid unexpected effects. |'paste'|
|
||||
|
||||
Q. How do I type dead keys on Windows 95, in the console version?
|
||||
(A dead key is an accent key, such as acute, grave, or umlaut, that doesn't
|
||||
produce a character by itself, but when followed by another key, produces
|
||||
an accented character, such as a-acute, e-grave, u-umlaut, n-tilde, and so
|
||||
on. Very useful for most European languages. English-language keyboard
|
||||
layouts don't use dead keys, as far as we know.)
|
||||
A. You don't. The console mode input routines simply do not work correctly in
|
||||
Windows 95, and I have not been able to work around them. In the words
|
||||
of a senior developer at Microsoft:
|
||||
Win95 console support has always been and will always be flaky.
|
||||
|
||||
The flakiness is unavoidable because we are stuck between the world of
|
||||
MS-DOS keyboard TSRs like KEYB (which wants to cook the data;
|
||||
important for international) and the world of Win32.
|
||||
|
||||
So keys that don't "exist" in MS-DOS land (like dead keys) have a
|
||||
very tenuous existence in Win32 console land. Keys that act
|
||||
differently between MS-DOS land and Win32 console land (like
|
||||
capslock) will act flaky.
|
||||
|
||||
Don't even _mention_ the problems with multiple language keyboard
|
||||
layouts...
|
||||
|
||||
You may be able to fashion some sort of workaround with the digraphs
|
||||
mechanism. |digraphs|
|
||||
|
||||
The best solution is to use the Win32 GUI version gvim.exe. Alternatively,
|
||||
you can try one of the DOS versions of Vim where dead keys reportedly do
|
||||
work.
|
||||
|
||||
Q. How do I type dead keys on Windows NT?
|
||||
A. Dead keys work on NT 3.51. Just type them as you would in any other
|
||||
application.
|
||||
@@ -349,28 +253,6 @@ A. You have two possible solutions depending on what you want:
|
||||
< The first command runs notepad minimized and the second one runs it
|
||||
normally.
|
||||
|
||||
Q. I'm using Win32s, and when I try to run an external command like "make",
|
||||
Vim doesn't wait for it to finish! Help!
|
||||
A. The problem is that a 32-bit application (Vim) can't get notification from
|
||||
Windows that a 16-bit application (your DOS session) has finished. Vim
|
||||
includes a work-around for this, but you must set up your DOS commands to
|
||||
run in a window, not full-screen. Unfortunately the default when you
|
||||
install Windows is full-screen. To change this:
|
||||
1) Start PIF editor (in the Main program group).
|
||||
2) Open the file "_DEFAULT.PIF" in your Windows directory.
|
||||
3) Changes the display option from "Full Screen" to "Windowed".
|
||||
4) Save and exit.
|
||||
|
||||
To test, start Vim and type >
|
||||
:!dir C:\<CR>".
|
||||
< You should see a DOS box window appear briefly with the directory listing.
|
||||
|
||||
Q. I use Vim under Win32s and NT. In NT, I can define the console to default to
|
||||
50 lines, so that I get a 80x50 shell when I ':sh'. Can I do the same in
|
||||
W3.1x, or am I stuck with 80x25?
|
||||
A. Edit SYSTEM.INI and add 'ScreenLines=50' to the [NonWindowsApp] section. DOS
|
||||
prompts and external DOS commands will now run in a 50-line window.
|
||||
|
||||
*windows-icon*
|
||||
Q. I don't like the Vim icon, can I change it?
|
||||
A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of
|
||||
|
||||
@@ -532,7 +532,7 @@ variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
|
||||
let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
|
||||
<
|
||||
(note: it has been reported that windows 7 with putty v0.6's "-batch" option
|
||||
doesn't work, so its best to leave it off for that system)
|
||||
doesn't work, so it's best to leave it off for that system)
|
||||
|
||||
See |netrw-p8| for more about putty, pscp, psftp, etc.
|
||||
|
||||
@@ -1206,7 +1206,7 @@ The :NetrwMB command is available outside of netrw buffers (once netrw has been
|
||||
invoked in the session).
|
||||
|
||||
The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By
|
||||
default, its stored on the first directory on the user's |'runtimepath'|.
|
||||
default, it's stored on the first directory on the user's |'runtimepath'|.
|
||||
|
||||
Related Topics:
|
||||
|netrw-gb| how to return (go) to a bookmark
|
||||
@@ -1431,7 +1431,7 @@ be used in that count.
|
||||
*.netrwhist*
|
||||
See |g:netrw_dirhistmax| for how to control the quantity of history stack
|
||||
slots. The file ".netrwhist" holds history when netrw (and vim) is not
|
||||
active. By default, its stored on the first directory on the user's
|
||||
active. By default, it's stored on the first directory on the user's
|
||||
|'runtimepath'|.
|
||||
|
||||
Related Topics:
|
||||
@@ -3271,7 +3271,7 @@ The user function is passed one argument; it resembles >
|
||||
|
||||
fun! ExampleUserMapFunc(islocal)
|
||||
<
|
||||
where a:islocal is 1 if its a local-directory system call or 0 when
|
||||
where a:islocal is 1 if it's a local-directory system call or 0 when
|
||||
remote-directory system call.
|
||||
|
||||
Use netrw#Expose("varname") to access netrw-internal (script-local)
|
||||
@@ -3595,7 +3595,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
|
||||
*netrw-p16*
|
||||
P16. When editing remote files (ex. :e ftp://hostname/path/file),
|
||||
under Windows I get an |E303| message complaining that its unable
|
||||
under Windows I get an |E303| message complaining that it's unable
|
||||
to open a swap file.
|
||||
|
||||
(romainl) It looks like you are starting Vim from a protected
|
||||
@@ -3649,7 +3649,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
||||
P21. I've made a directory (or file) with an accented character, but
|
||||
netrw isn't letting me enter that directory/read that file:
|
||||
|
||||
Its likely that the shell or o/s is using a different encoding
|
||||
It's likely that the shell or o/s is using a different encoding
|
||||
than you have vim (netrw) using. A patch to vim supporting
|
||||
"systemencoding" may address this issue in the future; for
|
||||
now, just have netrw use the proper encoding. For example: >
|
||||
|
||||
+28
-2
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 8.0. Last change: 2013 Apr 17
|
||||
*pi_zip.txt* For Vim version 8.0. Last change: 2016 Sep 13
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
The VIM LICENSE (see |copyright|) applies to the files in this
|
||||
package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use
|
||||
"zip.vim" instead of "VIM". Like anything else that's free, zip.vim
|
||||
@@ -33,6 +33,9 @@ Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
also write to the file. Currently, one may not make a new file in
|
||||
zip archives via the plugin.
|
||||
|
||||
*zip-x*
|
||||
x : may extract a listed file when the cursor is atop it
|
||||
|
||||
OPTIONS
|
||||
|
||||
*g:zip_nomax*
|
||||
@@ -60,6 +63,11 @@ Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
It's used during the writing (updating) of a file already in a zip
|
||||
file; by default: >
|
||||
let g:zip_zipcmd= "zip"
|
||||
<
|
||||
*g:zip_extractcmd*
|
||||
This option specifies the program (and any options needed) used to
|
||||
extract a file from a zip archive. By default, >
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
<
|
||||
PREVENTING LOADING~
|
||||
|
||||
@@ -83,8 +91,26 @@ Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
|
||||
One can simply extend this line to accommodate additional extensions that
|
||||
should be treated as zip files.
|
||||
|
||||
Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc.
|
||||
Currently (11/30/15) it holds: >
|
||||
|
||||
let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,
|
||||
\ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,
|
||||
\ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,
|
||||
\ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub'
|
||||
|
||||
==============================================================================
|
||||
4. History *zip-history* {{{1
|
||||
v28 Oct 08, 2014 * changed the sanity checks for executables to reflect
|
||||
the command actually to be attempted in zip#Read()
|
||||
and zip#Write()
|
||||
* added the extraction of a file capability
|
||||
Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list
|
||||
Sep 13, 2016 * added *.apk to the |g:zipPlugin_ext| list and
|
||||
sorted the suffices.
|
||||
v27 Jul 02, 2013 * sanity check: zipfile must have "PK" as its first
|
||||
two bytes.
|
||||
* modified to allow zipfile: entries in quickfix lists
|
||||
v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that
|
||||
are synonyms for .zip
|
||||
v25 Jun 27, 2011 * using keepj with unzip -Z
|
||||
|
||||
+28
-23
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2863,9 +2863,11 @@ vimrc file: >
|
||||
(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>)
|
||||
|
||||
|
||||
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
|
||||
*ft-posix-synax* *ft-dash-syntax*
|
||||
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
|
||||
|
||||
This covers the "normal" Unix (Bourne) sh, bash and the Korn shell.
|
||||
This covers syntax highlighting for the older Unix (Bourne) sh, and newer
|
||||
shells such as bash, dash, posix, and the Korn shells.
|
||||
|
||||
Vim attempts to determine which shell type is in use by specifying that
|
||||
various filenames are of specific types: >
|
||||
@@ -2874,28 +2876,31 @@ various filenames are of specific types: >
|
||||
bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash
|
||||
<
|
||||
If none of these cases pertain, then the first line of the file is examined
|
||||
(ex. /bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype,
|
||||
then that shelltype is used. However some files (ex. .profile) are known to
|
||||
be shell files but the type is not apparent. Furthermore, on many systems
|
||||
sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix).
|
||||
(ex. looking for /bin/sh /bin/ksh /bin/bash). If the first line specifies a
|
||||
shelltype, then that shelltype is used. However some files (ex. .profile) are
|
||||
known to be shell files but the type is not apparent. Furthermore, on many
|
||||
systems sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh"
|
||||
(Posix).
|
||||
|
||||
One may specify a global default by instantiating one of the following three
|
||||
One may specify a global default by instantiating one of the following
|
||||
variables in your <.vimrc>:
|
||||
|
||||
ksh: >
|
||||
ksh: >
|
||||
let g:is_kornshell = 1
|
||||
< posix: (using this is the same as setting is_kornshell to 1) >
|
||||
< posix: (using this is the nearly the same as setting g:is_kornshell to 1) >
|
||||
let g:is_posix = 1
|
||||
< bash: >
|
||||
let g:is_bash = 1
|
||||
< sh: (default) Bourne shell >
|
||||
let g:is_sh = 1
|
||||
|
||||
< (dash users should use posix)
|
||||
|
||||
If there's no "#! ..." line, and the user hasn't availed himself/herself of a
|
||||
default sh.vim syntax setting as just shown, then syntax/sh.vim will assume
|
||||
the Bourne shell syntax. No need to quote RFCs or market penetration
|
||||
statistics in error reports, please -- just select the default version of the
|
||||
sh your system uses in your <.vimrc>.
|
||||
sh your system uses and install the associated "let..." in your <.vimrc>.
|
||||
|
||||
The syntax/sh.vim file provides several levels of syntax-based folding: >
|
||||
|
||||
@@ -2904,7 +2909,7 @@ The syntax/sh.vim file provides several levels of syntax-based folding: >
|
||||
let g:sh_fold_enabled= 2 (enable heredoc folding)
|
||||
let g:sh_fold_enabled= 4 (enable if/do/for folding)
|
||||
>
|
||||
then various syntax items (HereDocuments and function bodies) become
|
||||
then various syntax items (ie. HereDocuments and function bodies) become
|
||||
syntax-foldable (see |:syn-fold|). You also may add these together
|
||||
to get multiple types of folding: >
|
||||
|
||||
@@ -2928,14 +2933,7 @@ reduce this, the "sh_maxlines" internal variable can be set. Example: >
|
||||
The default is to use the twice sh_minlines. Set it to a smaller number to
|
||||
speed up displaying. The disadvantage is that highlight errors may appear.
|
||||
|
||||
*g:sh_isk* *g:sh_noisk*
|
||||
The shell languages appear to let "." be part of words, commands, etc;
|
||||
consequently it should be in the isk for sh.vim. As of v116 of syntax/sh.vim,
|
||||
syntax/sh.vim will append the "." to |'iskeyword'| by default; you may control
|
||||
this behavior with: >
|
||||
let g:sh_isk = '..whatever characters you want as part of iskeyword'
|
||||
let g:sh_noisk= 1 " otherwise, if this exists, the isk will NOT chg
|
||||
<
|
||||
|
||||
*sh-embed* *sh-awk*
|
||||
Sh: EMBEDDING LANGUAGES~
|
||||
|
||||
@@ -3521,8 +3519,8 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
|
||||
and also determines where |:syn-keyword| will be checked for a new
|
||||
match.
|
||||
|
||||
It is recommended when writing syntax files, to use this command
|
||||
to the correct value for the specific syntax language and not change
|
||||
It is recommended when writing syntax files, to use this command to
|
||||
set the correct value for the specific syntax language and not change
|
||||
the 'iskeyword' option.
|
||||
|
||||
DEFINING KEYWORDS *:syn-keyword*
|
||||
@@ -3580,7 +3578,11 @@ DEFINING KEYWORDS *:syn-keyword*
|
||||
|
||||
DEFINING MATCHES *:syn-match*
|
||||
|
||||
:sy[ntax] match {group-name} [{options}] [excludenl] {pattern} [{options}]
|
||||
:sy[ntax] match {group-name} [{options}]
|
||||
[excludenl]
|
||||
[keepend]
|
||||
{pattern}
|
||||
[{options}]
|
||||
|
||||
This defines one match.
|
||||
|
||||
@@ -3589,6 +3591,9 @@ DEFINING MATCHES *:syn-match*
|
||||
[excludenl] Don't make a pattern with the end-of-line "$"
|
||||
extend a containing match or region. Must be
|
||||
given before the pattern. |:syn-excludenl|
|
||||
keepend Don't allow contained matches to go past a
|
||||
match with the end pattern. See
|
||||
|:syn-keepend|.
|
||||
{pattern} The search pattern that defines the match.
|
||||
See |:syn-pattern| below.
|
||||
Note that the pattern may match more than one
|
||||
|
||||
+11
-4
@@ -5238,6 +5238,7 @@ c_CTRL-I cmdline.txt /*c_CTRL-I*
|
||||
c_CTRL-J cmdline.txt /*c_CTRL-J*
|
||||
c_CTRL-K cmdline.txt /*c_CTRL-K*
|
||||
c_CTRL-L cmdline.txt /*c_CTRL-L*
|
||||
c_CTRL-M cmdline.txt /*c_CTRL-M*
|
||||
c_CTRL-N cmdline.txt /*c_CTRL-N*
|
||||
c_CTRL-P cmdline.txt /*c_CTRL-P*
|
||||
c_CTRL-Q cmdline.txt /*c_CTRL-Q*
|
||||
@@ -5254,6 +5255,7 @@ c_CTRL-U cmdline.txt /*c_CTRL-U*
|
||||
c_CTRL-V cmdline.txt /*c_CTRL-V*
|
||||
c_CTRL-W cmdline.txt /*c_CTRL-W*
|
||||
c_CTRL-Y cmdline.txt /*c_CTRL-Y*
|
||||
c_CTRL-[ cmdline.txt /*c_CTRL-[*
|
||||
c_CTRL-\_CTRL-G intro.txt /*c_CTRL-\\_CTRL-G*
|
||||
c_CTRL-\_CTRL-N intro.txt /*c_CTRL-\\_CTRL-N*
|
||||
c_CTRL-\_e cmdline.txt /*c_CTRL-\\_e*
|
||||
@@ -6083,6 +6085,7 @@ ft-csh-syntax syntax.txt /*ft-csh-syntax*
|
||||
ft-css-omni insert.txt /*ft-css-omni*
|
||||
ft-cweb-syntax syntax.txt /*ft-cweb-syntax*
|
||||
ft-cynlib-syntax syntax.txt /*ft-cynlib-syntax*
|
||||
ft-dash-syntax syntax.txt /*ft-dash-syntax*
|
||||
ft-desktop-syntax syntax.txt /*ft-desktop-syntax*
|
||||
ft-dircolors-syntax syntax.txt /*ft-dircolors-syntax*
|
||||
ft-docbk-syntax syntax.txt /*ft-docbk-syntax*
|
||||
@@ -6143,6 +6146,7 @@ ft-php-syntax syntax.txt /*ft-php-syntax*
|
||||
ft-php3-syntax syntax.txt /*ft-php3-syntax*
|
||||
ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
|
||||
ft-plaintex-syntax syntax.txt /*ft-plaintex-syntax*
|
||||
ft-posix-synax syntax.txt /*ft-posix-synax*
|
||||
ft-postscr-syntax syntax.txt /*ft-postscr-syntax*
|
||||
ft-ppwiz-syntax syntax.txt /*ft-ppwiz-syntax*
|
||||
ft-printcap-syntax syntax.txt /*ft-printcap-syntax*
|
||||
@@ -6396,8 +6400,6 @@ g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp*
|
||||
g:netrw_winsize pi_netrw.txt /*g:netrw_winsize*
|
||||
g:netrw_wiw pi_netrw.txt /*g:netrw_wiw*
|
||||
g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen*
|
||||
g:sh_isk syntax.txt /*g:sh_isk*
|
||||
g:sh_noisk syntax.txt /*g:sh_noisk*
|
||||
g:syntax_on syntax.txt /*g:syntax_on*
|
||||
g:tar_browseoptions pi_tar.txt /*g:tar_browseoptions*
|
||||
g:tar_cmd pi_tar.txt /*g:tar_cmd*
|
||||
@@ -6428,6 +6430,8 @@ g:vimsyn_maxlines syntax.txt /*g:vimsyn_maxlines*
|
||||
g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
|
||||
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
|
||||
g:yaml_schema syntax.txt /*g:yaml_schema*
|
||||
g:zipPlugin_ext pi_zip.txt /*g:zipPlugin_ext*
|
||||
g:zip_extractcmd pi_zip.txt /*g:zip_extractcmd*
|
||||
g:zip_nomax pi_zip.txt /*g:zip_nomax*
|
||||
g:zip_shq pi_zip.txt /*g:zip_shq*
|
||||
g:zip_unzipcmd pi_zip.txt /*g:zip_unzipcmd*
|
||||
@@ -6611,7 +6615,7 @@ gui-w32-printing gui_w32.txt /*gui-w32-printing*
|
||||
gui-w32-start gui_w32.txt /*gui-w32-start*
|
||||
gui-w32-various gui_w32.txt /*gui-w32-various*
|
||||
gui-w32-windowid gui_w32.txt /*gui-w32-windowid*
|
||||
gui-w32s gui_w32.txt /*gui-w32s*
|
||||
gui-w32s os_win32.txt /*gui-w32s*
|
||||
gui-win32-maximized gui_w32.txt /*gui-win32-maximized*
|
||||
gui-x11 gui_x11.txt /*gui-x11*
|
||||
gui-x11-athena gui_x11.txt /*gui-x11-athena*
|
||||
@@ -7351,7 +7355,6 @@ mouse_winid-variable eval.txt /*mouse_winid-variable*
|
||||
movement intro.txt /*movement*
|
||||
ms-dos os_msdos.txt /*ms-dos*
|
||||
msdos os_msdos.txt /*msdos*
|
||||
msdos-mode gui_w32.txt /*msdos-mode*
|
||||
msql.vim syntax.txt /*msql.vim*
|
||||
mswin.vim gui_w32.txt /*mswin.vim*
|
||||
multi-byte mbyte.txt /*multi-byte*
|
||||
@@ -9325,6 +9328,7 @@ win32-startup os_win32.txt /*win32-startup*
|
||||
win32-term os_win32.txt /*win32-term*
|
||||
win32-vimrun gui_w32.txt /*win32-vimrun*
|
||||
win32-win3.1 os_win32.txt /*win32-win3.1*
|
||||
win32-win95 os_win32.txt /*win32-win95*
|
||||
win32s os_win32.txt /*win32s*
|
||||
win_findbuf() eval.txt /*win_findbuf()*
|
||||
win_getid() eval.txt /*win_getid()*
|
||||
@@ -9354,6 +9358,8 @@ windows-intro windows.txt /*windows-intro*
|
||||
windows-starting windows.txt /*windows-starting*
|
||||
windows.txt windows.txt /*windows.txt*
|
||||
windows95 os_win32.txt /*windows95*
|
||||
windows98 os_win32.txt /*windows98*
|
||||
windowsme os_win32.txt /*windowsme*
|
||||
winheight() eval.txt /*winheight()*
|
||||
winid windows.txt /*winid*
|
||||
winline() eval.txt /*winline()*
|
||||
@@ -9483,6 +9489,7 @@ zip-extension pi_zip.txt /*zip-extension*
|
||||
zip-history pi_zip.txt /*zip-history*
|
||||
zip-manual pi_zip.txt /*zip-manual*
|
||||
zip-usage pi_zip.txt /*zip-usage*
|
||||
zip-x pi_zip.txt /*zip-x*
|
||||
zj fold.txt /*zj*
|
||||
zk fold.txt /*zk*
|
||||
zl scroll.txt /*zl*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 8.0. Last change: 2016 Aug 20
|
||||
*tagsrch.txt* For Vim version 8.0. Last change: 2016 Sep 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -91,7 +91,7 @@ The ignore-case matches are not found for a ":tag" command when:
|
||||
- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern
|
||||
contains an upper case character.
|
||||
|
||||
The gnore-case matches are found when:
|
||||
The ignore-case matches are found when:
|
||||
- a pattern is used (starting with a "/")
|
||||
- for ":tselect"
|
||||
- when 'tagcase' is "followic" and 'ignorecase' is off
|
||||
|
||||
+65
-289
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,16 +34,11 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
After 8.0 is released:
|
||||
- Drop support for older MS-Windows systems, before XP.
|
||||
Patch from Ken Takata, 2016 Mar 8.
|
||||
|
||||
+channel:
|
||||
- channel_wait() may return an error while there is still something to read.
|
||||
Perhaps try to read once more?
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Add 'cwd' argument to start_job(): directory to change to in the child.
|
||||
check for valid directory before forking.
|
||||
Part of patch for environment, Yasuhiro Matsumoto, #1160
|
||||
- Implement |job-term| ?
|
||||
- Channel test fails with Motif. Sometimes kills the X11 server.
|
||||
- When a message in the queue but there is no callback, drop it after a while?
|
||||
@@ -64,9 +59,6 @@ Regexp problems:
|
||||
(Manuel Ortega, 2016 Apr 24)
|
||||
Test fails on Mac. Avoid using isalpha(), isalnum(), etc? Depends on
|
||||
LC_CTYPE
|
||||
- The regexp engines are not reentrant, causing havoc when interrupted by a
|
||||
remote expression or something else. Move global variables onto the stack
|
||||
or into an allocated struct.
|
||||
- The old engine does not find a match for "/\%#=1\(\)\{80}", the new engine
|
||||
matches everywhere.
|
||||
- Using win_linetabsize() can still be slow. Cache the result, store col and
|
||||
@@ -82,6 +74,7 @@ Regexp problems:
|
||||
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
|
||||
- Does not work with NFA regexp engine:
|
||||
\%u, \%x, \%o, \%d followed by a composing character
|
||||
- Search for \%d0\+ may fail with E363. (Christian Brabandt, 2016 Oct 4)
|
||||
- \%'[ does not work. '%'] does work. (Masaaki Nakamura, 2016 Apr 4)
|
||||
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
|
||||
- New RE does not give an error for empty group: "\(\)\{2}" (Dominique Pelle,
|
||||
@@ -112,39 +105,75 @@ Or avoid recursiveness.
|
||||
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Patch to fix escaping of job arguments. (Yasuhiro Matsumoto, 2016 Oct 5)
|
||||
Still not right.
|
||||
|
||||
Once .exe with updated installer is available: Add remark to download page
|
||||
about /S and /D options (Ken Takata, 2016 Apr 13)
|
||||
Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
|
||||
Javascript indent wrong after /* in single quoted string:
|
||||
var SRC = 'src/*.js';
|
||||
function log(tag) {
|
||||
a = b;
|
||||
}
|
||||
|
||||
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
#1053) With patch, does it work?
|
||||
|
||||
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27)
|
||||
Is there another solution?
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
E.g. deepcopy(test_null_list())
|
||||
|
||||
Patch to make it possible to extend a list with itself.
|
||||
(Nikolai Pavlov, 2016 Sep 23)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
|
||||
Should :vmap in matchit.vim be :xmap? (Tony Mechelynck)
|
||||
|
||||
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
|
||||
|
||||
Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
|
||||
|
||||
Add "unicode true" to NSIS installer. Doesn't work with Windows 95, which we
|
||||
no longer support.
|
||||
|
||||
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
4#1038)
|
||||
|
||||
Patch to add "cmdline" completion to getcompletion(). (Shougo, Oct 1, #1140)
|
||||
|
||||
Patch for systemlist(), add empty item. (thinca, Sep 30, #1135)
|
||||
Add an argument to choose binary or non-binary (like readfile()), when omitted
|
||||
use the current behavior.
|
||||
Include the test.
|
||||
|
||||
Idea from Sven: record sequence of keys. Useful to show others what they are
|
||||
doing (look over the shoulder), and also to see what happened.
|
||||
Probably list of keystrokes, with some annotations for mode changes.
|
||||
Could store in logfile to be able to analyise it with an external command.
|
||||
E.g. to see when's the last time a plugin command was used.
|
||||
|
||||
execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1,
|
||||
#1141)
|
||||
|
||||
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
|
||||
|
||||
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
|
||||
|
||||
Patch for :pyx, run python commands depending on the supported version.
|
||||
(Marc Weber, update from Ken Takata, 2016 Sep 19)
|
||||
|
||||
When using ":diffput" through a mapping, undo in the target buffer isn't
|
||||
synced. (Ryan Carney, 2016 Sep 14)
|
||||
|
||||
Syntax highlighting for messages with RFC3339 timestamp (#946)
|
||||
Did maintainer reply?
|
||||
|
||||
Patch to avoid problem with special characters in file name.
|
||||
(Shougo, 2016 Sept 19, #1099) Not finished?
|
||||
|
||||
ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
|
||||
Also with latest version.
|
||||
|
||||
@@ -153,6 +182,9 @@ Cannot delete a file with square brackets with delete(). (#696)
|
||||
Completion for input() does not expand environment variables. (chdiza, 2016
|
||||
Jul 25, #948)
|
||||
|
||||
Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
|
||||
(Ken Takata, 2016 Oct 4)
|
||||
|
||||
'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9)
|
||||
|
||||
Patch to add context information to quickfix/location list. (Yegappan
|
||||
@@ -166,6 +198,9 @@ Also for ":@.".
|
||||
|
||||
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
|
||||
Have a way to get the call stack, in a function and from an exception.
|
||||
#1125
|
||||
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
@@ -174,6 +209,9 @@ This does not work: :set cscopequickfix=a-
|
||||
|
||||
Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
|
||||
|
||||
Patch to add separate highlighting for quickfix current line.
|
||||
(anishsane, 2016 Sep 16, #1080)
|
||||
|
||||
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
|
||||
|
||||
Patch to improve map documentation. Issue #799.
|
||||
@@ -183,17 +221,16 @@ Patch for syntax folding optimization. (Shougo, 2016 Sep 6, #1045)
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
Now on Git: https://gist.github.com/nocd5/165286495c782b815b94
|
||||
Update 2016 Aug 10.
|
||||
|
||||
We can use '. to go to the last change in the current buffer, but how about
|
||||
the last change in any buffer? Can we use ', (, is next to .)?
|
||||
|
||||
Ramel Eshed: system() is much slower than job_start(), why? (Aug 26)
|
||||
|
||||
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
|
||||
What does it change?
|
||||
|
||||
Patch to make gd and gD work better for non-K&R code and with comments.
|
||||
(Anton Lindqvist, 2016 Aug 29)
|
||||
|
||||
When generating the Unicode tables with runtime/tools/unicode.vim the
|
||||
emoji_width table has only one entry.
|
||||
|
||||
@@ -208,11 +245,6 @@ Patch to support strikethrough next to bold and italic. (Christian Brabandt,
|
||||
Update mentioned by Christian, 2016 Apr 25.
|
||||
Update from Ken Takata, 2016 Jul 17.
|
||||
|
||||
Patch to improve cscope. (Adrian Kocis, #843)
|
||||
|
||||
Patch for groovy multi-line comment highlighting. (Justin M. Keyes, 2016 May
|
||||
20 #644)
|
||||
|
||||
When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
|
||||
Because of using the initial buffer? (Dun Peal, 2016 May 12)
|
||||
|
||||
@@ -225,7 +257,7 @@ Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
|
||||
No test, needs some work to include.
|
||||
|
||||
Patch to make finding duplicate tags much faster, using a hashtab. (James
|
||||
McCoy, 2016 Sept 6, #1046)
|
||||
McCoy, 2016 Sept 14, #1046) Should work now.
|
||||
>
|
||||
Patch to improve indenting for C++ constructor with initializer list.
|
||||
(Hirohito Higashi, 2016 Mar 31)
|
||||
@@ -261,6 +293,9 @@ Can already do it with ":$put =execute('command')".
|
||||
When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
|
||||
Apr 17) #762
|
||||
|
||||
exists(":tearoff") does not tell you if the command is implemented. (Tony
|
||||
Mechelynck) Perhaps use exists("::tearoff") to check?
|
||||
|
||||
Use vim.vim syntax highlighting for help file examples, but without ":" in
|
||||
'iskeyword' for syntax.
|
||||
|
||||
@@ -284,9 +319,6 @@ Should use /usr/local/share/applications or /usr/share/applications.
|
||||
Or use $XDG_DATA_DIRS.
|
||||
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
|
||||
|
||||
Patch to test popupmenu. Fails, possibly due to a bug.
|
||||
(Christian Brabandt, 2016 Jul 23)
|
||||
|
||||
Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
|
||||
Better help Aug 19.
|
||||
Problem: applies to too many commands, such as :cbuffer.
|
||||
@@ -299,9 +331,6 @@ Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3). Still needs more work.
|
||||
|
||||
Patch to add CTRL-N / CTRL-P while searching. (Christian Brabandt, 2016 Aug
|
||||
3) Problem: two matches in one line and using CTRL-P does not move back.
|
||||
|
||||
Access to uninitialized memory in match_backref() regexp_nda.c:4882
|
||||
(Dominique Pelle, 2015 Nov 6)
|
||||
|
||||
@@ -382,8 +411,6 @@ Add "===" to have a strict comparison (type and value match).
|
||||
Add "==*" (?) to have a value match, but no automatic conversion, and v:true
|
||||
equals 1 and 1.0, v:false equals 0 and 0.0.?
|
||||
|
||||
Plugin to use Vim in MANPAGER. Konfekt, PR #491
|
||||
|
||||
Using uninitialized memory. (Dominique Pelle, 2015 Nov 4)
|
||||
|
||||
MS-Windows: When editing a file with a leading space, writing it uses the
|
||||
@@ -408,9 +435,6 @@ I can't recommend it though.
|
||||
Build with Python on Mac does not always use the right library.
|
||||
(Kazunobu Kuriyama, 2015 Mar 28)
|
||||
|
||||
Need a Vim equivalent of Python's None and a way to test for it.
|
||||
Use v:none. var == v:none
|
||||
|
||||
Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
|
||||
24) Also need a way to get the global arg list? Update later on Jan 24
|
||||
Update Mar 5. Update Apr 7. Update Jun 5.
|
||||
@@ -453,10 +477,6 @@ the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)
|
||||
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
|
||||
Sep 10)
|
||||
|
||||
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
|
||||
Needs a different check for CLEARTYPE_QUALITY.
|
||||
Problem mentioned by Christian Brabandt, 2016 Jan 4.
|
||||
|
||||
Example in editing.txt uses $HOME with the expectation that it ends in a
|
||||
slash. For me it does, but perhaps not for everybody. Add a function that
|
||||
inserts a slash when needed? pathconcat(dir, path) (Thilo Six, 2015 Aug 12)
|
||||
@@ -498,9 +518,6 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
Patch to use different terminal mode settings for system(). (Hayaki Saito)
|
||||
Does this work for everybody?
|
||||
|
||||
Patch to add wordcount(). Same info as g CTRL-G. (Christian Brabandt, 2015
|
||||
Nov 17)
|
||||
|
||||
Patch for man.vim. (SungHyun Nam, 2015 May 20)
|
||||
Doesn't work completely (Dominique Orban)
|
||||
|
||||
@@ -520,16 +537,8 @@ OK to not block marks?
|
||||
|
||||
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
Now on Git: https://gist.github.com/nocd5/165286495c782b815b94
|
||||
Update 2016 Aug 10.
|
||||
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
When 'balloonexpr' returns a list the result has a trailing newline.
|
||||
Just remove one trailing newline. (lcd, 2014 Oct 17)
|
||||
|
||||
When two SIGWINCH arrive very quickly, the second one may be lost.
|
||||
(Josh Triplett, 2015 Sep 17)
|
||||
|
||||
@@ -633,7 +642,7 @@ right-mouse-drag on the status line to move a window up/down without changing
|
||||
its height? It's like dragging the status bar above it at the same time.
|
||||
|
||||
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
|
||||
What for systems that don't have unsetenv()?
|
||||
What for systems that don't have unsetenv()? (Issue #1116)
|
||||
|
||||
Patch to add a :domodeline command. (Christian Brabandt, 2014 Oct 21)
|
||||
|
||||
@@ -688,9 +697,6 @@ Out of scope:
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
CTRL-] in Visual mode uses the selected text as a tag. This does not work
|
||||
when preceded with CTRL-W. (Patrick Hemmer, 2014 Jun 28)
|
||||
|
||||
When typing the first character of a command, e.g. "f", then using a menu, the
|
||||
menu item doesn't work. Clear typeahead when using a menu?
|
||||
|
||||
@@ -732,9 +738,6 @@ Patch to right-align signs. (James Kolb (email james), 2013 Sep 23)
|
||||
|
||||
Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
|
||||
|
||||
With "$" in 'cpoptions' the popup menu isn't fully drawn. (Matti Niemenmaa,
|
||||
2013 Sep 5)
|
||||
|
||||
Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel
|
||||
Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5.
|
||||
|
||||
@@ -799,10 +802,6 @@ Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}.
|
||||
Exception caused by argument of return is not caught by try/catch.
|
||||
(David Barnett, 2013 Nov 19)
|
||||
|
||||
8 'backupdir' and 'directory' should use $TMPDIR, $TMP and/or $TEMP when
|
||||
defined.
|
||||
Issue 28.
|
||||
|
||||
Patch to fix that 'cedit' is recognized after :normal. (Christian Brabandt,
|
||||
2013 Mar 19, later message)
|
||||
|
||||
@@ -847,8 +846,6 @@ How to test that it works well for all Vim users?
|
||||
|
||||
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
|
||||
- Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine
|
||||
the two into a regex for searching. (Ned Konz)
|
||||
Patch by Christian Brabandt, 2013 Apr 20, unfinished.
|
||||
@@ -859,20 +856,11 @@ In the ATTENTION message about an existing swap file, mention the name of the
|
||||
process that is running. It might actually be some other program, e.g. after
|
||||
a reboot.
|
||||
|
||||
Patch to select the next or previous text object if there isn't one under the
|
||||
cursor. (Daniel Thau, 2013 Nov 20)
|
||||
|
||||
patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6)
|
||||
|
||||
Bug caused by patch 7.3.1288? Issue 183.
|
||||
I can't reproduce it.
|
||||
|
||||
Syntax update problem in one buffer opened in two windows, bottom window is
|
||||
not correctly updated. (Paul Harris, 2012 Feb 27)
|
||||
|
||||
Patch to add assignments in cscope. (Uli Meis, Estabrooks, 2012 Sep 1)
|
||||
Alternate patch by Gary Johnson, Sep 4.
|
||||
|
||||
Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4.
|
||||
Or use expand('<sid>')?
|
||||
|
||||
@@ -910,10 +898,6 @@ Szamotulski, 2012 Nov 8)
|
||||
Session file creation: 'autochdir' causes trouble. Keep it off until after
|
||||
loading all files.
|
||||
|
||||
Win32: When 'autochdir' is on and 'encoding' is changed, files on the command
|
||||
line are opened again, but from the wrong directory. Apply 'autochdir' only
|
||||
after starting up?
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
@@ -931,9 +915,6 @@ of many matches. (Cody Cutler, 2013 Mar 28)
|
||||
|
||||
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
|
||||
|
||||
Help for 'b:undo_indent'. (Thilo Six, 2012 May 28)
|
||||
Also question if examples are correct.
|
||||
|
||||
The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
|
||||
Suggestion for another map. (Philip Mat, 2012 Jun 18)
|
||||
But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
|
||||
@@ -1010,8 +991,6 @@ Only for MS-Windows. No documentation. Do we want this?
|
||||
|
||||
Patch to support cursor shape in Cygwin console. (Ben bgold, 2011 Dec 27)
|
||||
|
||||
Issue 64: when 'incsearch' is on can't paste LF on command line.
|
||||
|
||||
On MS-Windows a temp dir with a & init causes system() to fail. (Ben Fritz,
|
||||
2012 Jun 19)
|
||||
|
||||
@@ -1063,10 +1042,6 @@ When using a Vim server, a # in the path causes an error message.
|
||||
Setting $HOME on MS-Windows is not very well documented. Suggestion by Ben
|
||||
Fritz (2011 Oct 27).
|
||||
|
||||
Bug: Windows 7 64 bit system freezes when 'clipboard' set to "unnamed" and
|
||||
doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011
|
||||
Jun 17)
|
||||
|
||||
When there is a ">" in a line that "gq" wraps to the start of the next line,
|
||||
then the following line will pick it up as a leader. Should get the leader
|
||||
from the first line, not a wrapped line. (Matt Ackeret, 2012 Feb 27)
|
||||
@@ -1146,12 +1121,6 @@ Is this needed? CTRL-O and CTRL-I do the same, just more difficult to use.
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9.
|
||||
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once
|
||||
after typing something.
|
||||
Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
Patch by Christian Brabandt, 2011 May 6.
|
||||
|
||||
Add event for when the text scrolls. A bit like CursorMoved. Also a similar
|
||||
one for insert mode. Use the event in matchparen to update the highlight if
|
||||
the match scrolls into view.
|
||||
@@ -1288,9 +1257,6 @@ setwinvar().
|
||||
|
||||
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
|
||||
When writing a file > 2Gbyte, the reported number of bytes is negative.
|
||||
(Antonio Colombo, 2010 Dec 18)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
@@ -1453,8 +1419,6 @@ Patch for GTK buttons X1Mouse and X2Mouse. (Christian J. Robinson, 2010 Aug 9)
|
||||
|
||||
Motif: Build on Ubuntu can't enter any text in dialog text fields.
|
||||
|
||||
When 'ft' changes redraw custom status line.
|
||||
|
||||
":tab split fname" doesn't set the alternate file in the original window,
|
||||
because win_valid() always returns FALSE. Below win_new_tabpage() in
|
||||
ex_docmd.c.
|
||||
@@ -1502,10 +1466,6 @@ perhaps. And undo CTRL-W. CTRL-G l would redo.
|
||||
|
||||
Diff mode out of sync. (Gary Johnson, 2010 Aug 4)
|
||||
|
||||
Support a 'systemencoding' option (for Unix). It specifies the encoding of
|
||||
file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian
|
||||
system when 'encoding' is "utf-8".
|
||||
|
||||
Win32 GUI: last message from startup doesn't show up when there is an echoerr
|
||||
command. (Cyril Slobin, 2009 Mar 13)
|
||||
|
||||
@@ -1550,9 +1510,6 @@ Sergey Khorev)
|
||||
Consider making YankRing or something else that keeps a list of yanked text
|
||||
part of standard Vim. The "1 to "9 registers are not sufficient.
|
||||
|
||||
netrw: dragging status line causes selection of entry. Should check row
|
||||
number to be below last visible line.
|
||||
|
||||
After doing "su" $HOME can be the old user's home, thus ~root/file is not
|
||||
correct. Don't use it in the swap file.
|
||||
|
||||
@@ -1623,8 +1580,6 @@ doesn't. (John Little, 2008 Nov 9)
|
||||
Shell expansion returns unexpanded string?
|
||||
Don't use shell when "~" is not at the start?
|
||||
|
||||
":unlet $VAR" doesn't work.
|
||||
|
||||
When using ":e ++enc=foo file" and the file is already loaded with
|
||||
'fileencoding' set to "bar", then do_ecmd() uses that buffer, even though the
|
||||
fileencoding differs. Reload the buffer in this situation? Need to check for
|
||||
@@ -1659,9 +1614,6 @@ command is not executed. Fix by Ian Kelling?
|
||||
":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim
|
||||
Chase) Fix by Ian Kelling, 2008 Jul 14.
|
||||
|
||||
Use "\U12345678" for 32 bit Unicode characters? (Tony Mechelynck, 2009
|
||||
Apr 6) Or use "\u(123456)", similar to Perl.
|
||||
|
||||
When mapping : to ; and ; to :, @; doesn't work like @: and @: doesn't work
|
||||
either. Matt Wozniski: nv_at() calls do_execreg() which uses
|
||||
put_in_typebuf(). Char mapped twice?
|
||||
@@ -1718,8 +1670,6 @@ Works OK when 'cmdheight' is 2.
|
||||
that the context can be taken into account. (Robert Webb)
|
||||
Patch by Christian Brabandt, 2013 May 31.
|
||||
|
||||
Test54 should not use shell commands. Make it portable.
|
||||
|
||||
The utf class table is missing some entries:
|
||||
0x2212, minus sign
|
||||
0x2217, star
|
||||
@@ -1849,10 +1799,6 @@ popup menu over it, first draw the new popup menu, remember its position and
|
||||
size and then redraw the text, skipping the characters under the popup menu.
|
||||
This should avoid flicker. Other solution by A.Politz, 2007 Aug 22.
|
||||
|
||||
Windows 98: pasting from the clipboard with text from another application has
|
||||
a trailing NUL. (Joachim Hofmann) Perhaps the length specified for CF_TEXT
|
||||
isn't right?
|
||||
|
||||
When a register contains illegal bytes, writing viminfo in utf-8 and reading
|
||||
it back doesn't result in utf-8. (Devin Bayer)
|
||||
|
||||
@@ -1928,8 +1874,6 @@ patches by Mathias, see mail Feb 22)
|
||||
Win32: compiling with normal features and OLE fails. Patch by Mathias
|
||||
Michaelis, 2006 Jun 4.
|
||||
|
||||
Win16: include patches to make Win16 version work. (Vince Negri, 2006 May 22)
|
||||
|
||||
Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis,
|
||||
2007 Feb 18)
|
||||
Patch by Alex Dobrynin, 2007 Jun 3. Also fixes other scroll wheel problems.
|
||||
@@ -1967,9 +1911,6 @@ F1 - F4 in an xterm produce a different escape sequence when used with a
|
||||
modifier key. Need to catch three different sequences. Use K_ZF1, like
|
||||
K_ZHOME? (Dickey, 2007 Dec 2)
|
||||
|
||||
UTF-8: mapping a multi-byte key where the second byte is 0x80 doesn't appear
|
||||
to work. (Tony Mechelynck, 2007 March 2)
|
||||
|
||||
In debug mode, using CTRL-R = to evaluate a function causes stepping through
|
||||
the function. (Hari Krishna Dara, 2006 Jun 28)
|
||||
|
||||
@@ -2074,15 +2015,6 @@ When showing a diff between a non-existent file and an existing one, with the
|
||||
cursor in the empty buffer, the other buffer only shows the last line. Change
|
||||
the "insert" into a change from one line to many? (Yakov Lerner, 2008 May 27)
|
||||
|
||||
Add autocommand for when a tabpage is being closed. Also for when a tab page
|
||||
has been created.
|
||||
|
||||
Using ":make" blocks Vim. Allow running one make in the background (if the
|
||||
shell supports it), catch errors in a file and update the error list on the
|
||||
fly. A bit like "!make > file&" and repeating ":cf file". ":bgmake",
|
||||
background make. ":bgcancel" interrupts it.
|
||||
A.Politz may work on this.
|
||||
|
||||
These two abbreviations don't give the same result:
|
||||
let asdfasdf = "xyz\<Left>"
|
||||
cabbr XXX <C-R>=asdfasdf<CR>
|
||||
@@ -2095,9 +2027,6 @@ In FileChangedShell command it's no longer allowed to switch to another
|
||||
buffer. But the changed buffer may differ from the current buffer, how to
|
||||
reload it then?
|
||||
|
||||
New syntax files for fstab and resolv from Radu Dineiu, David Necas did
|
||||
previous version.
|
||||
|
||||
For Aap: include a config.arg.example file with hints how to use config.arg.
|
||||
|
||||
Command line completion when 'cmdheight' is maximum and 'wildmenu' is set,
|
||||
@@ -2127,11 +2056,6 @@ start of the path is shown in the menu. Should move the menu to the right to
|
||||
show more text of the completions. Shorten the items that don't fit in the
|
||||
middle?
|
||||
|
||||
When running inside screen it's possible to kill the X server and restart it
|
||||
(using pty's the program can keep on running). Vim dies because it loses the
|
||||
connection to the X server. Can Vim simply quit using the X server instead of
|
||||
dying? Also relevant when running in a console.
|
||||
|
||||
Accessing file#var in a function should not need the g: prepended.
|
||||
|
||||
When exiting detects a modified buffer, instead of opening the buffer in the
|
||||
@@ -2166,10 +2090,6 @@ the cursor line. It works OK after some other commands.
|
||||
|
||||
Win32: Is it possible to have both postscript and Win32 printing?
|
||||
|
||||
Check: Running Vim in a console and still having connect to the X server for
|
||||
copy/paste: is stopping the X server handled gracefully? Should catch the X
|
||||
error and stop using the connection to the server.
|
||||
|
||||
Problem with 'cdpath' on MS-Windows when a directory is equal to $HOME. (2006
|
||||
Jul 26, Gary Johnson)
|
||||
|
||||
@@ -2206,30 +2126,11 @@ differently and unexpectedly. Caused by patch 7.2.398?
|
||||
The magic clipboard format "VimClipboard2" appears in several places. Should
|
||||
be only one.
|
||||
|
||||
"vim -C" often has 'nocompatible', because it's set somewhere in a startup
|
||||
script. Do "set compatible" after startup?
|
||||
|
||||
It's difficult to debug numbered functions (function in a Dictionary). Print
|
||||
the function name before resolving it to a number?
|
||||
let d = {}
|
||||
fun! d.foo()
|
||||
echo "here"
|
||||
endfun
|
||||
call d.foo(9)
|
||||
|
||||
Add a mark for the other end of the Visual area (VIsual pos). '< and '> are
|
||||
only set after Visual moded is ended.
|
||||
Also add a variable for the Visual mode. So that this mode and '< '> can be
|
||||
used to set what "gv" selects. (Ben Schmidt)
|
||||
|
||||
Win32, NTFS: When editing a specific infostream directly and 'backupcopy' is
|
||||
"auto" should detect this situation and work like 'backupcopy' is "yes". File
|
||||
name is something like "c:\path\foo.txt:bar", includes a colon. (Alex
|
||||
Jakushev, 2008 Feb 1)
|
||||
|
||||
printf() uses the field width in bytes. Can it be made character width,
|
||||
perhaps with a modifier? What does Posix say?
|
||||
|
||||
Small problem displaying diff filler line when opening windows with a script.
|
||||
(David Luyer, 2007 Mar 1 ~/Mail/oldmail/mool/in.15872 )
|
||||
|
||||
@@ -2250,8 +2151,6 @@ When completing from another file that uses a different encoding completion
|
||||
text has the wrong encoding. E.g., when 'encoding' is utf-8 and file is
|
||||
latin1. Example from Gombault Damien, 2007 Mar 24.
|
||||
|
||||
Is it possible to use "foo#var" instead of "g:foo#var" inside a function?
|
||||
|
||||
Syntax HL: When using "nextgroup" and the group has an empty match, there is
|
||||
no search at that position for another match. (Lukas Mai, 2008 April 11)
|
||||
|
||||
@@ -2312,8 +2211,6 @@ More patches:
|
||||
- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
|
||||
Needs a few tests.
|
||||
- Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3)
|
||||
- Argument for feedkeys() to prepend to typeahead (Yakov Lerner, 2006 Oct
|
||||
21)
|
||||
- Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs
|
||||
patch May 10)
|
||||
- Extra argument to strtrans() to translate special keys to their name (Eric
|
||||
@@ -2338,8 +2235,6 @@ More patches:
|
||||
Schmidt, 2008 Jul 22.
|
||||
- testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008
|
||||
Sep 13)
|
||||
- Patch for adding "space" item in 'listchars'. (Jérémie Roquet, 2009 Oct 29,
|
||||
Docs patch Oct 30, update David Burgin (glts) 2013 Aug 24, 2014 Oct 10)
|
||||
- Replace ccomplete.vim by cppcomplete.vim from www.vim.org? script 1520 by
|
||||
Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts
|
||||
more friendly for the Vim distribution.
|
||||
@@ -2362,8 +2257,6 @@ Awaiting updated patches:
|
||||
9 HTML indenting can be slow. Caused by using searchpair(). Can search()
|
||||
be used instead? A.Politz is looking into a solution.
|
||||
8 Win32: Add minidump generation. (George Reilly, 2006 Apr 24)
|
||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||
Aric Blumer has a patch for this. He will update the patch for 6.3.
|
||||
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
||||
Update 2004 Sep 6.
|
||||
How does this work? Missing comments.
|
||||
@@ -2464,8 +2357,6 @@ Vi incompatibility:
|
||||
the ":map" when it's used without arguments?
|
||||
7 CTRL-L is not the end of a section? It is for Posix! Make it an option.
|
||||
7 Implement 'prompt' option. Init to off when stdin is not a tty.
|
||||
7 CTRL-T in Insert mode inserts 'shiftwidth' of spaces at the cursor. Add a
|
||||
flag in 'cpoptions' for this.
|
||||
7 Add a way to send an email for a crashed edit session. Create a file when
|
||||
making changes (containing name of the swap file), delete it when writing
|
||||
the file. Supply a program that can check for crashed sessions (either
|
||||
@@ -2513,8 +2404,6 @@ GTK+ GUI known bugs:
|
||||
Win32 GUI known bugs:
|
||||
- Win32: tearoff menu window should have a scrollbar when it's taller than
|
||||
the screen.
|
||||
8 On Windows 98 the unicows library is needed to support functions with UCS2
|
||||
file names. Can we load unicows.dll dynamically?
|
||||
8 The -P argument doesn't work very well with many MDI applications.
|
||||
The last argument of CreateWindowEx() should be used, see MSDN docs.
|
||||
Tutorial: http://win32assembly.online.fr/tut32.html
|
||||
@@ -2528,9 +2417,6 @@ Win32 GUI known bugs:
|
||||
7 When font smoothing is enabled, redrawing can become very slow. The reason
|
||||
appears to be drawing with a transparent background. Would it be possible
|
||||
to use an opaque background in most places?
|
||||
8 Use another default for 'termencoding': the active codepage. Means that
|
||||
when 'encoding' is changed typing characters still works properly.
|
||||
Alternative: use the Unicode functions to obtain typed characters.
|
||||
7 The cursor color indicating IME mode doesn't work properly. (Shizhu Pan,
|
||||
2004 May 9)
|
||||
8 Win32: When clicking on the gvim title bar, which gives it focus, produces
|
||||
@@ -2743,14 +2629,6 @@ Win32 console:
|
||||
backslashes. (Ronald Hoellwarth)
|
||||
|
||||
|
||||
Windows 95:
|
||||
8 Editing a file by its short file name and writing it, makes the long file
|
||||
name disappear. Setting 'backupcopy' helps.
|
||||
Use FindFirstFile()->cAlternateFileName in fname_case() (George Reilly).
|
||||
8 Doing wildcard expansion, will match the short filename, but result in the
|
||||
long filename (both DJGPP and Win32).
|
||||
|
||||
|
||||
Win32 console:
|
||||
9 When editing a file by its short file name, it should be expanded into its
|
||||
long file name, to avoid problems like these: (Mccollister)
|
||||
@@ -2774,9 +2652,6 @@ Win32 console:
|
||||
a Netware network drive. Use same function as for Win32 GUI?
|
||||
8 In os_win32.h, HAVE_STRICMP and HAVE_STRNICMP are defined only if __GNUC__
|
||||
is not defined. Shouldn't that be the other way around?
|
||||
7 Use SetConsoleCP() and SetConsoleOutputCP() to implement 'termencoding'?
|
||||
Avoids that input and output work differently. Need to be restored when
|
||||
exiting.
|
||||
|
||||
|
||||
Amiga:
|
||||
@@ -2879,9 +2754,6 @@ Macintosh:
|
||||
is currently fixed to use ".,:;!". Add an option to make this
|
||||
configurable?
|
||||
8 'hkmap' should probably be global-local.
|
||||
9 When "$" is in 'cpoptions' and folding is active, a "C" command changes
|
||||
the folds and resets w_lines_valid. The display updating doesn't work
|
||||
then. (Pritesh Mistry)
|
||||
8 Using ":s" in a function changes the previous replacement string. Save
|
||||
"old_sub" in save_search_patterns()?
|
||||
8 Should allow multi-byte characters for the delimiter: ":s+a+b+" where "+"
|
||||
@@ -2925,11 +2797,6 @@ Macintosh:
|
||||
- Be able to print a window in diff mode.
|
||||
- Be able to specify a colorscheme to use for printing. And a separate
|
||||
one for B&W printing (if that can be detected).
|
||||
8 In Visual block mode with 'lbr' set, a change command doesn't insert the
|
||||
text in following lines where the linebreak changes.
|
||||
9 dosinst.c: The DJGPP version can't uninstall the Uninstall registry key on
|
||||
Windows NT. How to install a .inf file on Windows NT and how to detect
|
||||
that Windows NT is being used?
|
||||
8 When 'virtualedit' is "block,insert" and encoding is "utf-8", selecting a
|
||||
block of one double-wide character, then "d" deletes only half of it.
|
||||
8 When 'virtualedit' is set, should "I" in blockwise visual mode also insert
|
||||
@@ -2986,8 +2853,6 @@ Macintosh:
|
||||
(e.g., ":w").
|
||||
8 CTRL-A can't handle big "long" numbers, they become negative. Check for
|
||||
"-" character, if not present, use unsigned long.
|
||||
8 Make it possible to disable the special meaning of "#" in the first column
|
||||
for ">>".
|
||||
8 Add suspending with CTRL-Z at the "more" prompt, and when executing a long
|
||||
script in do_cmdline().
|
||||
8 When using 'hidden', many swap files will be open. When Vim runs into the
|
||||
@@ -3109,11 +2974,6 @@ Problems that will (probably) not be solved:
|
||||
- Amiga: The ":cq" command does not always abort the Manx compiler. Why?
|
||||
- Linux: A file with protection r--rw-rw- is seen readonly for others. The
|
||||
access() function in GNU libc is probably wrong.
|
||||
- MSDOS: When using smartdrive with write-back buffering, writing to a
|
||||
readonly floppy will cause problems. How to test for a writable floppy
|
||||
first?
|
||||
- MSDOS: Both 16 and 32 bit versions: File name expansion doesn't work for
|
||||
names that start with a dot. These used to be illegal file names.
|
||||
- When doing a CTRL-Z and typing a command for the shell, while Vim is busy
|
||||
(e.g. writing a file), the command for the shell is sometimes eaten by Vim,
|
||||
because the terminal mode is changed from RAW to CBREAK.
|
||||
@@ -3224,7 +3084,6 @@ Documentation:
|
||||
8 List of options should mention whether environment variables are expanded
|
||||
or not.
|
||||
8 Extend usr_27.txt a bit. (Adam Seyfarth)
|
||||
7 Add a section on debugging scripts in the user manual.
|
||||
9 Make the Reference Manual more precise. For each command mention:
|
||||
- change to cursor position and curswant
|
||||
- if it can be undone (u/CTRL-R) and redone (.)
|
||||
@@ -3250,7 +3109,6 @@ Help:
|
||||
- When a help item has multiple matches make it possible to use ":tn" to go
|
||||
to the other matches.
|
||||
- Support a way to view (and edit) .info files.
|
||||
- Default mapping for help files: <Tab> to position cursor on next |:tag|.
|
||||
- Implement a "sticky" help window, some help text lines that are always
|
||||
displayed in a window with fixed height. (Guckes) Use "~/.vimhelp" file,
|
||||
user can edit it to insert his favorite commands, new account can contain a
|
||||
@@ -3274,20 +3132,12 @@ User Friendlier:
|
||||
$HOME/_vimrc, etc.) and add "edit vimrc" to the File menu.
|
||||
- Add a way to save local settings and mappings into a new plugin file.
|
||||
":mkplugin <file>"?
|
||||
8 Add ":plugininstall" command. Can be used to install a plugin file that
|
||||
includes documentation. Let the user select a directory from
|
||||
'runtimepath'.
|
||||
" Vim plugin
|
||||
<main plugin code>
|
||||
" >>> plugin help start <<<
|
||||
<plugin docs>
|
||||
- Add mappings local to a window: ":map <window> ..."?
|
||||
9 Add buffer-local menu. Should offer a choice between removing the menu or
|
||||
disabling it. Be careful that tear-offs don't disappear (keep one empty
|
||||
item?).
|
||||
Alternative: use BufEnter and BufLeave autocommands.
|
||||
8 make a vimtutor script for Amiga and other systems.
|
||||
7 Add the arguments for configure to the ":version" output?
|
||||
7 When Vim detects a file is being edited elsewhere and it's a gvim session
|
||||
of the same user it should offer a "Raise" button, so that the other gvim
|
||||
window can be displayed. (Eduard)
|
||||
@@ -3306,7 +3156,6 @@ Tab pages:
|
||||
7 :tabdup duplicate the tab with all its windows.
|
||||
7 Option to put tab line at the left or right? Need an option to specify
|
||||
its width. It's like a separate window with ":tabs" output.
|
||||
7 Add local variables for each tab page?
|
||||
8 Add local options for each tab page? E.g., 'diffopt' could differ between
|
||||
tab pages.
|
||||
7 Add local highlighting for each tab page?
|
||||
@@ -3410,15 +3259,8 @@ Diff mode:
|
||||
9 Instead invoking an external diff program, use builtin code. One can be
|
||||
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
|
||||
It's quite big and badly documented though.
|
||||
8 Use diff mode to show the changes made in a buffer (compared to the file).
|
||||
Use an unnamed buffer, like doing:
|
||||
new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
|
||||
Also show difference with the file when editing started? Should show what
|
||||
8 Also show difference with the file when editing started? Should show what
|
||||
can be undone. (Tom Popovich)
|
||||
7 Add cursor-binding: when moving the cursor in one diff'ed buffer, also
|
||||
move it in other diff'ed buffers, so that CTRL-W commands go to the same
|
||||
location.
|
||||
|
||||
|
||||
Folding:
|
||||
(commands still available: zI zJ zK zp zP zq zQ zV zy zY;
|
||||
@@ -3426,8 +3268,6 @@ Folding:
|
||||
8 Vertical folds: looks like vertically split windows, but the cursor moves
|
||||
through the vertical separator, separator moves when scrolling.
|
||||
8 Add "z/" and "z?" for searching in not folded text only.
|
||||
9 Add search pattern item to only match in closed or open fold and/or fold
|
||||
with certain level. Allows doing ":g/pat/cmd" to work on closed folds.
|
||||
8 When a closed fold is displayed open because of 'foldminlines', the
|
||||
behavior of commands is still like the fold is closed. How to make the
|
||||
user aware of this?
|
||||
@@ -3458,9 +3298,6 @@ Folding:
|
||||
- 'foldmethod' "syntax": "fold=3" argument: set fold level for a region or
|
||||
match.
|
||||
- Apply a new foldlevel to a range of lines. (Steve Litt)
|
||||
8 Have some way to restrict commands to not folded text. Also commands like
|
||||
searches.
|
||||
|
||||
|
||||
Multi-byte characters:
|
||||
- When editing a file with both utf-8 and latin1 text Vim always falls back
|
||||
@@ -3652,9 +3489,6 @@ Syntax highlighting:
|
||||
8 When using a regexp for "contains=", should delay matching with it until
|
||||
redrawing happens. Set a flag when a group is added, check this flag when
|
||||
highlighting starts.
|
||||
8 Some terminals can display colors like the GUI. Add some setting to use
|
||||
GUI colors for the terminal? With something to define the escape
|
||||
sequence.
|
||||
7 It's possible for an item to be transparent, so that the colors of an item
|
||||
lower on the stack is used. Also do this with highlighting, so that the
|
||||
user can set transparent highlighting? E.g. a number in a C comment would
|
||||
@@ -3860,9 +3694,6 @@ Performance:
|
||||
so that we don't need to make a copy? Or avoid invoking ml_updatechunk(),
|
||||
that is taking a lot of time. (Ralf Wildenhues, 2008 Jul 7)
|
||||
With a patch, but does it work?
|
||||
8 Instead of loading rgb.txt every time a color wasn't recognized load it
|
||||
once and keep it in memory. Move the code to a common place to avoid
|
||||
repeating it in various system files.
|
||||
8 Turn b_syn_ic and b_syn_containedin into b_syn_flags.
|
||||
9 Loading menu.vim still takes quite a bit of time. How to make it faster?
|
||||
8 in_id_list() takes much time for syntax highlighting. Cache the result?
|
||||
@@ -3887,7 +3718,6 @@ Performance:
|
||||
http://www.theregister.co.uk/content/4/22908.html. (Andre Pang)
|
||||
7 Check how performance of loading the wordlist can be improved (adding a
|
||||
lot of abbreviations).
|
||||
7 MS-DOS console: Add t_DL support, to make scrolling faster.
|
||||
7 Compile Ex commands to byte codes. Store byte codes in a vim script file
|
||||
at the end, after "compiled:. Make it look like a single comment line
|
||||
for old Vim versions. Insert first line "Vim script compiled <timestamp>.
|
||||
@@ -4012,8 +3842,6 @@ Screen updating:
|
||||
8 Add a ":refresh [winnr]" command, to force updating a window. Useful from
|
||||
an event handler where ":normal" can't be used. Also useful when
|
||||
'lazyredraw' is set in a mapping.
|
||||
7 Make 'list' and 'linebreak' work together.
|
||||
|
||||
|
||||
Scrolling:
|
||||
8 Add "zy" command: scroll horizontally to put the cursor in the middle.
|
||||
@@ -4197,8 +4025,6 @@ GUI:
|
||||
use them again? Otherwise, allow disabling allocating the default colors.
|
||||
Or allocate an own colormap (check UAE). With an option to use it. For
|
||||
the commandline, "-install" is mostly used for X11 programs.
|
||||
7 Add command line argument for "gvim" not to start the GUI. Sort of the
|
||||
inverse of "vim -g". (Vikas)
|
||||
7 Should support multi-column menus.
|
||||
- Should add option for where to put the "Help" menu: like Motif at the far
|
||||
right, or with the other menus (but still at the right).
|
||||
@@ -4499,7 +4325,6 @@ Insert mode:
|
||||
7 Use CTRL-G <count> to repeat what follows. Useful for inserting a
|
||||
character multiple times or repeating CTRL-Y.
|
||||
- Make 'revins' work in Replace mode.
|
||||
9 Can't use multi-byte characters for 'matchpairs'.
|
||||
7 Use 'matchpairs' for 'showmatch': When inserting a character check if it
|
||||
appears in the rhs of 'matchpairs'.
|
||||
- In Insert mode (and command line editing?): Allow undo of the last typed
|
||||
@@ -4641,8 +4466,6 @@ Text objects:
|
||||
use "aq" and "iq". Use 'quotepairs' to define pairs of quotes, like
|
||||
'matchpairs'?
|
||||
8 Add text object for any kind of parens, also multi-byte ones.
|
||||
7 Add text object for current search pattern: "a/" and "i/". Makes it
|
||||
possible to turn text highlighted for 'hlsearch' into a Visual area.
|
||||
8 Add a way to make an ":omap" for a user-defined text object. Requires
|
||||
changing the starting position in oap->start.
|
||||
8 Add "gp" and "gP" commands: insert text and make sure there is a single
|
||||
@@ -4699,8 +4522,6 @@ Visual mode:
|
||||
receive dropped text from another program. (Ben Godfrey)
|
||||
7 With blockwise Visual mode and "c", "C", "I", "A", etc., allow the use of
|
||||
a <CR>. The entered lines are repeated over the Visual area.
|
||||
7 CTRL-V :s should substitute only in the block, not to whole lines. (David
|
||||
Young is working on this)
|
||||
7 Filtering a block should only apply to the block, not to the whole lines.
|
||||
When the number of lines is increased, add lines. When decreased, pad with
|
||||
spaces or delete? Use ":`<,`>" on the command line.
|
||||
@@ -4730,8 +4551,6 @@ Visual mode:
|
||||
|
||||
More advanced repeating commands:
|
||||
- Add "." command for visual mode: redo last visual command (e.g. ":fmt").
|
||||
7 Repeating "d:{cmd}" with "." doesn't work. (Benji Fisher) Somehow remember
|
||||
the command line so that it can be repeated?
|
||||
- Add command to repeat last movement. Including count.
|
||||
- Add "." command after operator: repeat last command of same operator. E.g.
|
||||
"c." will repeat last change, also when "x" used since then (Webb).
|
||||
@@ -4760,9 +4579,6 @@ Mappings and Abbreviations:
|
||||
not the <Space>.
|
||||
8 Give a warning when using CTRL-C in the lhs of a mapping. It will never
|
||||
(?) work.
|
||||
8 Add a way to save a current mapping and restore it later. Use a function
|
||||
that returns the mapping command to restore it: mapcmd()? mapcheck() is
|
||||
not fool proof. How to handle ambiguous mappings?
|
||||
7 Add <0x8f> (hex), <033> (octal) and <123> (decimal) to <> notation?
|
||||
7 When someone tries to unmap with a trailing space, and it fails, try
|
||||
unmapping without the trailing space. Helps for ":unmap xx | unmap yy".
|
||||
@@ -4815,8 +4631,6 @@ Incsearch:
|
||||
cases, saves a lot of time in big files. (Slootman wants to work on this?)
|
||||
When not using special characters, can continue search from the last match
|
||||
(or not at all, when there was no match). See oldmail/webb/in.872.
|
||||
- With incsearch, use CTRL-N/CTRL-P to go to next/previous match, some other
|
||||
key to copy matched word to search pattern (Alexander Schmid).
|
||||
|
||||
|
||||
Searching:
|
||||
@@ -4840,9 +4654,6 @@ Searching:
|
||||
8 Show the progress every second. Could use the code that checks for CTRL-C
|
||||
to find out how much time has passed. Or use SIGALRM. Where to show the
|
||||
number?
|
||||
8 When using an expression for ":s", set the match position in a v:
|
||||
variable. So that you can do ":%s/^/\=v:lnum/" to put a line number
|
||||
before each line.
|
||||
7 Support for approximate-regexps to find similar words (agrep
|
||||
http://www.tgries.de/agrep/ tre: http://laurikari.net/tre/index.html).
|
||||
8 Add an item for a big character range, so that one can search for a
|
||||
@@ -4851,8 +4662,6 @@ Searching:
|
||||
the stack if previous atom matched". Other side is "match with top of
|
||||
stack, pop it when it matches". Use "\@pX" and "\@m"?
|
||||
Example: \((\@p).\{-}\@m\)*
|
||||
7 Add an option to accept a match at the cursor position. Also for
|
||||
search(). (Brett)
|
||||
7 Add a flag to "/pat/" to discard an error. Useful to continue a mapping
|
||||
when a search fails. Could be "/pat/E" (e is already used for end offset).
|
||||
7 Add pattern item to use properties of Unicode characters. In Perl it's
|
||||
@@ -4956,9 +4765,6 @@ Undo:
|
||||
when tests fail after making changes and you forgot in which files.
|
||||
9 After undo/redo, in the message show whether the buffer is modified or
|
||||
not.
|
||||
8 Use timestamps for undo, so that a version a certain time ago can be found
|
||||
and info before some time/date can be flushed. 'undopersist' gives maximum
|
||||
time to keep undo: "3h", "1d", "2w", "1y", etc.
|
||||
8 Search for pattern in undo tree, showing when it happened and the text
|
||||
state, so that you can jump to it.
|
||||
8 Undo tree: visually show the tree somehow (Damian Conway)
|
||||
@@ -4966,13 +4772,6 @@ Undo:
|
||||
timestamp?
|
||||
Put branch with most recent change on the left, older changes get more
|
||||
indent?
|
||||
8 See ":e" as a change operation, find the changes and add them to the
|
||||
undo info. Also be able to undo the "Reload file" choice for when a file
|
||||
was changed outside of Vim.
|
||||
Would require doing a diff between the buffer text and the file and
|
||||
storing the differences.
|
||||
Alternative: before reloading a buffer, store it somewhere. Keep a list
|
||||
of about 10 last reloaded buffers.
|
||||
- Make it possible to undo all the commands from a mapping, including a
|
||||
trailing unfinished command, e.g. for ":map K iX^[r".
|
||||
- When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not
|
||||
@@ -5024,8 +4823,6 @@ Buffer list:
|
||||
7 Add expansion of buffer names, so that "*.c" is expanded to all buffer
|
||||
names. Needed for ":bdel *.c", ":bunload *.c", etc.
|
||||
8 Support for <afile> where a buffer name is expected.
|
||||
8 Some commands don't use line numbers, but buffer numbers. '$'
|
||||
should then mean the number of the last buffer. E.g.: "4,$bdel".
|
||||
7 Add an option to mostly use slashes in file names. Separately for
|
||||
internal use and for when executing an external program?
|
||||
8 Some file systems are case-sensitive, some are not. Besides
|
||||
@@ -5345,11 +5142,6 @@ Various improvements:
|
||||
7 Allow a window not to have a statusline. Makes it possible to use a
|
||||
window as a buffer-tab selection.
|
||||
8 Allow non-active windows to have a different statusline. (Yakov Lerner)
|
||||
7 Support using ":vert" with User commands. Add expandable items <vert>.
|
||||
Do the same for ":browse" and ":confirm"?
|
||||
For ":silent" and ":debug" apply to the whole user command.
|
||||
More general: need a way to access command modifiers in a user command.
|
||||
Assign them to a v: variable?
|
||||
7 Add an invisible buffer which can be edited. For use in scripts that want
|
||||
to manipulate text without changing the window layout.
|
||||
8 Add a command to revert to the saved version of file; undo or redo until
|
||||
@@ -5399,10 +5191,6 @@ Various improvements:
|
||||
non-unix systems. Perhaps let configure define CONF_XXX, and use #ifdef
|
||||
CONF_XXX in feature.h? Then what should min-features and max-features do?
|
||||
8 Add "g^E" and "g^Y", to scroll a screen-full line up and down.
|
||||
6 Add ":timer" command, to set a command to be executed at a certain
|
||||
interval, or once after some time has elapsed. (Aaron)
|
||||
Perhaps an autocommand event like CursorHold is better?
|
||||
Patch to add async functionality. (Geoff Greer, 2013 Sep 1 and later)
|
||||
8 Add ":confirm" handling in open_exfile(), for when file already exists.
|
||||
8 When quitting with changed files, make the dialog list the changed file
|
||||
and allow "write all", "discard all", "write some". The last one would
|
||||
@@ -5638,7 +5426,6 @@ Various improvements:
|
||||
gives read errors. Check protection before opening.
|
||||
- When writing check for file exists but no permission, "Permission denied".
|
||||
- If file does not exist, check if directory exists.
|
||||
- MSDOS: although t_cv and t_ci are not set, do invert char under cursor.
|
||||
- Settings edit mode: make file with ":set opt=xx", edit it, parse it as ex
|
||||
commands.
|
||||
- ":set -w all": list one option per line.
|
||||
@@ -5673,10 +5460,7 @@ Various improvements:
|
||||
instead of CTRL-R to make repeating possible. (Marinichev)
|
||||
- Add "^Vb" on the command line, replace with word before or under the
|
||||
cursor?
|
||||
- Option to make a .swp file only when a change is made (Templeton).
|
||||
- Support mapping for replace mode and "r" command (Vi doesn't do this)?
|
||||
5 Add 'ignorefilecase' option: Ignore case when expanding file names.
|
||||
":e ma<Tab>" would also find "Makefile" on Unix.
|
||||
8 Sorting of filenames for completion is wrong on systems that ignore
|
||||
case of filenames. Add 'ignorefncase' option. When set, case in
|
||||
filenames is ignored for sorting them. Patch by Mike Williams:
|
||||
@@ -5745,11 +5529,6 @@ Far future and "big" extensions:
|
||||
- Add open mode, use it when terminal has no cursor positioning.
|
||||
- Special "drawing mode": a line is drawn where the cursor is moved to.
|
||||
Backspace deletes along the line (from jvim).
|
||||
- Implement ":Bset", set option in all buffers. Also ":Wset", set in all
|
||||
windows, ":Aset, set in all arguments and ":Tset", set in all files
|
||||
mentioned in the tags file.
|
||||
Add buffer/arg range, like in ":2,5B%s/..." (do we really need this???)
|
||||
Add search string: "B/*.c/%s/.."? Or ":F/*.c/%s/.."?
|
||||
- Support for underlining (underscore-BS-char), bold (char-BS-char) and other
|
||||
standout modes switched on/off with , 'overstrike' option (Reiter).
|
||||
- Add vertical mode (Paul Jury, Demirel): "5vdw" deletes a word in five
|
||||
@@ -5765,8 +5544,5 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
When using "do" or ":diffget" in a buffer with changes in every line an extra
|
||||
empty line would appear.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
|
||||
+22
-21
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Sep 12
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -159,7 +159,7 @@ Many functions and commands have been added to support the new types.
|
||||
On some systems the numbers used in Vim script are now 64 bit. This can be
|
||||
checked with the |+num64| feature.
|
||||
|
||||
Many items were added so support |new-style-testing|.
|
||||
Many items were added to support |new-style-testing|.
|
||||
|
||||
printf() now accepts any type of argument for %s. It is converted to a string
|
||||
like with string().
|
||||
@@ -1031,7 +1031,7 @@ Files: src/configure.in, src/auto/configure
|
||||
|
||||
Patch 7.4.095 (after 7.4.093)
|
||||
Problem: Regexp for LuaJIT version doesn't work on BSD.
|
||||
Solution: Use "*" instead of "\+" and "\?". (Ozaki)
|
||||
Solution: Use "*" instead of "\+" and "\?". (Ozaki Kiichi)
|
||||
Files: src/configure.in, src/auto/configure
|
||||
|
||||
Patch 7.4.096
|
||||
@@ -1750,7 +1750,7 @@ Files: src/Makefile
|
||||
|
||||
Patch 7.4.218
|
||||
Problem: It's not easy to remove duplicates from a list.
|
||||
Solution: Add the uniq() function. (LCD)
|
||||
Solution: Add the uniq() function. (Lcd)
|
||||
Files: runtime/doc/change.txt, runtime/doc/eval.txt,
|
||||
runtime/doc/usr_41.txt, runtime/doc/version7.txt, src/eval.c,
|
||||
src/testdir/test55.in, src/testdir/test55.ok
|
||||
@@ -4311,7 +4311,7 @@ Files: src/misc2.c
|
||||
|
||||
Patch 7.4.650
|
||||
Problem: Configure check may fail because the dl library is not used.
|
||||
Solution: Put "-ldl" in LIBS rather than LDFLAGS. (Oazki Kiichi)
|
||||
Solution: Put "-ldl" in LIBS rather than LDFLAGS. (Ozaki Kiichi)
|
||||
Files: src/configure.in, src/auto/configure
|
||||
|
||||
Patch 7.4.651 (after 7.4.582)
|
||||
@@ -4903,7 +4903,7 @@ Solution: Make the buffer larger. (Kazunobu Kuriyama)
|
||||
Files: src/eval.c
|
||||
|
||||
Patch 7.4.749 (after 7.4.741)
|
||||
Problem: For some options two consecutive commas are OK. (Nikolay Pavlov)
|
||||
Problem: For some options two consecutive commas are OK. (Nikolai Pavlov)
|
||||
Solution: Add the P_ONECOMMA flag.
|
||||
Files: src/option.c
|
||||
|
||||
@@ -6969,7 +6969,7 @@ Files: src/Make_mvc.mak, src/GvimExt/Makefile
|
||||
|
||||
Patch 7.4.1096
|
||||
Problem: Need several lines to verify a command produces an error.
|
||||
Solution: Add assert_fails(). (suggested by Nikolay Pavlov)
|
||||
Solution: Add assert_fails(). (suggested by Nikolai Pavlov)
|
||||
Make the quickfix alloc test actually work.
|
||||
Files: src/testdir/test_quickfix.vim, src/eval.c, runtime/doc/eval.txt,
|
||||
src/misc2.c, src/alloc.h
|
||||
@@ -7432,7 +7432,7 @@ Files: src/mbyte.c, src/os_win32.c
|
||||
|
||||
Patch 7.4.1166
|
||||
Problem: Can't encode a Funcref into JSON. jsonencode() doesn't handle the
|
||||
same list or dict twice properly. (Nikolay Pavlov)
|
||||
same list or dict twice properly. (Nikolai Pavlov)
|
||||
Solution: Give an error. Reset copyID when the list or dict is finished.
|
||||
Files: src/json.c, src/proto/json.pro, src/testdir/test_json.vim
|
||||
|
||||
@@ -7442,7 +7442,7 @@ Solution: Add tests.
|
||||
Files: src/testdir/test_viml.vim
|
||||
|
||||
Patch 7.4.1168
|
||||
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay
|
||||
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolai
|
||||
Pavlov)
|
||||
Solution: Make the string "v:true" instead of "true".
|
||||
Files: src/eval.c, src/testdir/test_viml.vim
|
||||
@@ -7993,7 +7993,7 @@ Files: src/testdir/test_channel.vim
|
||||
|
||||
Patch 7.4.1258
|
||||
Problem: The channel test can fail if messages arrive later.
|
||||
Solution: Add a short sleep. (Jun T.)
|
||||
Solution: Add a short sleep. (Jun Takimoto)
|
||||
Files: src/testdir/test_channel.vim
|
||||
|
||||
Patch 7.4.1259
|
||||
@@ -8848,8 +8848,8 @@ Files: src/channel.c, src/gui_w32.c, src/os_win32.c, src/structs.h,
|
||||
|
||||
Patch 7.4.1405
|
||||
Problem: Completion menu flickers.
|
||||
Solution: Delay showing the popup menu. (Shougo, Justin M. Keyes, closes
|
||||
#656)
|
||||
Solution: Delay showing the popup menu. (Shougo Matsu, Justin M. Keyes,
|
||||
closes #656)
|
||||
Files: src/edit.c
|
||||
|
||||
Patch 7.4.1406
|
||||
@@ -9372,7 +9372,7 @@ Solution: Handle blinking differently. (Kazunobu Kuriyama)
|
||||
Files: src/gui_gtk_x11.c
|
||||
|
||||
Patch 7.4.1498
|
||||
Problem: Error for locked item when using json_decode(). (Shougo)
|
||||
Problem: Error for locked item when using json_decode(). (Shougo Matsu)
|
||||
Solution: Initialize v_lock.
|
||||
Files: src/json.c
|
||||
|
||||
@@ -9775,7 +9775,7 @@ Files: src/testdir/Make_all.mak, src/testdir/test106.in,
|
||||
|
||||
Patch 7.4.1570
|
||||
Problem: There is no way to avoid the message when editing a file.
|
||||
Solution: Add the "F" flag to 'shortmess'. (Shougo, closes #686)
|
||||
Solution: Add the "F" flag to 'shortmess'. (Shougo Matsu, closes #686)
|
||||
Files: runtime/doc/options.txt, src/buffer.c, src/ex_cmds.c,
|
||||
src/option.h
|
||||
|
||||
@@ -10793,7 +10793,7 @@ Files: src/if_py_both.h
|
||||
|
||||
Patch 7.4.1744
|
||||
Problem: Python: Converting a sequence may leak memory.
|
||||
Solution: Decrement a reference. (Nikolay Pavlov)
|
||||
Solution: Decrement a reference. (Nikolai Pavlov)
|
||||
Files: src/if_py_both.h
|
||||
|
||||
Patch 7.4.1745
|
||||
@@ -10866,7 +10866,8 @@ Files: src/option.c, src/testdir/test_alot.vim,
|
||||
Patch 7.4.1757
|
||||
Problem: When using complete() it may set 'modified' even though nothing
|
||||
was inserted.
|
||||
Solution: Use Down/Up instead of Next/Previous match. (Shougo, closes #745)
|
||||
Solution: Use Down/Up instead of Next/Previous match. (Shougo Matsu, closes
|
||||
#745)
|
||||
Files: src/edit.c
|
||||
|
||||
Patch 7.4.1758
|
||||
@@ -11392,7 +11393,7 @@ Solution: Check if ch_to_be_closed is set.
|
||||
Files: src/channel.c
|
||||
|
||||
Patch 7.4.1850
|
||||
Problem: GUI freezes when using a job. (Shougo)
|
||||
Problem: GUI freezes when using a job. (Shougo Matsu)
|
||||
Solution: Unregister the channel when there is an input error.
|
||||
Files: src/channel.c
|
||||
|
||||
@@ -12354,12 +12355,12 @@ Files: src/testdir/test_cmdline.vim
|
||||
|
||||
Patch 7.4.2013
|
||||
Problem: Using "noinsert" in 'completeopt' breaks redo.
|
||||
Solution: Set compl_curr_match. (Shougo, closes #874)
|
||||
Solution: Set compl_curr_match. (Shougo Matsu, closes #874)
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 7.4.2014
|
||||
Problem: Using "noinsert" in 'completeopt' does not insert match.
|
||||
Solution: Set compl_enter_selects. (Shougo, closes #875)
|
||||
Solution: Set compl_enter_selects. (Shougo Matsu, closes #875)
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 7.4.2015
|
||||
@@ -14279,7 +14280,7 @@ Solution: Make close_buffer() go back to the right window.
|
||||
Files: src/buffer.c, src/testdir/test_autocmd.vim
|
||||
|
||||
Patch 7.4.2329
|
||||
Problem: Error for min() and max() contains %s. (Nikolay Pavlov)
|
||||
Problem: Error for min() and max() contains %s. (Nikolai Pavlov)
|
||||
Solution: Pass the function name. (closes #1040)
|
||||
Files: src/evalfunc.c, src/testdir/test_expr.vim
|
||||
|
||||
@@ -14405,7 +14406,7 @@ Solution: Don't access curwin when exiting.
|
||||
Files: src/buffer.c
|
||||
|
||||
Patch 7.4.2349
|
||||
Problem: Valgrind reports using uninitialzed memory. (Dominique Pelle)
|
||||
Problem: Valgrind reports using uninitialized memory. (Dominique Pelle)
|
||||
Solution: Check the length before checking for a NUL.
|
||||
Files: src/message.c
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Aug 26
|
||||
" Last Change: 2016 Sep 22
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -676,6 +676,9 @@ au BufNewFile,BufRead *.dts,*.dtsi setf dts
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo)
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
|
||||
|
||||
" EditorConfig (close enough to dosini)
|
||||
au BufNewFile,BufRead .editorconfig setf dosini
|
||||
|
||||
" Embedix Component Description
|
||||
au BufNewFile,BufRead *.ecd setf ecd
|
||||
|
||||
@@ -806,6 +809,10 @@ au BufNewFile,BufRead *.gp,.gprc setf gp
|
||||
au BufNewFile,BufRead */.gnupg/options setf gpg
|
||||
au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
|
||||
au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg
|
||||
if !empty($GNUPGHOME)
|
||||
au BufNewFile,BufRead $GNUPGHOME/options setf gpg
|
||||
au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg
|
||||
endif
|
||||
|
||||
" gnash(1) configuration files
|
||||
au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
|
||||
|
||||
+56
-5
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: MetaFont
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: METAFONT
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 2
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,9 +12,59 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
let b:undo_ftplugin = "setl com< cms< fo< sua< inc< def< ofu<"
|
||||
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
|
||||
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=cjroql2
|
||||
setlocal suffixesadd=.mf
|
||||
let &l:include = '\<input\>'
|
||||
let &l:define = '\<\%(let\|newinternal\|interim\|def\|vardef\)\>\|\<\%(primary\|secondary\|tertiary\)def\>\s*[^ .]\+'
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
let g:omni_syntax_group_include_mf = 'mf\w\+'
|
||||
let g:omni_syntax_group_exclude_mf = 'mfTodoComment'
|
||||
|
||||
let s:mp_regex = {
|
||||
\ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|beginchar\|beginlogochar\)\>',
|
||||
\ 'endsection' : '^\s*\%(enddef\|endchar\)\>',
|
||||
\ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>',
|
||||
\ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>'
|
||||
\ }
|
||||
|
||||
function! s:move_around(count, what, flags, visual)
|
||||
if a:visual
|
||||
exe "normal! gv"
|
||||
endif
|
||||
call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark
|
||||
call map(range(2, a:count), 'search(s:mp_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>
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<if\>:\<else\%[if]\>:\<fi\>,' .
|
||||
\ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' .
|
||||
\ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' .
|
||||
\ '\<begingroup\>:\<endgroup\>,' .
|
||||
\ '\<begin\%(logo\)\?char\>:\<endchar\>'
|
||||
" Ignore comments and strings
|
||||
let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
|
||||
\ =~# "mf\\(Comment\\|String\\)$"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
+59
-5
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 2
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,9 +12,16 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
let b:undo_ftplugin = "setl com< cms< fo< sua< inc< def< ofu<"
|
||||
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
|
||||
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=cjroql2
|
||||
setlocal suffixesadd=.mp,.mpiv
|
||||
let &l:include = '\<\%(input\|loadmodule\)\>' " loadmodule is in MetaFun
|
||||
let &l:define = '\<\%(let\|newinternal\|interim\|def\|vardef\)\>\|\<\%(primary\|secondary\|tertiary\)def\>\s*[^ .]\+'
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
let g:omni_syntax_group_include_mp = 'mf\w\+,mp\w\+'
|
||||
let g:omni_syntax_group_exclude_mp = 'mfTodoComment'
|
||||
|
||||
if exists(":FixBeginfigs") != 2
|
||||
command -nargs=0 FixBeginfigs call s:fix_beginfigs()
|
||||
@@ -24,5 +32,51 @@ if exists(":FixBeginfigs") != 2
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:mp_regex = {
|
||||
\ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|begin\%(fig\|char\|logochar\|glyph\|graph\)\)\>',
|
||||
\ 'endsection' : '^\s*\%(enddef\|end\%(fig\|char\|glyph\|graph\)\)\>',
|
||||
\ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>',
|
||||
\ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>'
|
||||
\ }
|
||||
|
||||
function! s:move_around(count, what, flags, visual)
|
||||
if a:visual
|
||||
exe "normal! gv"
|
||||
endif
|
||||
call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark
|
||||
call map(range(2, a:count), 'search(s:mp_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>
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<if\>:\<else\%[if]\>:\<fi\>,' .
|
||||
\ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' .
|
||||
\ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' .
|
||||
\ '\<beginfig\>:\<endfig\>,' .
|
||||
\ '\<begingroup\>:\<endgroup\>,' .
|
||||
\ '\<begin\%(logo\)\?char\>:\<endchar\>,' .
|
||||
\ '\<beginglyph\>:\<endglyph\>,' .
|
||||
\ '\<begingraph\>:\<endgraph\>'
|
||||
" Ignore comments and strings
|
||||
let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
|
||||
\ =~# "^mf\\%(Comment\\|String\\|\\)$\\|^mpTeXinsert$"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: python
|
||||
" Maintainer: James Sully <sullyj3@gmail.com>
|
||||
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Tue, 06 September 2016
|
||||
" Last Change: Tue, 09 October 2016
|
||||
" https://github.com/sullyj3/vim-ftplugin-python
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
@@ -22,10 +22,10 @@ setlocal omnifunc=pythoncomplete#Complete
|
||||
|
||||
set wildignore+=*.pyc
|
||||
|
||||
let b:next_toplevel='\v%$\|^(class\|def)>'
|
||||
let b:prev_toplevel='\v^(class\|def)>'
|
||||
let b:next='\v%$\|^\s*(class\|def)>'
|
||||
let b:prev='\v^\s*(class\|def)>'
|
||||
let b:next_toplevel='\v%$\|^(class\|def\|async def)>'
|
||||
let b:prev_toplevel='\v^(class\|def\|async def)>'
|
||||
let b:next='\v%$\|^\s*(class\|def\|async def)>'
|
||||
let b:prev='\v^\s*(class\|def\|async def)>'
|
||||
|
||||
execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W')<cr>"
|
||||
execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb')<cr>"
|
||||
|
||||
@@ -16,7 +16,7 @@ if exists("*CdlGetIndent")
|
||||
"finish
|
||||
endif
|
||||
|
||||
" find out if an "...=..." expresion its an asignment (or a conditional)
|
||||
" find out if an "...=..." expresion is an assignment (or a conditional)
|
||||
" it scans 'line' first, and then the previos lines
|
||||
fun! CdlAsignment(lnum, line)
|
||||
let f = -1
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.45
|
||||
" Last Change: 2016 Aug. 29
|
||||
" Version: 0.46
|
||||
" Last Change: 2016 Sep. 27
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made by: Albert Oliver Serra and Takuya Fujiwara.
|
||||
" Useful suggestions were made, in chronological order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -121,7 +122,8 @@ function FortranGetIndent(lnum)
|
||||
let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}'
|
||||
let type='\(\(integer\|real\|double\s\+precision\|complex\|logical'
|
||||
\.'\|character\|type\|class\)\s*\S*\s\+\)\='
|
||||
if prevstat =~? '^\s*\(module\|contains\/submodule\|program\)\>'
|
||||
if prevstat =~? '^\s*\(contains\|submodule\|program\)\>'
|
||||
\ ||prevstat =~? '^\s*'.'module\>\(\s*\procedure\)\@!'
|
||||
\ ||prevstat =~? '^\s*'.prefix.'subroutine\>'
|
||||
\ ||prevstat =~? '^\s*'.prefix.type.'function\>'
|
||||
\ ||prevstat =~? '^\s*'.type.prefix.'function\>'
|
||||
@@ -129,7 +131,7 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
if getline(v:lnum) =~? '^\s*contains\>'
|
||||
\ ||getline(v:lnum)=~? '^\s*end\s*'
|
||||
\ .'\(function\|subroutine\|module\/submodule\|program\)\>'
|
||||
\ .'\(function\|subroutine\|module\|submodule\|program\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -749,7 +749,7 @@ func! s:CssPrevNonComment(lnum, stopline)
|
||||
while 1
|
||||
let ccol = match(getline(lnum), '\*/')
|
||||
if ccol < 0
|
||||
" No comment end thus its something else.
|
||||
" No comment end thus it's something else.
|
||||
return lnum
|
||||
endif
|
||||
call cursor(lnum, ccol + 1)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
" METAFONT indent file
|
||||
" Language: METAFONT
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Last Change: 2016 Oct 1
|
||||
|
||||
runtime! indent/mp.vim
|
||||
+324
-175
@@ -1,56 +1,19 @@
|
||||
" MetaPost indent file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Eugene Minkovskii <emin@mccme.ru>
|
||||
" Last Change: 2012 May 18
|
||||
" Version: 0.1
|
||||
" ==========================================================================
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Eugene Minkovskii <emin@mccme.ru>
|
||||
" Last Change: 2016 Oct 2, 4:13pm
|
||||
" Version: 0.2
|
||||
|
||||
" Identation Rules: {{{1
|
||||
" First of all, MetaPost language don't expect any identation rules.
|
||||
" This screept need for you only if you (not MetaPost) need to do
|
||||
" exactly code. If you don't need to use indentation, see
|
||||
" :help filetype-indent-off
|
||||
"
|
||||
" Note: Every rules of identation in MetaPost or TeX languages (and in some
|
||||
" other of course) is very subjective. I can release only my vision of this
|
||||
" promlem.
|
||||
"
|
||||
" ..........................................................................
|
||||
" Example of correct (by me) identation {{{2
|
||||
" shiftwidth=4
|
||||
" ==========================================================================
|
||||
" for i=0 upto 99:
|
||||
" z[i] = (0,1u) rotated (i*360/100);
|
||||
" endfor
|
||||
" draw z0 -- z10 -- z20
|
||||
" withpen ... % <- 2sw because breaked line
|
||||
" withcolor ...; % <- same as previous
|
||||
" draw z0 for i=1 upto 99:
|
||||
" -- z[i] % <- 1sw from left end of 'for' satement
|
||||
" endfor withpen ... % <- 0sw from left end of 'for' satement
|
||||
" withcolor ...; % <- 2sw because breaked line
|
||||
" draw if One: % <- This is internal if (like 'for' above)
|
||||
" one
|
||||
" elsif Other:
|
||||
" other
|
||||
" fi withpen ...;
|
||||
" if one: % <- This is external if
|
||||
" draw one;
|
||||
" elseif other:
|
||||
" draw other;
|
||||
" fi
|
||||
" draw z0; draw z1;
|
||||
" }}}
|
||||
" }}}
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetMetaPostIndent()
|
||||
setlocal indentkeys+=;,<:>,=if,=for,=def,=end,=else,=fi
|
||||
setlocal indentkeys+==end,=else,=fi,=fill,0),0]
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetMetaPostIndent")
|
||||
@@ -59,151 +22,337 @@ endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Auxiliary Definitions: {{{1
|
||||
function! MetaNextNonblankNoncomment(pos)
|
||||
" Like nextnonblank() but ignore comment lines
|
||||
let tmp = nextnonblank(a:pos)
|
||||
while tmp && getline(tmp) =~ '^\s*%'
|
||||
let tmp = nextnonblank(tmp+1)
|
||||
function GetMetaPostIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return GetMetaPostIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
" Regexps {{{
|
||||
" Note: the next three variables are made global so that a user may add
|
||||
" further keywords.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" Put these in ~/.vim/after/indent/mp.vim
|
||||
"
|
||||
" let g:mp_open_tag .= '\|\<begintest\>'
|
||||
" let g:mp_close_tag .= '\|\<endtest\>'
|
||||
|
||||
" Expressions starting indented blocks
|
||||
let g:mp_open_tag = ''
|
||||
\ . '\<if\>'
|
||||
\ . '\|\<else\%[if]\>'
|
||||
\ . '\|\<for\%(\|ever\|suffixes\)\>'
|
||||
\ . '\|\<begingroup\>'
|
||||
\ . '\|\<\%(\|var\|primary\|secondary\|tertiary\)def\>'
|
||||
\ . '\|^\s*\<begin\%(fig\|graph\|glyph\|char\|logochar\)\>'
|
||||
\ . '\|[([{]'
|
||||
|
||||
" Expressions ending indented blocks
|
||||
let g:mp_close_tag = ''
|
||||
\ . '\<fi\>'
|
||||
\ . '\|\<else\%[if]\>'
|
||||
\ . '\|\<end\%(\|for\|group\|def\|fig\|char\|glyph\|graph\)\>'
|
||||
\ . '\|[)\]}]'
|
||||
|
||||
" Statements that may span multiple lines and are ended by a semicolon. To
|
||||
" keep this list short, statements that are unlikely to be very long or are
|
||||
" not very common (e.g., keywords like `interim` or `showtoken`) are not
|
||||
" included.
|
||||
"
|
||||
" The regex for assignments and equations (the last branch) is tricky, because
|
||||
" it must not match things like `for i :=`, `if a=b`, `def...=`, etc... It is
|
||||
" not perfect, but it works reasonably well.
|
||||
let g:mp_statement = ''
|
||||
\ . '\<\%(\|un\|cut\)draw\>'
|
||||
\ . '\|\<\%(\|un\)fill\%[draw]\>'
|
||||
\ . '\|\<draw\%(dbl\)\=arrow\>'
|
||||
\ . '\|\<clip\>'
|
||||
\ . '\|\<addto\>'
|
||||
\ . '\|\<save\>'
|
||||
\ . '\|\<setbounds\>'
|
||||
\ . '\|\<message\>'
|
||||
\ . '\|\<errmessage\>'
|
||||
\ . '\|\<errhelp\>'
|
||||
\ . '\|\<fontmapline\>'
|
||||
\ . '\|\<pickup\>'
|
||||
\ . '\|\<show\>'
|
||||
\ . '\|\<special\>'
|
||||
\ . '\|\<write\>'
|
||||
\ . '\|\%(^\|;\)\%([^;=]*\%('.g:mp_open_tag.'\)\)\@!.\{-}:\=='
|
||||
|
||||
" A line ends with zero or more spaces, possibly followed by a comment.
|
||||
let s:eol = '\s*\%($\|%\)'
|
||||
" }}}
|
||||
|
||||
" Auxiliary functions {{{
|
||||
" Returns 1 if (0-based) position immediately preceding `pos` in `line` is
|
||||
" inside a string or a comment; returns 0 otherwise.
|
||||
|
||||
" This is the function that is called more often when indenting, so it is
|
||||
" critical that it is efficient. The method we use is significantly faster
|
||||
" than using syntax attributes, and more general (it does not require
|
||||
" syntax_items). It is also faster than using a single regex matching an even
|
||||
" number of quotes. It helps that MetaPost strings cannot span more than one
|
||||
" line and cannot contain escaped quotes.
|
||||
function! s:CommentOrString(line, pos)
|
||||
let in_string = 0
|
||||
let q = stridx(a:line, '"')
|
||||
let c = stridx(a:line, '%')
|
||||
while q >= 0 && q < a:pos
|
||||
if c >= 0 && c < q
|
||||
if in_string " Find next percent symbol
|
||||
let c = stridx(a:line, '%', q + 1)
|
||||
else " Inside comment
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
let in_string = 1 - in_string
|
||||
let q = stridx(a:line, '"', q + 1) " Find next quote
|
||||
endwhile
|
||||
return tmp
|
||||
return in_string || (c >= 0 && c <= a:pos)
|
||||
endfunction
|
||||
|
||||
function! MetaPrevNonblankNoncomment(pos)
|
||||
" Like prevnonblank() but ignore comment lines
|
||||
let tmp = prevnonblank(a:pos)
|
||||
while tmp && getline(tmp) =~ '^\s*%'
|
||||
let tmp = prevnonblank(tmp-1)
|
||||
" Find the first non-comment non-blank line before the current line.
|
||||
function! s:PrevNonBlankNonComment(lnum)
|
||||
let l:lnum = prevnonblank(a:lnum - 1)
|
||||
while getline(l:lnum) =~# '^\s*%'
|
||||
let l:lnum = prevnonblank(l:lnum - 1)
|
||||
endwhile
|
||||
return tmp
|
||||
return l:lnum
|
||||
endfunction
|
||||
|
||||
function! MetaSearchNoncomment(pattern, ...)
|
||||
" Like search() but ignore commented areas
|
||||
if a:0
|
||||
let flags = a:1
|
||||
elseif &wrapscan
|
||||
let flags = "w"
|
||||
else
|
||||
let flags = "W"
|
||||
endif
|
||||
let cl = line(".")
|
||||
let cc = col(".")
|
||||
let tmp = search(a:pattern, flags)
|
||||
while tmp && synIDattr(synID(line("."), col("."), 1), "name") =~
|
||||
\ 'm[fp]\(Comment\|TeXinsert\|String\)'
|
||||
let tmp = search(a:pattern, flags)
|
||||
" Returns true if the last tag appearing in the line is an open tag; returns
|
||||
" false otherwise.
|
||||
function! s:LastTagIsOpen(line)
|
||||
let o = s:LastValidMatchEnd(a:line, g:mp_open_tag, 0)
|
||||
if o == - 1 | return v:false | endif
|
||||
return s:LastValidMatchEnd(a:line, g:mp_close_tag, o) < 0
|
||||
endfunction
|
||||
|
||||
" A simple, efficient and quite effective heuristics is used to test whether
|
||||
" a line should cause the next line to be indented: count the "opening tags"
|
||||
" (if, for, def, ...) in the line, count the "closing tags" (endif, endfor,
|
||||
" ...) in the line, and compute the difference. We call the result the
|
||||
" "weight" of the line. If the weight is positive, then the next line should
|
||||
" most likely be indented. Note that `else` and `elseif` are both opening and
|
||||
" closing tags, so they "cancel out" in almost all cases, the only exception
|
||||
" being a leading `else[if]`, which is counted as an opening tag, but not as
|
||||
" a closing tag (so that, for instance, a line containing a single `else:`
|
||||
" will have weight equal to one, not zero). We do not treat a trailing
|
||||
" `else[if]` in any special way, because lines ending with an open tag are
|
||||
" dealt with separately before this function is called (see
|
||||
" GetMetaPostIndentIntern()).
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" forsuffixes $=a,b: if x.$ = y.$ : draw else: fill fi
|
||||
" % This line will be indented because |{forsuffixes,if,else}| > |{else,fi}| (3 > 2)
|
||||
" endfor
|
||||
|
||||
function! s:Weight(line)
|
||||
let [o, i] = [0, s:ValidMatchEnd(a:line, g:mp_open_tag, 0)]
|
||||
while i > 0
|
||||
let o += 1
|
||||
let i = s:ValidMatchEnd(a:line, g:mp_open_tag, i)
|
||||
endwhile
|
||||
if !tmp
|
||||
call cursor(cl,cc)
|
||||
let [c, i] = [0, matchend(a:line, '^\s*\<else\%[if]\>')] " Skip a leading else[if]
|
||||
let i = s:ValidMatchEnd(a:line, g:mp_close_tag, i)
|
||||
while i > 0
|
||||
let c += 1
|
||||
let i = s:ValidMatchEnd(a:line, g:mp_close_tag, i)
|
||||
endwhile
|
||||
return o - c
|
||||
endfunction
|
||||
|
||||
" Similar to matchend(), but skips strings and comments.
|
||||
" line: a String
|
||||
function! s:ValidMatchEnd(line, pat, start)
|
||||
let i = matchend(a:line, a:pat, a:start)
|
||||
while i > 0 && s:CommentOrString(a:line, i)
|
||||
let i = matchend(a:line, a:pat, i)
|
||||
endwhile
|
||||
return i
|
||||
endfunction
|
||||
|
||||
" Like s:ValidMatchEnd(), but returns the end position of the last (i.e.,
|
||||
" rightmost) match.
|
||||
function! s:LastValidMatchEnd(line, pat, start)
|
||||
let last_found = -1
|
||||
let i = matchend(a:line, a:pat, a:start)
|
||||
while i > 0
|
||||
if !s:CommentOrString(a:line, i)
|
||||
let last_found = i
|
||||
endif
|
||||
let i = matchend(a:line, a:pat, i)
|
||||
endwhile
|
||||
return last_found
|
||||
endfunction
|
||||
|
||||
function! s:DecreaseIndentOnClosingTag(curr_indent)
|
||||
let cur_text = getline(v:lnum)
|
||||
if cur_text =~# '^\s*\%('.g:mp_close_tag.'\)'
|
||||
return max([a:curr_indent - shiftwidth(), 0])
|
||||
endif
|
||||
return tmp
|
||||
return a:curr_indent
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! GetMetaPostIndent()
|
||||
" not indent in comment ???
|
||||
if synIDattr(synID(line("."), col("."), 1), "name") =~
|
||||
\ 'm[fp]\(Comment\|TeXinsert\|String\)'
|
||||
" Main function {{{
|
||||
"
|
||||
" Note: Every rule of indentation in MetaPost is very subjective. We might get
|
||||
" creative, but things get murky very soon (there are too many corner cases).
|
||||
" So, we provide a means for the user to decide what to do when this script
|
||||
" doesn't get it. We use a simple idea: use '%>', '%<' and '%=' to explicitly
|
||||
" control indentation. The '<' and '>' symbols may be repeated many times
|
||||
" (e.g., '%>>' will cause the next line to be indented twice).
|
||||
"
|
||||
" By using '%>...', '%<...' and '%=', the indentation the user wants is
|
||||
" preserved by commands like gg=G, even if it does not follow the rules of
|
||||
" this script.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" def foo =
|
||||
" makepen(
|
||||
" subpath(T-n,t) of r %>
|
||||
" shifted .5down %>
|
||||
" --subpath(t,T) of r shifted .5up -- cycle %<<<
|
||||
" )
|
||||
" withcolor black
|
||||
" enddef
|
||||
"
|
||||
" The default indentation of the previous example would be:
|
||||
"
|
||||
" def foo =
|
||||
" makepen(
|
||||
" subpath(T-n,t) of r
|
||||
" shifted .5down
|
||||
" --subpath(t,T) of r shifted .5up -- cycle
|
||||
" )
|
||||
" withcolor black
|
||||
" enddef
|
||||
"
|
||||
" Personally, I prefer the latter, but anyway...
|
||||
function! GetMetaPostIndentIntern()
|
||||
" Do not touch indentation inside verbatimtex/btex.. etex blocks.
|
||||
if synIDattr(synID(v:lnum, 1, 1), "name") =~# '^mpTeXinsert$\|^tex\|^Delimiter'
|
||||
return -1
|
||||
endif
|
||||
" Some RegExps: {{{1
|
||||
" end_of_item: all of end by ';'
|
||||
" + all of end by :endfor, :enddef, :endfig, :endgroup, :fi
|
||||
" + all of start by :beginfig(num), :begingroup
|
||||
" + all of start by :for, :if, :else, :elseif and end by ':'
|
||||
" + all of start by :def, :vardef and end by '='
|
||||
let end_of_item = '\(' .
|
||||
\ ';\|' .
|
||||
\ '\<\(end\(for\|def\|fig\|group\)\|fi\)\>\|' .
|
||||
\ '\<begin\(group\>\|fig\s*(\s*\d\+\s*)\)\|' .
|
||||
\ '\<\(for\|if\|else\(if\)\=\)\>.\+:\|' .
|
||||
\ '\<\(var\)\=def\>.\+=' . '\)'
|
||||
" }}}
|
||||
" Save: current position {{{1
|
||||
let cl = line (".")
|
||||
let cc = col (".")
|
||||
let cs = getline(".")
|
||||
" if it is :beginfig or :endfig use zero indent
|
||||
if cs =~ '^\s*\(begin\|end\)fig\>'
|
||||
return 0
|
||||
endif
|
||||
" }}}
|
||||
" Initialise: ind variable {{{1
|
||||
" search previous item not in current line
|
||||
let p_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
while p_semicol_l == cl
|
||||
let p_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
endwhile
|
||||
" if this is first item in program use zero indent
|
||||
if !p_semicol_l
|
||||
return 0
|
||||
endif
|
||||
" if this is multiline item, remember first indent
|
||||
if MetaNextNonblankNoncomment(p_semicol_l+1) < cl
|
||||
let ind = indent(MetaNextNonblankNoncomment(p_semicol_l+1))
|
||||
" else --- search pre-previous item for search first line in previous item
|
||||
else
|
||||
" search pre-previous item not in current line
|
||||
let pp_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
while pp_semicol_l == p_semicol_l
|
||||
let pp_semicol_l = MetaSearchNoncomment(end_of_item,"bW")
|
||||
endwhile
|
||||
" if we find pre-previous item, remember indent of previous item
|
||||
" else --- remember zero
|
||||
if pp_semicol_l
|
||||
let ind = indent(MetaNextNonblankNoncomment(line(".")+1))
|
||||
else
|
||||
let ind = 0
|
||||
endif
|
||||
endif
|
||||
" }}}
|
||||
" Increase Indent: {{{1
|
||||
" if it is an internal/external :for or :if statements {{{2
|
||||
let pnn_s = getline(MetaPrevNonblankNoncomment(cl-1))
|
||||
if pnn_s =~ '\<\(for\|if\)\>.\+:\s*\($\|%\)'
|
||||
let ind = match(pnn_s, '\<\(for\|if\)\>.\+:\s*\($\|%\)') + &sw
|
||||
" }}}
|
||||
" if it is a :def, :vardef, :beginfig, :begingroup, :else, :elseif {{{2
|
||||
elseif pnn_s =~ '^\s*\(' .
|
||||
\ '\(var\)\=def\|' .
|
||||
\ 'begin\(group\|fig\s*(\s*\d\+\s*)\)\|' .
|
||||
\ 'else\(if\)\=' . '\)\>'
|
||||
let ind = ind + &sw
|
||||
" }}}
|
||||
" if it is a broken line {{{2
|
||||
elseif pnn_s !~ end_of_item.'\s*\($\|%\)'
|
||||
let ind = ind + (2 * &sw)
|
||||
endif
|
||||
" }}}
|
||||
" }}}
|
||||
" Decrease Indent: {{{1
|
||||
" if this is :endfor or :enddef statements {{{2
|
||||
" this is correct because :def cannot be inside :for
|
||||
if cs =~ '\<end\(for\|def\)\=\>'
|
||||
call MetaSearchNoncomment('\<for\>.\+:\s*\($\|%\)' . '\|' .
|
||||
\ '^\s*\(var\)\=def\>',"bW")
|
||||
if col(".") > 1
|
||||
let ind = col(".") - 1
|
||||
else
|
||||
let ind = indent(".")
|
||||
endif
|
||||
" }}}
|
||||
" if this is :fi, :else, :elseif statements {{{2
|
||||
elseif cs =~ '\<\(else\(if\)\=\|fi\)\>'
|
||||
call MetaSearchNoncomment('\<if\>.\+:\s*\($\|%\)',"bW")
|
||||
let ind = col(".") - 1
|
||||
" }}}
|
||||
" if this is :endgroup statement {{{2
|
||||
elseif cs =~ '^\s*endgroup\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
" }}}
|
||||
" }}}
|
||||
|
||||
return ind
|
||||
" This is the reference line relative to which the current line is indented
|
||||
" (but see below).
|
||||
let lnum = s:PrevNonBlankNonComment(v:lnum)
|
||||
|
||||
" At the start of the file use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let prev_text = getline(lnum)
|
||||
|
||||
" User-defined overrides take precedence over anything else.
|
||||
" See above for an example.
|
||||
let j = match(prev_text, '%[<>=]')
|
||||
if j > 0
|
||||
let i = strlen(matchstr(prev_text, '%>\+', j)) - 1
|
||||
if i > 0
|
||||
return indent(lnum) + i * shiftwidth()
|
||||
endif
|
||||
|
||||
let i = strlen(matchstr(prev_text, '%<\+', j)) - 1
|
||||
if i > 0
|
||||
return max([indent(lnum) - i * shiftwidth(), 0])
|
||||
endif
|
||||
|
||||
if match(prev_text, '%=', j)
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the reference line ends with an open tag, indent.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" if c:
|
||||
" 0
|
||||
" else:
|
||||
" 1
|
||||
" fi if c2: % Note that this line has weight equal to zero.
|
||||
" ... % This line will be indented
|
||||
if s:LastTagIsOpen(prev_text)
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum) + shiftwidth())
|
||||
endif
|
||||
|
||||
" Lines with a positive weight are unbalanced and should likely be indented.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" def f = enddef for i = 1 upto 5: if x[i] > 0: 1 else: 2 fi
|
||||
" ... % This line will be indented (because of the unterminated `for`)
|
||||
if s:Weight(prev_text) > 0
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum) + shiftwidth())
|
||||
endif
|
||||
|
||||
" Unterminated statements cause indentation to kick in.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" draw unitsquare
|
||||
" withcolor black; % This line is indented because of `draw`.
|
||||
" x := a + b + c
|
||||
" + d + e; % This line is indented because of `:=`.
|
||||
"
|
||||
let i = s:LastValidMatchEnd(prev_text, g:mp_statement, 0)
|
||||
if i >= 0 " Does the line contain a statement?
|
||||
if s:ValidMatchEnd(prev_text, ';', i) < 0 " Is the statement unterminated?
|
||||
return indent(lnum) + shiftwidth()
|
||||
else
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum))
|
||||
endif
|
||||
endif
|
||||
|
||||
" Deal with the special case of a statement spanning multiple lines. If the
|
||||
" current reference line L ends with a semicolon, search backwards for
|
||||
" another semicolon or a statement keyword. If the latter is found first,
|
||||
" its line is used as the reference line for indenting the current line
|
||||
" instead of L.
|
||||
"
|
||||
" Example:
|
||||
"
|
||||
" if cond:
|
||||
" draw if a: z0 else: z1 fi
|
||||
" shifted S
|
||||
" scaled T; % L
|
||||
"
|
||||
" for i = 1 upto 3: % <-- Current line: this gets the same indent as `draw ...`
|
||||
"
|
||||
" NOTE: we get here only if L does not contain a statement (among those
|
||||
" listed in g:mp_statement).
|
||||
if s:ValidMatchEnd(prev_text, ';'.s:eol, 0) >= 0 " L ends with a semicolon
|
||||
let stm_lnum = s:PrevNonBlankNonComment(lnum)
|
||||
while stm_lnum > 0
|
||||
let prev_text = getline(stm_lnum)
|
||||
let sc_pos = s:LastValidMatchEnd(prev_text, ';', 0)
|
||||
let stm_pos = s:ValidMatchEnd(prev_text, g:mp_statement, sc_pos)
|
||||
if stm_pos > sc_pos
|
||||
let lnum = stm_lnum
|
||||
break
|
||||
elseif sc_pos > stm_pos
|
||||
break
|
||||
endif
|
||||
let stm_lnum = s:PrevNonBlankNonComment(stm_lnum)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
return s:DecreaseIndentOnClosingTag(indent(lnum))
|
||||
endfunction
|
||||
"
|
||||
" }}}
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -92,11 +92,12 @@ let s:end_skip_expr = s:skip_expr .
|
||||
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")'
|
||||
|
||||
" Regex that defines continuation lines, not including (, {, or [.
|
||||
let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
|
||||
let s:non_bracket_continuation_regex =
|
||||
\ '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|:\@<![^[:alnum:]:][|&?]\|||\|&&\)\s*\%(#.*\)\=$'
|
||||
|
||||
" Regex that defines continuation lines.
|
||||
let s:continuation_regex =
|
||||
\ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
|
||||
\ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|:\@<![^[:alnum:]:][|&?]\|||\|&&\)\s*\%(#.*\)\=$'
|
||||
|
||||
" Regex that defines continuable keywords
|
||||
let s:continuable_regex =
|
||||
@@ -389,7 +390,7 @@ function! s:FindContainingClass()
|
||||
call setpos('.', saved_position)
|
||||
return found_lnum
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
|
||||
call setpos('.', saved_position)
|
||||
return 0
|
||||
|
||||
+32
-5
@@ -389,19 +389,46 @@ endfun
|
||||
|
||||
" get NL separated string with file names
|
||||
let s:n = globpath(&runtimepath, "colors/*.vim")
|
||||
let s:n .= globpath(&packpath, "pack/*/{opt,start}/*/colors/*.vim")
|
||||
|
||||
" split at NL, Ignore case for VMS and windows, sort on name
|
||||
let s:names = sort(map(split(s:n, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
|
||||
|
||||
" define all the submenu entries
|
||||
let s:idx = 100
|
||||
let s:cs_idx = 100
|
||||
for s:name in s:names
|
||||
exe "an 20.450." . s:idx . ' &Edit.C&olor\ Scheme.' . s:name . " :colors " . s:name . "<CR>"
|
||||
let s:idx = s:idx + 10
|
||||
exe "an 20.450." . s:cs_idx . ' &Edit.C&olor\ Scheme.' . s:name . " :colors " . s:name . "<CR>"
|
||||
let s:cs_idx = s:cs_idx + 10
|
||||
endfor
|
||||
unlet s:name s:names s:n s:idx
|
||||
exe "an 20.450." . s:cs_idx . ' &Edit.C&olor\ Scheme.-SEP- <Nop>'
|
||||
let s:cs_idx = s:cs_idx + 10
|
||||
exe "an <silent> 20.450." . s:cs_idx '&Edit.C&olor\ Scheme.Find\ More\ Color\ Schemes' ":call <SID>Colorschemes()<CR>"
|
||||
let s:cs_idx = s:cs_idx + 10
|
||||
unlet s:name s:names s:n
|
||||
|
||||
let s:undo_colorschemes = ['aun &Edit.C&olor\ Scheme.Find\ More\ Color\ Schemes']
|
||||
func! s:Colorschemes()
|
||||
for cmd in s:undo_colorschemes
|
||||
exe "silent! " . cmd
|
||||
endfor
|
||||
let s:undo_colorschemes = []
|
||||
|
||||
let s = globpath(&packpath, "pack/*/{opt,start}/*/colors/*.vim")
|
||||
let names = sort(map(split(s, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
|
||||
let n = s:cs_idx
|
||||
for name in names
|
||||
let menuname = '&Edit.C&olor\ Scheme.' . name
|
||||
exe 'an 20.450.' . n . ' ' . menuname . " :colors " . name . "<CR>"
|
||||
let s:undo_colorschemes += ['aun ' . menuname]
|
||||
let n += 10
|
||||
endfor
|
||||
if empty(names)
|
||||
echomsg "Could not find other color schemes"
|
||||
elseif len(names) == 1
|
||||
echomsg "Found color scheme " . names[0]
|
||||
else
|
||||
echomsg "Found " . len(names) . " more color schemes"
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Setup the Edit.Keymap submenu
|
||||
if has("keymap")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" zipPlugin.vim: Handles browsing zipfiles
|
||||
" PLUGIN PORTION
|
||||
" Date: Jun 07, 2013
|
||||
" Date: Sep 13, 2016
|
||||
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
|
||||
" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
@@ -20,14 +20,14 @@
|
||||
if &cp || exists("g:loaded_zipPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zipPlugin = "v27"
|
||||
let g:loaded_zipPlugin = "v28"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Options: {{{1
|
||||
if !exists("g:zipPlugin_ext")
|
||||
let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,*.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,*.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,*.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx'
|
||||
let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
@@ -34,7 +34,7 @@ syn match aveNumber "[+-]\=\<[0-9]\+\>"
|
||||
" Operator
|
||||
|
||||
syn keyword aveOperator or and max min xor mod by
|
||||
" 'not' is a kind of a problem: Its an Operator as well as a method
|
||||
" 'not' is a kind of a problem: It's an Operator as well as a method
|
||||
" 'not' is only marked as an Operator if not applied as method
|
||||
syn match aveOperator "[^\.]not[^a-zA-Z]"
|
||||
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
" Language: AVR Assembler (AVRA)
|
||||
" AVRA Home: http://avra.sourceforge.net/index.html
|
||||
" AVRA Version: 1.3.0
|
||||
" Last Update: 2016 Oct 7
|
||||
" Maintainer: Marius Ghita <mhitza@gmail.com>
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=a-z,A-Z,48-57,.,_
|
||||
" 'isident' is a global option, better not set it
|
||||
" setlocal isident=a-z,A-Z,48-57,.,_
|
||||
syn case ignore
|
||||
|
||||
syn keyword avraRegister r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2016 Aug 30
|
||||
" Last Change: 2016 Sep 27
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -39,7 +39,7 @@ let s:unsupported = [
|
||||
let &cpo=s:cpo
|
||||
|
||||
" Match uri's
|
||||
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
||||
syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
||||
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+'
|
||||
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+'
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.98
|
||||
" Last Change: 2016 Aug. 29
|
||||
" Version: 0.99
|
||||
" Last Change: 2016 Sep. 23
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
" Version 0.1 (April 2000) was based on the fortran 77 syntax file by Mario Eusebio and
|
||||
" Preben Guldberg. Since then, useful suggestions and contributions have been made,
|
||||
" in chronological order, by:
|
||||
" Version 0.1 (April 2000) for Fortran 95 was based on the Fortran 77 syntax file by
|
||||
" Mario Eusebio and Preben Guldberg. Since then, useful suggestions and contributions
|
||||
" have been made, in chronological order, by:
|
||||
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi and Vishnu V. Krishnan.
|
||||
" Stefano Zaghi, Vishnu V. Krishnan and Judicaël Grasset
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -368,7 +368,7 @@ else
|
||||
endif
|
||||
|
||||
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell
|
||||
syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=\s.*$"
|
||||
syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=&\=\s.*$"
|
||||
|
||||
"cpp is often used with Fortran
|
||||
syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*"
|
||||
|
||||
+241
-130
@@ -1,184 +1,295 @@
|
||||
" Vim syntax file
|
||||
" Language: Metafont
|
||||
" Maintainer: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: April 25, 2001
|
||||
" Language: METAFONT
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: 2016 Oct 1
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook'
|
||||
syn iskeyword @,_
|
||||
|
||||
" METAFONT 'primitives' as defined in chapter 25 of 'The METAFONTbook'
|
||||
" Page 210: 'boolean expressions'
|
||||
syn keyword mfBoolExp true false known unknown odd charexists not and or
|
||||
syn keyword mfBoolExp and charexists false known not odd or true unknown
|
||||
|
||||
" Page 210: 'numeric expression'
|
||||
syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber
|
||||
syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart
|
||||
syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor
|
||||
syn keyword mfNumExp uniformdeviate
|
||||
syn keyword mfNumExp ASCII angle cosd directiontime floor hex length
|
||||
syn keyword mfNumExp mexp mlog normaldeviate oct sind sqrt totalweight
|
||||
syn keyword mfNumExp turningnumber uniformdeviate xpart xxpart xypart
|
||||
syn keyword mfNumExp ypart yxpart yypart
|
||||
|
||||
" Page 211: 'internal quantities'
|
||||
syn keyword mfInternal tracingtitles tracingequations tracingcapsules
|
||||
syn keyword mfInternal tracingchoices tracingspecs tracingpens
|
||||
syn keyword mfInternal tracingcommands tracingrestores tracingmacros
|
||||
syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats
|
||||
syn keyword mfInternal pausing showstopping fontmaking proofing
|
||||
syn keyword mfInternal turningcheck warningcheck smoothing autorounding
|
||||
syn keyword mfInternal granularity fillin year month day time
|
||||
syn keyword mfInternal charcode charext charwd charht chardp charic
|
||||
syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset
|
||||
syn keyword mfInternal boundarychar
|
||||
syn keyword mfInternal autorounding boundarychar charcode chardp chardx
|
||||
syn keyword mfInternal chardy charext charht charic charwd day designsize
|
||||
syn keyword mfInternal fillin fontmaking granularity hppp jobname month
|
||||
syn keyword mfInternal pausing proofing showstopping smoothing time
|
||||
syn keyword mfInternal tracingcapsules tracingchoices tracingcommands
|
||||
syn keyword mfInternal tracingedges tracingequations tracingmacros
|
||||
syn keyword mfInternal tracingonline tracingoutput tracingpens
|
||||
syn keyword mfInternal tracingrestores tracingspecs tracingstats
|
||||
syn keyword mfInternal tracingtitles turningcheck vppp warningcheck
|
||||
syn keyword mfInternal xoffset year yoffset
|
||||
|
||||
" Page 212: 'pair expressions'
|
||||
syn keyword mfPairExp point of precontrol postcontrol penoffset rotated
|
||||
syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled
|
||||
syn keyword mfPairExp zscaled
|
||||
syn keyword mfPairExp of penoffset point postcontrol precontrol rotated
|
||||
syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled
|
||||
syn keyword mfPairExp zscaled
|
||||
|
||||
" Page 213: 'path expressions'
|
||||
syn keyword mfPathExp makepath reverse subpath curl tension atleast
|
||||
syn keyword mfPathExp controls cycle
|
||||
syn keyword mfPathExp atleast controls curl cycle makepath reverse
|
||||
syn keyword mfPathExp subpath tension
|
||||
|
||||
" Page 214: 'pen expressions'
|
||||
syn keyword mfPenExp nullpen pencircle makepen
|
||||
syn keyword mfPenExp makepen nullpen pencircle
|
||||
|
||||
" Page 214: 'picutre expressions'
|
||||
syn keyword mfPicExp nullpicture
|
||||
" Page 214: 'picture expressions'
|
||||
syn keyword mfPicExp nullpicture
|
||||
|
||||
" Page 214: 'string expressions'
|
||||
syn keyword mfStringExp jobname readstring str char decimal substring
|
||||
syn keyword mfStringExp char decimal readstring str substring
|
||||
|
||||
" Page 217: 'commands and statements'
|
||||
syn keyword mfCommand end dump save interim newinternal randomseed let
|
||||
syn keyword mfCommand delimiters outer everyjob show showvariable showtoken
|
||||
syn keyword mfCommand showdependencies showstats message errmessage errhelp
|
||||
syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode
|
||||
syn keyword mfCommand addto also contour doublepath withpen withweight cull
|
||||
syn keyword mfCommand keeping dropping display inwindow openwindow at from to
|
||||
syn keyword mfCommand shipout special numspecial
|
||||
syn keyword mfCommand addto also at batchmode contour cull delimiters
|
||||
syn keyword mfCommand display doublepath dropping dump end errhelp
|
||||
syn keyword mfCommand errmessage errorstopmode everyjob from interim
|
||||
syn keyword mfCommand inwindow keeping let message newinternal
|
||||
syn keyword mfCommand nonstopmode numspecial openwindow outer randomseed
|
||||
syn keyword mfCommand save scrollmode shipout show showdependencies
|
||||
syn keyword mfCommand showstats showtoken showvariable special to withpen
|
||||
syn keyword mfCommand withweight
|
||||
|
||||
" Page 56: 'types'
|
||||
syn keyword mfType boolean numeric pair path pen picture string transform
|
||||
syn keyword mfType boolean numeric pair path pen picture string
|
||||
syn keyword mfType transform
|
||||
|
||||
" Page 155: 'grouping'
|
||||
syn keyword mfStatement begingroup endgroup
|
||||
syn keyword mfStatement begingroup endgroup
|
||||
|
||||
" Page 165: 'definitions'
|
||||
syn keyword mfDefinition enddef def expr suffix text primary secondary
|
||||
syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef
|
||||
syn keyword mfDefinition def enddef expr primary primarydef secondary
|
||||
syn keyword mfDefinition secondarydef suffix tertiary tertiarydef text
|
||||
syn keyword mfDefinition vardef
|
||||
|
||||
" Page 169: 'conditions and loops'
|
||||
syn keyword mfCondition if fi else elseif endfor for forsuffixes forever
|
||||
syn keyword mfCondition step until exitif
|
||||
syn keyword mfCondition else elseif endfor exitif fi for forever
|
||||
syn keyword mfCondition forsuffixes if step until
|
||||
|
||||
" Other primitives listed in the index
|
||||
syn keyword mfPrimitive charlist endinput expandafter extensible
|
||||
syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes
|
||||
syn keyword mfPrimitive kern ligtable quote scantokens skipto
|
||||
syn keyword mfPrimitive charlist endinput expandafter extensible fontdimen
|
||||
syn keyword mfPrimitive headerbyte inner input intersectiontimes kern
|
||||
syn keyword mfPrimitive ligtable quote scantokens skipto
|
||||
|
||||
" Implicit suffix parameters
|
||||
syn match mfSuffixParam "@#\|#@\|@"
|
||||
|
||||
" These are just tags, but given their special status, we
|
||||
" highlight them as variables
|
||||
syn keyword mfVariable x y
|
||||
|
||||
" Keywords defined by plain.mf (defined on pp.262-278)
|
||||
if !exists("plain_mf_macros")
|
||||
let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful
|
||||
" metapost.vim does so to turn off Metafont macros
|
||||
if get(g:, "plain_mf_macros", 1)
|
||||
syn keyword mfDef addto_currentpicture beginchar capsule_def
|
||||
syn keyword mfDef change_width clear_pen_memory clearit clearpen
|
||||
syn keyword mfDef clearxy culldraw cullit cutdraw
|
||||
syn keyword mfDef define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mfDef define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mfDef define_horizontal_corrected_pixels define_pixels
|
||||
syn keyword mfDef define_whole_blacker_pixels define_whole_pixels
|
||||
syn keyword mfDef define_whole_vertical_blacker_pixels
|
||||
syn keyword mfDef define_whole_vertical_pixels downto draw drawdot
|
||||
syn keyword mfDef endchar erase exitunless fill filldraw fix_units
|
||||
syn keyword mfDef flex font_coding_scheme font_extra_space
|
||||
syn keyword mfDef font_identifier font_normal_shrink
|
||||
syn keyword mfDef font_normal_space font_normal_stretch font_quad
|
||||
syn keyword mfDef font_size font_slant font_x_height gfcorners gobble
|
||||
syn keyword mfDef hide imagerules interact italcorr killtext
|
||||
syn keyword mfDef loggingall lowres_fix makebox makegrid maketicks
|
||||
syn keyword mfDef mode_def mode_setup nodisplays notransforms numtok
|
||||
syn keyword mfDef openit penrazor pensquare penstroke pickup
|
||||
syn keyword mfDef proofoffset proofrule range reflectedabout
|
||||
syn keyword mfDef rotatedaround screenchars screenrule screenstrokes
|
||||
syn keyword mfDef shipit showit smode stop superellipse takepower
|
||||
syn keyword mfDef tracingall tracingnone undraw undrawdot unfill
|
||||
syn keyword mfDef unfilldraw upto z
|
||||
syn match mfDef "???"
|
||||
syn keyword mfVardef bot byte ceiling counterclockwise cutoff decr dir
|
||||
syn keyword mfVardef direction directionpoint grayfont hround incr
|
||||
syn keyword mfVardef interpath inverse labelfont labels lft magstep
|
||||
" Note: nodot is not a vardef, it is used as in makelabel.lft.nodot("5",z5)
|
||||
" (METAFONT only)
|
||||
syn keyword mfVardef makelabel max min nodot penlabels penpos
|
||||
syn keyword mfVardef proofrulethickness round rt savepen slantfont solve
|
||||
syn keyword mfVardef tensepath titlefont top unitvector vround whatever
|
||||
syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>"
|
||||
syn keyword mfPrimaryDef div dotprod gobbled mod
|
||||
syn keyword mfSecondaryDef intersectionpoint
|
||||
syn keyword mfTertiaryDef softjoin thru
|
||||
syn keyword mfNewInternal blacker currentwindow displaying eps epsilon
|
||||
syn keyword mfNewInternal infinity join_radius number_of_modes o_correction
|
||||
syn keyword mfNewInternal pen_bot pen_lft pen_rt pen_top pixels_per_inch
|
||||
syn keyword mfNewInternal screen_cols screen_rows tolerance
|
||||
" Predefined constants
|
||||
syn keyword mfConstant base_name base_version blankpicture ditto down
|
||||
syn keyword mfConstant fullcircle halfcircle identity left lowres origin
|
||||
syn keyword mfConstant penspeck proof quartercircle right rulepen smoke
|
||||
syn keyword mfConstant unitpixel unitsquare up
|
||||
" Other predefined variables
|
||||
syn keyword mfVariable aspect_ratio currentpen extra_beginchar
|
||||
syn keyword mfVariable extra_endchar currentpen_path currentpicture
|
||||
syn keyword mfVariable currenttransform d extra_setup h localfont mag mode
|
||||
syn keyword mfVariable mode_name w
|
||||
" let statements:
|
||||
syn keyword mfnumExp abs
|
||||
syn keyword mfPairExp rotatedabout
|
||||
syn keyword mfCommand bye relax
|
||||
endif
|
||||
if plain_mf_macros
|
||||
syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name
|
||||
syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte
|
||||
syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit
|
||||
syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit
|
||||
syn keyword mfMacro currentpen currentpen_path currentpicture
|
||||
syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr
|
||||
syn keyword mfMacro define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mfMacro define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mfMacro define_horizontal_corrected_pixels define_pixels
|
||||
syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels
|
||||
syn keyword mfMacro define_whole_vertical_blacker_pixels
|
||||
syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint
|
||||
syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot
|
||||
syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar
|
||||
syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex
|
||||
syn keyword mfMacro font_coding_scheme font_extra_space font_identifier
|
||||
syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch
|
||||
syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height
|
||||
syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h
|
||||
syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity
|
||||
syn keyword mfMacro interact interpath intersectionpoint inverse italcorr
|
||||
syn keyword mfMacro join_radius killtext labelfont labels left lft localfont
|
||||
syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid
|
||||
syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name
|
||||
syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok
|
||||
syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top
|
||||
syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke
|
||||
syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule
|
||||
syn keyword mfMacro proofrulethickness quartercircle range reflectedabout
|
||||
syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen
|
||||
syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule
|
||||
syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin
|
||||
syn keyword mfMacro solve stop superellipse takepower tensepath titlefont
|
||||
syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot
|
||||
syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto
|
||||
syn keyword mfMacro vround w whatever
|
||||
|
||||
" By default, METAFONT loads modes.mf, too
|
||||
if get(g:, "plain_mf_modes", 1)
|
||||
syn keyword mfConstant APSSixMed AgfaFourZeroZero AgfaThreeFourZeroZero
|
||||
syn keyword mfConstant AtariNineFive AtariNineSix AtariSLMEightZeroFour
|
||||
syn keyword mfConstant AtariSMOneTwoFour CItohEightFiveOneZero
|
||||
syn keyword mfConstant CItohThreeOneZero CanonBJCSixZeroZero CanonCX
|
||||
syn keyword mfConstant CanonEX CanonLBPLX CanonLBPTen CanonSX ChelgraphIBX
|
||||
syn keyword mfConstant CompugraphicEightSixZeroZero
|
||||
syn keyword mfConstant CompugraphicNineSixZeroZero DD DEClarge DECsmall
|
||||
syn keyword mfConstant DataDiscNew EightThree EpsonAction
|
||||
syn keyword mfConstant EpsonLQFiveZeroZeroLo EpsonLQFiveZeroZeroMed
|
||||
syn keyword mfConstant EpsonMXFX EpsonSQEightSevenZero EpsonStylusPro
|
||||
syn keyword mfConstant EpsonStylusProHigh EpsonStylusProLow
|
||||
syn keyword mfConstant EpsonStylusProMed FourFour GThreefax HPDeskJet
|
||||
syn keyword mfConstant HPLaserJetIIISi IBMFourTwoFiveZero IBMFourTwoOneSix
|
||||
syn keyword mfConstant IBMFourTwoThreeZero IBMFourZeroOneNine
|
||||
syn keyword mfConstant IBMFourZeroThreeNine IBMFourZeroTwoNine
|
||||
syn keyword mfConstant IBMProPrinter IBMSixOneFiveFour IBMSixSixSevenZero
|
||||
syn keyword mfConstant IBMThreeEightOneTwo IBMThreeEightTwoZero
|
||||
syn keyword mfConstant IBMThreeOneNineThree IBMThreeOneSevenNine
|
||||
syn keyword mfConstant IBMUlfHolleberg LASevenFive LNOthreR LNOthree
|
||||
syn keyword mfConstant LNZeroOne LNZeroThree LPSFourZero LPSTwoZero
|
||||
syn keyword mfConstant LexmarkFourZeroThreeNine LexmarkOptraR
|
||||
syn keyword mfConstant LexmarkOptraS LinotypeLThreeThreeZero
|
||||
syn keyword mfConstant LinotypeOneZeroZero LinotypeOneZeroZeroLo
|
||||
syn keyword mfConstant LinotypeThreeZeroZeroHi MacTrueSize NeXTprinter
|
||||
syn keyword mfConstant NeXTscreen NecTwoZeroOne Newgen NineOne
|
||||
syn keyword mfConstant OCESixSevenFiveZeroPS OneTwoZero OneZeroZero
|
||||
syn keyword mfConstant PrintwareSevenTwoZeroIQ Prism QMSOneSevenTwoFive
|
||||
syn keyword mfConstant QMSOneSevenZeroZero QMSTwoFourTwoFive RicohA
|
||||
syn keyword mfConstant RicohFortyEighty RicohFourZeroEightZero RicohLP
|
||||
syn keyword mfConstant SparcPrinter StarNLOneZero VAXstation VTSix
|
||||
syn keyword mfConstant VarityperFiveZeroSixZeroW
|
||||
syn keyword mfConstant VarityperFourThreeZeroZeroHi
|
||||
syn keyword mfConstant VarityperFourThreeZeroZeroLo
|
||||
syn keyword mfConstant VarityperFourTwoZeroZero VarityperSixZeroZero
|
||||
syn keyword mfConstant XeroxDocutech XeroxEightSevenNineZero
|
||||
syn keyword mfConstant XeroxFourZeroFiveZero XeroxNineSevenZeroZero
|
||||
syn keyword mfConstant XeroxPhaserSixTwoZeroZeroDP XeroxThreeSevenZeroZero
|
||||
syn keyword mfConstant Xerox_world agfafzz agfatfzz amiga aps apssixhi
|
||||
syn keyword mfConstant aselect atariezf atarinf atarins atariotf bitgraph
|
||||
syn keyword mfConstant bjtenex bjtzzex bjtzzl bjtzzs boise canonbjc
|
||||
syn keyword mfConstant canonex canonlbp cg cgl cgnszz citohtoz corona crs
|
||||
syn keyword mfConstant cthreeten cx datadisc declarge decsmall deskjet
|
||||
syn keyword mfConstant docutech dover dp dpdfezzz eighthre elvira epscszz
|
||||
syn keyword mfConstant epsdraft epsdrft epsdrftl epsfast epsfastl epshi
|
||||
syn keyword mfConstant epslo epsmed epsmedl epson epsonact epsonfx epsonl
|
||||
syn keyword mfConstant epsonlo epsonlol epsonlq epsonsq epstylus epstylwr
|
||||
syn keyword mfConstant epstyplo epstypmd epstypml epstypro epswlo epswlol
|
||||
syn keyword mfConstant esphi fourfour gpx gtfax gtfaxhi gtfaxl gtfaxlo
|
||||
syn keyword mfConstant gtfaxlol help hifax highfax hplaser hprugged ibm_a
|
||||
syn keyword mfConstant ibmd ibmega ibmegal ibmfzon ibmfztn ibmpp ibmppl
|
||||
syn keyword mfConstant ibmsoff ibmteot ibmtetz ibmtont ibmtosn ibmtosnl
|
||||
syn keyword mfConstant ibmvga ibx imagen imagewriter itoh itohl itohtoz
|
||||
syn keyword mfConstant itohtozl iw jetiiisi kyocera laserjet laserjetfive
|
||||
syn keyword mfConstant laserjetfivemp laserjetfour laserjetfourthousand
|
||||
syn keyword mfConstant laserjetfourzerozerozero laserjethi laserjetlo
|
||||
syn keyword mfConstant laserjettwoonezerozero
|
||||
syn keyword mfConstant laserjettwoonezerozerofastres lasermaster
|
||||
syn keyword mfConstant laserwriter lasf lexmarkr lexmarks lexmarku
|
||||
syn keyword mfConstant linohalf linohi linolo linolttz linoone linosuper
|
||||
syn keyword mfConstant linothree linothreelo linotzzh ljfive ljfivemp
|
||||
syn keyword mfConstant ljfour ljfzzz ljfzzzfr ljlo ljtozz ljtozzfr lmaster
|
||||
syn keyword mfConstant lnotr lnzo lps lpstz lqhires lqlores lqmed lqmedl
|
||||
syn keyword mfConstant lqmedres lview lviewl lwpro macmag mactrue modes_mf
|
||||
syn keyword mfConstant ncd nec nechi neclm nectzo newdd newddl nexthi
|
||||
syn keyword mfConstant nextscreen nextscrn nineone nullmode ocessfz
|
||||
syn keyword mfConstant okidata okidatal okifourten okifte okihi onetz
|
||||
syn keyword mfConstant onezz pcprevw pcscreen phaser phaserfs phasertf
|
||||
syn keyword mfConstant phasertfl phasertl pixpt printware prntware
|
||||
syn keyword mfConstant proprinter qms qmsesz qmsostf qmsoszz qmstftf ricoh
|
||||
syn keyword mfConstant ricoha ricohlp ricohsp sherpa sparcptr starnlt
|
||||
syn keyword mfConstant starnltl styletwo stylewr stylewri stylewriter sun
|
||||
syn keyword mfConstant supre swtwo toshiba ultre varityper vs vtftzz
|
||||
syn keyword mfConstant vtftzzhi vtftzzlo vtfzszw vtszz xpstzz xpstzzl
|
||||
syn keyword mfConstant xrxesnz xrxfzfz xrxnszz xrxtszz
|
||||
syn keyword mfDef BCPL_string coding_scheme font_face_byte
|
||||
syn keyword mfDef font_family landscape
|
||||
syn keyword mfDef mode_extra_info mode_help mode_param
|
||||
syn keyword mfNewInternal blacker_min
|
||||
endif
|
||||
|
||||
" Some other basic macro names, e.g., from cmbase, logo, etc.
|
||||
if !exists("other_mf_macros")
|
||||
let other_mf_macros = 1 " Set this to '0' if your code gets too colourful
|
||||
" metapost.vim does so to turn off Metafont macros
|
||||
endif
|
||||
if other_mf_macros
|
||||
syn keyword mfMacro beginlogochar
|
||||
if get(g:, "other_mf_macros", 1)
|
||||
syn keyword mfDef beginlogochar
|
||||
syn keyword mfDef font_setup
|
||||
syn keyword mfPrimitive generate
|
||||
endif
|
||||
|
||||
" Numeric tokens
|
||||
syn match mfNumeric "[-]\=\d\+"
|
||||
syn match mfNumeric "[-]\=\.\d\+"
|
||||
syn match mfNumeric "[-]\=\d\+\.\d\+"
|
||||
syn match mfNumeric "[-]\=\d\+"
|
||||
syn match mfNumeric "[-]\=\.\d\+"
|
||||
syn match mfNumeric "[-]\=\d\+\.\d\+"
|
||||
|
||||
" Metafont lengths
|
||||
syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>"
|
||||
syn match mfLength "\<[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>"
|
||||
syn match mfLength "\<[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>"
|
||||
syn match mfLength "\<[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>"
|
||||
|
||||
" Metafont coordinates and points
|
||||
syn match mfCoord "\<[xy]\d\+\>"
|
||||
syn match mfPoint "\<z\d\+\>"
|
||||
" METAFONT lengths
|
||||
syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>"
|
||||
syn match mfLength "[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
|
||||
syn match mfLength "[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
|
||||
syn match mfLength "[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\="
|
||||
|
||||
" String constants
|
||||
syn region mfString start=+"+ end=+"+
|
||||
syn match mfOpenString /"[^"]*/
|
||||
syn region mfString oneline keepend start=+"+ end=+"+
|
||||
|
||||
" Comments:
|
||||
syn match mfComment "%.*$"
|
||||
syn keyword mfTodoComment contained TODO FIXME XXX DEBUG NOTE
|
||||
syn match mfComment "%.*$" contains=mfTodoComment,@Spell
|
||||
|
||||
" synchronizing
|
||||
syn sync maxlines=50
|
||||
|
||||
" Define the default highlighting
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link mfBoolExp Statement
|
||||
hi def link mfNumExp Statement
|
||||
hi def link mfInternal Identifier
|
||||
hi def link mfPairExp Statement
|
||||
hi def link mfPathExp Statement
|
||||
hi def link mfPenExp Statement
|
||||
hi def link mfPicExp Statement
|
||||
hi def link mfStringExp Statement
|
||||
hi def link mfCommand Statement
|
||||
hi def link mfType Type
|
||||
hi def link mfStatement Statement
|
||||
hi def link mfDefinition Statement
|
||||
hi def link mfCondition Conditional
|
||||
hi def link mfPrimitive Statement
|
||||
hi def link mfMacro Macro
|
||||
hi def link mfCoord Identifier
|
||||
hi def link mfPoint Identifier
|
||||
hi def link mfNumeric Number
|
||||
hi def link mfLength Number
|
||||
hi def link mfComment Comment
|
||||
hi def link mfString String
|
||||
|
||||
hi def link mfBoolExp Statement
|
||||
hi def link mfNumExp Statement
|
||||
hi def link mfPairExp Statement
|
||||
hi def link mfPathExp Statement
|
||||
hi def link mfPenExp Statement
|
||||
hi def link mfPicExp Statement
|
||||
hi def link mfStringExp Statement
|
||||
hi def link mfInternal Identifier
|
||||
hi def link mfCommand Statement
|
||||
hi def link mfType Type
|
||||
hi def link mfStatement Statement
|
||||
hi def link mfDefinition Statement
|
||||
hi def link mfCondition Conditional
|
||||
hi def link mfPrimitive Statement
|
||||
hi def link mfDef Function
|
||||
hi def link mfVardef mfDef
|
||||
hi def link mfPrimaryDef mfDef
|
||||
hi def link mfSecondaryDef mfDef
|
||||
hi def link mfTertiaryDef mfDef
|
||||
hi def link mfCoord Identifier
|
||||
hi def link mfPoint Identifier
|
||||
hi def link mfNumeric Number
|
||||
hi def link mfLength Number
|
||||
hi def link mfComment Comment
|
||||
hi def link mfString String
|
||||
hi def link mfOpenString Todo
|
||||
hi def link mfSuffixParam Label
|
||||
hi def link mfNewInternal mfInternal
|
||||
hi def link mfVariable Identifier
|
||||
hi def link mfConstant Constant
|
||||
hi def link mfTodoComment Todo
|
||||
|
||||
let b:current_syntax = "mf"
|
||||
|
||||
" vim: ts=8
|
||||
" vim:sw=2
|
||||
|
||||
+740
-90
@@ -1,115 +1,765 @@
|
||||
" Vim syntax file
|
||||
" Language: MetaPost
|
||||
" Maintainer: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: April 30, 2001
|
||||
" Language: MetaPost
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com>
|
||||
" Last Change: 2016 Oct 01
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost
|
||||
let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Read the Metafont syntax to start with
|
||||
if exists("g:plain_mf_macros")
|
||||
let s:plain_mf_macros = g:plain_mf_macros
|
||||
endif
|
||||
if exists("g:plain_mf_modes")
|
||||
let s:plain_mf_modes = g:plain_mf_modes
|
||||
endif
|
||||
if exists("g:other_mf_macros")
|
||||
let s:other_mf_macros = g:other_mf_macros
|
||||
endif
|
||||
|
||||
let g:plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost
|
||||
let g:plain_mf_modes = 0 " No METAFONT modes
|
||||
let g:other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither
|
||||
|
||||
" Read the METAFONT syntax to start with
|
||||
runtime! syntax/mf.vim
|
||||
unlet b:current_syntax " Necessary for syn include below
|
||||
|
||||
" MetaPost has TeX inserts for typeset labels
|
||||
" verbatimtex, btex, and etex will be treated as keywords
|
||||
syn match mpTeXbegin "\(verbatimtex\|btex\)"
|
||||
syn match mpTeXend "etex"
|
||||
syn region mpTeXinsert start="\(verbatimtex\|btex\)"hs=e+1 end="etex"he=s-1 contains=mpTeXbegin,mpTeXend keepend
|
||||
" Restore the value of existing global variables
|
||||
if exists("s:plain_mf_macros")
|
||||
let g:plain_mf_macros = s:plain_mf_macros
|
||||
else
|
||||
unlet g:plain_mf_macros
|
||||
endif
|
||||
if exists("s:plain_mf_modes")
|
||||
let g:plain_mf_modes = s:plain_mf_modes
|
||||
else
|
||||
unlet g:plain_mf_modes
|
||||
endif
|
||||
if exists("s:other_mf_macros")
|
||||
let g:other_mf_macros = s:other_mf_macros
|
||||
else
|
||||
unlet g:other_mf_macros
|
||||
endif
|
||||
|
||||
" MetaPost primitives not found in Metafont
|
||||
syn keyword mpInternal bluepart clip color dashed fontsize greenpart infont
|
||||
syn keyword mpInternal linecap linejoin llcorner lrcorner miterlimit mpxbreak
|
||||
syn keyword mpInternal prologues redpart setbounds tracinglostchars
|
||||
syn keyword mpInternal truecorners ulcorner urcorner withcolor
|
||||
" Use TeX highlighting inside verbatimtex/btex... etex
|
||||
syn include @MPTeX syntax/tex.vim
|
||||
unlet b:current_syntax
|
||||
" These are defined as keywords rather than using matchgroup
|
||||
" in order to make them available to syntaxcomplete.
|
||||
syn keyword mpTeXdelim btex etex verbatimtex contained
|
||||
syn region mpTeXinsert
|
||||
\ start=/\<verbatimtex\>\|\<btex\>/rs=e+1
|
||||
\ end=/\<etex\>/re=s-1 keepend
|
||||
\ contains=@MPTeX,mpTeXdelim
|
||||
|
||||
" Metafont primitives not found in MetaPost
|
||||
syn keyword notDefined autorounding chardx chardy fillin granularity hppp
|
||||
syn keyword notDefined proofing smoothing tracingedges tracingpens
|
||||
syn keyword notDefined turningcheck vppp xoffset yoffset
|
||||
" iskeyword must be set after the syn include above, because tex.vim sets `syn
|
||||
" iskeyword`. Note that keywords do not contain numbers (numbers are
|
||||
" subscripts)
|
||||
syntax iskeyword @,_
|
||||
|
||||
" MetaPost primitives not found in METAFONT
|
||||
syn keyword mpBoolExp bounded clipped filled stroked textual arclength
|
||||
syn keyword mpNumExp arctime blackpart bluepart colormodel cyanpart
|
||||
syn keyword mpNumExp fontsize greenpart greypart magentapart redpart
|
||||
syn keyword mpPairExp yellowpart llcorner lrcorner ulcorner urcorner
|
||||
" envelope is seemingly undocumented, but it exists since mpost 1.003.
|
||||
" The syntax is: envelope <polygonal pen> of <path primary>. For example,
|
||||
" path p;
|
||||
" p := envelope pensquare of (up--left);
|
||||
" (Thanks to Daniel H. Luecking for the example!)
|
||||
syn keyword mpPathExp envelope pathpart
|
||||
syn keyword mpPenExp penpart
|
||||
syn keyword mpPicExp dashpart glyph infont
|
||||
syn keyword mpStringExp fontpart readfrom textpart
|
||||
syn keyword mpType cmykcolor color rgbcolor
|
||||
" Other MetaPost primitives listed in the manual
|
||||
syn keyword mpPrimitive mpxbreak within
|
||||
" Internal quantities not found in METAFONT
|
||||
" (Table 6 in MetaPost: A User's Manual)
|
||||
syn keyword mpInternal defaultcolormodel hour minute linecap linejoin
|
||||
syn keyword mpInternal miterlimit mpprocset mpversion numberprecision
|
||||
syn keyword mpInternal numbersystem outputfilename outputformat
|
||||
syn keyword mpInternal outputformatoptions outputtemplate prologues
|
||||
syn keyword mpInternal restoreclipcolor tracinglostchars troffmode
|
||||
syn keyword mpInternal truecorners
|
||||
" List of commands not found in METAFONT (from MetaPost: A User's Manual)
|
||||
syn keyword mpCommand clip closefrom dashed filenametemplate fontmapfile
|
||||
syn keyword mpCommand fontmapline setbounds withcmykcolor withcolor
|
||||
syn keyword mpCommand withgreyscale withoutcolor withpostscript
|
||||
syn keyword mpCommand withprescript withrgbcolor write
|
||||
" METAFONT internal variables not found in MetaPost
|
||||
syn keyword notDefined autorounding chardx chardy fillin granularity
|
||||
syn keyword notDefined proofing smoothing tracingedges tracingpens
|
||||
syn keyword notDefined turningcheck xoffset yoffset
|
||||
" Suffix defined only in METAFONT:
|
||||
syn keyword notDefined nodot
|
||||
" Other not implemented primitives (see MetaPost: A User's Manual, §C.1)
|
||||
syn keyword notDefined cull display openwindow numspecial totalweight
|
||||
syn keyword notDefined withweight
|
||||
|
||||
" Keywords defined by plain.mp
|
||||
if !exists("plain_mp_macros")
|
||||
let plain_mp_macros = 1 " Set this to '0' if your source gets too colourful
|
||||
endif
|
||||
if plain_mp_macros
|
||||
syn keyword mpMacro ahangle ahlength background bbox bboxmargin beginfig
|
||||
syn keyword mpMacro beveled black blue buildcycle butt center cutafter
|
||||
syn keyword mpMacro cutbefore cuttings dashpattern defaultfont defaultpen
|
||||
syn keyword mpMacro defaultscale dotlabel dotlabels drawarrow drawdblarrow
|
||||
syn keyword mpMacro drawoptions endfig evenly extra_beginfig extra_endfig
|
||||
syn keyword mpMacro green label labeloffset mitered red rounded squared
|
||||
syn keyword mpMacro thelabel white base_name base_version
|
||||
syn keyword mpMacro upto downto exitunless relax gobble gobbled
|
||||
syn keyword mpMacro interact loggingall tracingall tracingnone
|
||||
syn keyword mpMacro eps epsilon infinity right left up down origin
|
||||
syn keyword mpMacro quartercircle halfcircle fullcircle unitsquare identity
|
||||
syn keyword mpMacro blankpicture withdots ditto EOF pensquare penrazor
|
||||
syn keyword mpMacro penspeck whatever abs round ceiling byte dir unitvector
|
||||
syn keyword mpMacro inverse counterclockwise tensepath mod div dotprod
|
||||
syn keyword mpMacro takepower direction directionpoint intersectionpoint
|
||||
syn keyword mpMacro softjoin incr decr reflectedabout rotatedaround
|
||||
syn keyword mpMacro rotatedabout min max flex superellipse interpath
|
||||
syn keyword mpMacro magstep currentpen currentpen_path currentpicture
|
||||
syn keyword mpMacro fill draw filldraw drawdot unfill undraw unfilldraw
|
||||
syn keyword mpMacro undrawdot erase cutdraw image pickup numeric_pickup
|
||||
syn keyword mpMacro pen_lft pen_rt pen_top pen_bot savepen clearpen
|
||||
syn keyword mpMacro clear_pen_memory lft rt top bot ulft urt llft lrt
|
||||
syn keyword mpMacro penpos penstroke arrowhead makelabel labels penlabel
|
||||
syn keyword mpMacro range numtok thru clearxy clearit clearpen pickup
|
||||
syn keyword mpMacro shipit bye hide stop solve
|
||||
if get(g:, "plain_mp_macros", 1) || get(g:, "mp_metafun_macros", 0)
|
||||
syn keyword mpDef beginfig clear_pen_memory clearit clearpen clearpen
|
||||
syn keyword mpDef clearxy colorpart cutdraw downto draw drawarrow
|
||||
syn keyword mpDef drawdblarrow drawdot drawoptions endfig erase
|
||||
syn keyword mpDef exitunless fill filldraw flex gobble hide interact
|
||||
syn keyword mpDef label loggingall makelabel numtok penstroke pickup
|
||||
syn keyword mpDef range reflectedabout rotatedaround shipit
|
||||
syn keyword mpDef stop superellipse takepower tracingall tracingnone
|
||||
syn keyword mpDef undraw undrawdot unfill unfilldraw upto
|
||||
syn match mpDef "???"
|
||||
syn keyword mpVardef arrowhead bbox bot buildcycle byte ceiling center
|
||||
syn keyword mpVardef counterclockwise decr dir direction directionpoint
|
||||
syn keyword mpVardef dotlabel dotlabels image incr interpath inverse
|
||||
syn keyword mpVardef labels lft magstep max min penlabels penpos round
|
||||
syn keyword mpVardef rt savepen solve tensepath thelabel top unitvector
|
||||
syn keyword mpVardef whatever z
|
||||
syn keyword mpPrimaryDef div dotprod gobbled mod
|
||||
syn keyword mpSecondaryDef intersectionpoint
|
||||
syn keyword mpTertiaryDef cutafter cutbefore softjoin thru
|
||||
syn keyword mpNewInternal ahangle ahlength bboxmargin beveled butt defaultpen
|
||||
syn keyword mpNewInternal defaultscale dotlabeldiam eps epsilon infinity
|
||||
syn keyword mpNewInternal join_radius labeloffset mitered pen_bot pen_lft
|
||||
syn keyword mpNewInternal pen_rt pen_top rounded squared tolerance
|
||||
" Predefined constants
|
||||
syn keyword mpConstant EOF background base_name base_version black
|
||||
syn keyword mpConstant blankpicture blue ditto down evenly fullcircle
|
||||
syn keyword mpConstant green halfcircle identity left origin penrazor
|
||||
syn keyword mpConstant penspeck pensquare quartercircle red right
|
||||
syn keyword mpConstant unitsquare up white withdots
|
||||
" Other predefined variables
|
||||
syn keyword mpVariable currentpen currentpen_path currentpicture cuttings
|
||||
syn keyword mpVariable defaultfont extra_beginfig extra_endfig
|
||||
syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\>/
|
||||
syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\.\%(lft\|rt\|bot\|top\|ulft\|urt\|llft\|lrt\)\>/
|
||||
" let statements:
|
||||
syn keyword mpnumExp abs
|
||||
syn keyword mpDef rotatedabout
|
||||
syn keyword mpCommand bye relax
|
||||
" on and off are not technically keywords, but it is nice to highlight them
|
||||
" inside dashpattern().
|
||||
syn keyword mpOnOff off on contained
|
||||
syn keyword mpDash dashpattern contained
|
||||
syn region mpDashPattern
|
||||
\ start="dashpattern\s*"
|
||||
\ end=")"he=e-1
|
||||
\ contains=mfNumeric,mfLength,mpOnOff,mpDash
|
||||
endif
|
||||
|
||||
" Keywords defined by mfplain.mp
|
||||
if !exists("mfplain_mp_macros")
|
||||
let mfplain_mp_macros = 0 " Set this to '1' to include these macro names
|
||||
endif
|
||||
if mfplain_mp_macros
|
||||
syn keyword mpMacro beginchar blacker capsule_def change_width
|
||||
syn keyword mpMacro define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mpMacro define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mpMacro define_horizontal_corrected_pixels
|
||||
syn keyword mpMacro define_pixels define_whole_blacker_pixels
|
||||
syn keyword mpMacro define_whole_vertical_blacker_pixels
|
||||
syn keyword mpMacro define_whole_vertical_pixels endchar
|
||||
syn keyword mpMacro extra_beginchar extra_endchar extra_setup
|
||||
syn keyword mpMacro font_coding_scheme font_extra_space font_identifier
|
||||
syn keyword mpMacro font_normal_shrink font_normal_space
|
||||
syn keyword mpMacro font_normal_stretch font_quad font_size
|
||||
syn keyword mpMacro font_slant font_x_height italcorr labelfont
|
||||
syn keyword mpMacro makebox makegrid maketicks mode_def mode_setup
|
||||
syn keyword mpMacro o_correction proofrule proofrulethickness rulepen smode
|
||||
|
||||
if get(g:, "mfplain_mp_macros", 0)
|
||||
syn keyword mpDef beginchar capsule_def change_width
|
||||
syn keyword mpDef define_blacker_pixels define_corrected_pixels
|
||||
syn keyword mpDef define_good_x_pixels define_good_y_pixels
|
||||
syn keyword mpDef define_horizontal_corrected_pixels define_pixels
|
||||
syn keyword mpDef define_whole_blacker_pixels define_whole_pixels
|
||||
syn keyword mpDef define_whole_vertical_blacker_pixels
|
||||
syn keyword mpDef define_whole_vertical_pixels endchar
|
||||
syn keyword mpDef font_coding_scheme font_extra_space font_identifier
|
||||
syn keyword mpDef font_normal_shrink font_normal_space
|
||||
syn keyword mpDef font_normal_stretch font_quad font_size font_slant
|
||||
syn keyword mpDef font_x_height italcorr labelfont lowres_fix makebox
|
||||
syn keyword mpDef makegrid maketicks mode_def mode_setup proofrule
|
||||
syn keyword mpDef smode
|
||||
syn keyword mpVardef hround proofrulethickness vround
|
||||
syn keyword mpNewInternal blacker o_correction
|
||||
syn keyword mpVariable extra_beginchar extra_endchar extra_setup rulepen
|
||||
" plus some no-ops, also from mfplain.mp
|
||||
syn keyword mpMacro cullit currenttransform gfcorners grayfont hround
|
||||
syn keyword mpMacro imagerules lowres_fix nodisplays notransforms openit
|
||||
syn keyword mpMacro proofoffset screenchars screenrule screenstrokes
|
||||
syn keyword mpMacro showit slantfont titlefont unitpixel vround
|
||||
syn keyword mpDef cull cullit gfcorners imagerules nodisplays
|
||||
syn keyword mpDef notransforms openit proofoffset screenchars
|
||||
syn keyword mpDef screenrule screenstrokes showit
|
||||
syn keyword mpVardef grayfont slantfont titlefont
|
||||
syn keyword mpVariable currenttransform
|
||||
syn keyword mpConstant unitpixel
|
||||
" These are not listed in the MetaPost manual, and some are ignored by
|
||||
" MetaPost, but are nonetheless defined in mfplain.mp
|
||||
syn keyword mpDef killtext
|
||||
syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>"
|
||||
syn keyword mpVariable aspect_ratio localfont mag mode mode_name
|
||||
syn keyword mpVariable proofcolor
|
||||
syn keyword mpConstant lowres proof smoke
|
||||
syn keyword mpNewInternal autorounding bp_per_pixel granularity
|
||||
syn keyword mpNewInternal number_of_modes proofing smoothing turningcheck
|
||||
endif
|
||||
|
||||
" Keywords defined by other macro packages, e.g., boxes.mp
|
||||
if !exists("other_mp_macros")
|
||||
let other_mp_macros = 1 " Set this to '0' if your source gets too colourful
|
||||
endif
|
||||
if other_mp_macros
|
||||
syn keyword mpMacro circmargin defaultdx defaultdy
|
||||
syn keyword mpMacro boxit boxjoin bpath circleit drawboxed drawboxes
|
||||
syn keyword mpMacro drawunboxed fixpos fixsize pic
|
||||
" Keywords defined by all base macro packages:
|
||||
" - (r)boxes.mp
|
||||
" - format.mp
|
||||
" - graph.mp
|
||||
" - marith.mp
|
||||
" - sarith.mp
|
||||
" - string.mp
|
||||
" - TEX.mp
|
||||
if get(g:, "other_mp_macros", 1)
|
||||
" boxes and rboxes
|
||||
syn keyword mpDef boxjoin drawboxed drawboxes drawunboxed
|
||||
syn keyword mpNewInternal circmargin defaultdx defaultdy rbox_radius
|
||||
syn keyword mpVardef boxit bpath circleit fixpos fixsize generic_declare
|
||||
syn keyword mpVardef generic_redeclare generisize pic rboxit str_prefix
|
||||
" format
|
||||
syn keyword mpVardef Mformat format init_numbers roundd
|
||||
syn keyword mpVariable Fe_base Fe_plus
|
||||
syn keyword mpConstant Ten_to
|
||||
" graph
|
||||
syn keyword mpDef Gfor Gxyscale OUT auto begingraph endgraph gdata
|
||||
syn keyword mpDef gdraw gdrawarrow gdrawdblarrow gfill plot
|
||||
syn keyword mpVardef augment autogrid frame gdotlabel glabel grid itick
|
||||
syn keyword mpVardef otick
|
||||
syn keyword mpVardef Mreadpath setcoords setrange
|
||||
syn keyword mpNewInternal Gmarks Gminlog Gpaths linear log
|
||||
syn keyword mpVariable Autoform Gemarks Glmarks Gumarks
|
||||
syn keyword mpConstant Gtemplate
|
||||
syn match mpVariable /Gmargin\.\%(low\|high\)/
|
||||
" marith
|
||||
syn keyword mpVardef Mabs Meform Mexp Mexp_str Mlog Mlog_Str Mlog_str
|
||||
syn keyword mpPrimaryDef Mdiv Mmul
|
||||
syn keyword mpSecondaryDef Madd Msub
|
||||
syn keyword mpTertiaryDef Mleq
|
||||
syn keyword mpNewInternal Mten Mzero
|
||||
" sarith
|
||||
syn keyword mpVardef Sabs Scvnum
|
||||
syn keyword mpPrimaryDef Sdiv Smul
|
||||
syn keyword mpSecondaryDef Sadd Ssub
|
||||
syn keyword mpTertiaryDef Sleq Sneq
|
||||
" string
|
||||
syn keyword mpVardef cspan isdigit loptok
|
||||
" TEX
|
||||
syn keyword mpVardef TEX TEXPOST TEXPRE
|
||||
endif
|
||||
|
||||
" Up to date as of 23-Sep-2016.
|
||||
if get(g:, "mp_metafun_macros", 0)
|
||||
" These keywords have been added manually.
|
||||
syn keyword mpPrimitive runscript
|
||||
|
||||
" The following MetaFun keywords have been extracted automatically from
|
||||
" ConTeXt source code. They include all "public" macros (where a macro is
|
||||
" considered public if and only if it does not start with _, mfun_, mlib_, or
|
||||
" do_, and it does not end with _), all "public" unsaved variables, and all
|
||||
" `let` statements.
|
||||
|
||||
" mp-abck.mpiv
|
||||
syn keyword mpDef abck_grid_line anchor_box box_found boxfilloptions
|
||||
syn keyword mpDef boxgridoptions boxlineoptions draw_multi_pars
|
||||
syn keyword mpDef draw_multi_side draw_multi_side_path freeze_box
|
||||
syn keyword mpDef initialize_box initialize_box_pos
|
||||
syn keyword mpDef multi_side_draw_options show_multi_kind
|
||||
syn keyword mpDef show_multi_pars
|
||||
syn keyword mpVardef abck_baseline_grid abck_draw_path abck_graphic_grid
|
||||
syn keyword mpVariable boxdashtype boxfilloffset boxfilltype
|
||||
syn keyword mpVariable boxgriddirection boxgriddistance boxgridshift
|
||||
syn keyword mpVariable boxgridtype boxgridwidth boxlineoffset
|
||||
syn keyword mpVariable boxlineradius boxlinetype boxlinewidth multikind
|
||||
syn keyword mpConstant context_abck
|
||||
" mp-apos.mpiv
|
||||
syn keyword mpDef anch_sidebars_draw boxfilloptions boxlineoptions
|
||||
syn keyword mpDef connect_positions
|
||||
syn keyword mpConstant context_apos
|
||||
" mp-asnc.mpiv
|
||||
syn keyword mpDef FlushSyncTasks ProcessSyncTask ResetSyncTasks
|
||||
syn keyword mpDef SetSyncColor SetSyncThreshold SyncTask
|
||||
syn keyword mpVardef PrepareSyncTasks SyncBox TheSyncColor
|
||||
syn keyword mpVardef TheSyncThreshold
|
||||
syn keyword mpVariable CurrentSyncClass NOfSyncPaths SyncColor
|
||||
syn keyword mpVariable SyncLeftOffset SyncPaths SyncTasks SyncThreshold
|
||||
syn keyword mpVariable SyncThresholdMethod SyncWidth
|
||||
syn keyword mpConstant context_asnc
|
||||
" mp-back.mpiv
|
||||
syn keyword mpDef some_double_back some_hash
|
||||
syn keyword mpVariable back_nillcolor
|
||||
syn keyword mpConstant context_back
|
||||
" mp-bare.mpiv
|
||||
syn keyword mpVardef colordecimals rawtextext
|
||||
syn keyword mpPrimaryDef infont
|
||||
syn keyword mpConstant context_bare
|
||||
" mp-base.mpiv
|
||||
" This is essentially plain.mp with only a few keywords added
|
||||
syn keyword mpNumExp graypart
|
||||
syn keyword mpType graycolor greycolor
|
||||
syn keyword mpConstant cyan magenta yellow
|
||||
" mp-butt.mpiv
|
||||
syn keyword mpDef predefinedbutton some_button
|
||||
syn keyword mpConstant context_butt
|
||||
" mp-char.mpiv
|
||||
syn keyword mpDef flow_begin_chart flow_begin_sub_chart
|
||||
syn keyword mpDef flow_chart_draw_comment flow_chart_draw_exit
|
||||
syn keyword mpDef flow_chart_draw_label flow_chart_draw_text
|
||||
syn keyword mpDef flow_clip_chart flow_collapse_points
|
||||
syn keyword mpDef flow_connect_bottom_bottom flow_connect_bottom_left
|
||||
syn keyword mpDef flow_connect_bottom_right flow_connect_bottom_top
|
||||
syn keyword mpDef flow_connect_left_bottom flow_connect_left_left
|
||||
syn keyword mpDef flow_connect_left_right flow_connect_left_top
|
||||
syn keyword mpDef flow_connect_right_bottom flow_connect_right_left
|
||||
syn keyword mpDef flow_connect_right_right flow_connect_right_top
|
||||
syn keyword mpDef flow_connect_top_bottom flow_connect_top_left
|
||||
syn keyword mpDef flow_connect_top_right flow_connect_top_top
|
||||
syn keyword mpDef flow_draw_connection flow_draw_connection_point
|
||||
syn keyword mpDef flow_draw_midpoint flow_draw_shape
|
||||
syn keyword mpDef flow_draw_test_area flow_draw_test_shape
|
||||
syn keyword mpDef flow_draw_test_shapes flow_end_chart
|
||||
syn keyword mpDef flow_end_sub_chart flow_flush_connections
|
||||
syn keyword mpDef flow_flush_picture flow_flush_pictures
|
||||
syn keyword mpDef flow_flush_shape flow_flush_shapes
|
||||
syn keyword mpDef flow_initialize_grid flow_new_chart flow_new_shape
|
||||
syn keyword mpDef flow_scaled_to_grid flow_show_connection
|
||||
syn keyword mpDef flow_show_connections flow_show_shapes
|
||||
syn keyword mpDef flow_xy_offset flow_y_pos
|
||||
syn keyword mpVardef flow_connection_path flow_down_on_grid
|
||||
syn keyword mpVardef flow_down_to_grid flow_i_point flow_left_on_grid
|
||||
syn keyword mpVardef flow_left_to_grid flow_offset
|
||||
syn keyword mpVardef flow_points_initialized flow_right_on_grid
|
||||
syn keyword mpVardef flow_right_to_grid flow_smooth_connection
|
||||
syn keyword mpVardef flow_trim_points flow_trimmed flow_up_on_grid
|
||||
syn keyword mpVardef flow_up_to_grid flow_valid_connection
|
||||
syn keyword mpVardef flow_x_on_grid flow_xy_bottom flow_xy_left
|
||||
syn keyword mpVardef flow_xy_on_grid flow_xy_right flow_xy_top
|
||||
syn keyword mpVardef flow_y_on_grid
|
||||
syn keyword mpVariable flow_arrowtip flow_chart_background_color
|
||||
syn keyword mpVariable flow_chart_offset flow_comment_offset
|
||||
syn keyword mpVariable flow_connection_arrow_size
|
||||
syn keyword mpVariable flow_connection_dash_size
|
||||
syn keyword mpVariable flow_connection_line_color
|
||||
syn keyword mpVariable flow_connection_line_width
|
||||
syn keyword mpVariable flow_connection_smooth_size flow_connections
|
||||
syn keyword mpVariable flow_cpath flow_dash_pattern flow_dashline
|
||||
syn keyword mpVariable flow_exit_offset flow_forcevalid flow_grid_height
|
||||
syn keyword mpVariable flow_grid_width flow_label_offset flow_max_x
|
||||
syn keyword mpVariable flow_max_y flow_peepshape flow_reverse_connection
|
||||
syn keyword mpVariable flow_reverse_y flow_shape_action flow_shape_archive
|
||||
syn keyword mpVariable flow_shape_decision flow_shape_down
|
||||
syn keyword mpVariable flow_shape_fill_color flow_shape_height
|
||||
syn keyword mpVariable flow_shape_left flow_shape_line_color
|
||||
syn keyword mpVariable flow_shape_line_width flow_shape_loop
|
||||
syn keyword mpVariable flow_shape_multidocument flow_shape_node
|
||||
syn keyword mpVariable flow_shape_procedure flow_shape_product
|
||||
syn keyword mpVariable flow_shape_right flow_shape_singledocument
|
||||
syn keyword mpVariable flow_shape_subprocedure flow_shape_up
|
||||
syn keyword mpVariable flow_shape_wait flow_shape_width
|
||||
syn keyword mpVariable flow_show_all_points flow_show_con_points
|
||||
syn keyword mpVariable flow_show_mid_points flow_showcrossing flow_smooth
|
||||
syn keyword mpVariable flow_touchshape flow_xypoint flow_zfactor
|
||||
syn keyword mpConstant context_flow
|
||||
" mp-chem.mpiv
|
||||
syn keyword mpDef chem_init_all chem_reset chem_start_structure
|
||||
syn keyword mpDef chem_transformed
|
||||
syn keyword mpVardef chem_ad chem_adj chem_align chem_arrow chem_au
|
||||
syn keyword mpVardef chem_b chem_bb chem_bd chem_bw chem_c chem_cc
|
||||
syn keyword mpVardef chem_ccd chem_cd chem_crz chem_cz chem_dash chem_db
|
||||
syn keyword mpVardef chem_diff chem_dir chem_do chem_dr chem_draw
|
||||
syn keyword mpVardef chem_drawarrow chem_eb chem_ed chem_ep chem_er
|
||||
syn keyword mpVardef chem_es chem_et chem_fill chem_hb chem_init_some
|
||||
syn keyword mpVardef chem_label chem_ldb chem_ldd chem_line chem_lr
|
||||
syn keyword mpVardef chem_lrb chem_lrbd chem_lrd chem_lrh chem_lrn
|
||||
syn keyword mpVardef chem_lrt chem_lrz chem_lsr chem_lsub chem_mark
|
||||
syn keyword mpVardef chem_marked chem_mid chem_mids chem_midz chem_mir
|
||||
syn keyword mpVardef chem_mov chem_move chem_number chem_oe chem_off
|
||||
syn keyword mpVardef chem_pb chem_pe chem_r chem_r_fragment chem_rb
|
||||
syn keyword mpVardef chem_rbd chem_rd chem_rdb chem_rdd chem_restore
|
||||
syn keyword mpVardef chem_rh chem_rm chem_rn chem_rot chem_rr chem_rrb
|
||||
syn keyword mpVardef chem_rrbd chem_rrd chem_rrh chem_rrn chem_rrt
|
||||
syn keyword mpVardef chem_rrz chem_rsr chem_rsub chem_rt chem_rz chem_s
|
||||
syn keyword mpVardef chem_save chem_sb chem_sd chem_set chem_sr chem_ss
|
||||
syn keyword mpVardef chem_start_component chem_stop_component
|
||||
syn keyword mpVardef chem_stop_structure chem_sub chem_symbol chem_tb
|
||||
syn keyword mpVardef chem_text chem_z chem_zln chem_zlt chem_zn chem_zrn
|
||||
syn keyword mpVardef chem_zrt chem_zt
|
||||
syn keyword mpVariable chem_mark_pair chem_stack_mirror chem_stack_origin
|
||||
syn keyword mpVariable chem_stack_p chem_stack_previous
|
||||
syn keyword mpVariable chem_stack_rotation chem_trace_boundingbox
|
||||
syn keyword mpVariable chem_trace_nesting chem_trace_text
|
||||
syn keyword mpConstant context_chem
|
||||
" mp-core.mpiv
|
||||
syn keyword mpDef FlushSyncTasks ProcessSyncTask
|
||||
syn keyword mpDef RegisterLocalTextArea RegisterPlainTextArea
|
||||
syn keyword mpDef RegisterRegionTextArea RegisterTextArea
|
||||
syn keyword mpDef ResetLocalTextArea ResetSyncTasks ResetTextAreas
|
||||
syn keyword mpDef SaveTextAreas SetSyncColor SetSyncThreshold
|
||||
syn keyword mpDef SyncTask anchor_box box_found boxfilloptions
|
||||
syn keyword mpDef boxgridoptions boxlineoptions collapse_multi_pars
|
||||
syn keyword mpDef draw_box draw_multi_pars draw_par freeze_box
|
||||
syn keyword mpDef initialize_area initialize_area_par initialize_box
|
||||
syn keyword mpDef initialize_box_pos initialize_par
|
||||
syn keyword mpDef prepare_multi_pars relocate_multipars save_multipar
|
||||
syn keyword mpDef set_par_line_height show_multi_pars show_par
|
||||
syn keyword mpDef simplify_multi_pars sort_multi_pars
|
||||
syn keyword mpVardef InsideSavedTextArea InsideSomeSavedTextArea
|
||||
syn keyword mpVardef InsideSomeTextArea InsideTextArea PrepareSyncTasks
|
||||
syn keyword mpVardef SyncBox TextAreaH TextAreaW TextAreaWH TextAreaX
|
||||
syn keyword mpVardef TextAreaXY TextAreaY TheSyncColor TheSyncThreshold
|
||||
syn keyword mpVardef baseline_grid graphic_grid multi_par_at_top
|
||||
syn keyword mpVariable CurrentSyncClass NOfSavedTextAreas
|
||||
syn keyword mpVariable NOfSavedTextColumns NOfSyncPaths NOfTextAreas
|
||||
syn keyword mpVariable NOfTextColumns PlainTextArea RegionTextArea
|
||||
syn keyword mpVariable SavedTextColumns SyncColor SyncLeftOffset SyncPaths
|
||||
syn keyword mpVariable SyncTasks SyncThreshold SyncThresholdMethod
|
||||
syn keyword mpVariable SyncWidth TextAreas TextColumns
|
||||
syn keyword mpVariable auto_multi_par_hsize boxdashtype boxfilloffset
|
||||
syn keyword mpVariable boxfilltype boxgriddirection boxgriddistance
|
||||
syn keyword mpVariable boxgridshift boxgridtype boxgridwidth boxlineradius
|
||||
syn keyword mpVariable boxlinetype boxlinewidth check_multi_par_chain
|
||||
syn keyword mpVariable compensate_multi_par_topskip
|
||||
syn keyword mpVariable enable_multi_par_fallback force_multi_par_chain
|
||||
syn keyword mpVariable ignore_multi_par_page last_multi_par_shift lefthang
|
||||
syn keyword mpVariable local_multi_par_area multi_column_first_page_hack
|
||||
syn keyword mpVariable multi_par_pages multiloc multilocs multipar
|
||||
syn keyword mpVariable multipars multiref multirefs nofmultipars
|
||||
syn keyword mpVariable obey_multi_par_hang obey_multi_par_more
|
||||
syn keyword mpVariable one_piece_multi_par par_hang_after par_hang_indent
|
||||
syn keyword mpVariable par_indent par_left_skip par_line_height
|
||||
syn keyword mpVariable par_right_skip par_start_pos par_stop_pos
|
||||
syn keyword mpVariable par_strut_depth par_strut_height ppos righthang
|
||||
syn keyword mpVariable snap_multi_par_tops somehang span_multi_column_pars
|
||||
syn keyword mpVariable use_multi_par_region
|
||||
syn keyword mpConstant context_core
|
||||
syn keyword LET anchor_area anchor_par draw_area
|
||||
" mp-cows.mpiv
|
||||
syn keyword mpConstant context_cows cow
|
||||
" mp-crop.mpiv
|
||||
syn keyword mpDef page_marks_add_color page_marks_add_lines
|
||||
syn keyword mpDef page_marks_add_marking page_marks_add_number
|
||||
syn keyword mpVardef crop_color crop_gray crop_marks_cmyk
|
||||
syn keyword mpVardef crop_marks_cmykrgb crop_marks_gray crop_marks_lines
|
||||
syn keyword mpVariable crop_colors more page
|
||||
syn keyword mpConstant context_crop
|
||||
" mp-figs.mpiv
|
||||
syn keyword mpDef naturalfigure registerfigure
|
||||
syn keyword mpVardef figuredimensions figureheight figuresize
|
||||
syn keyword mpVardef figurewidth
|
||||
syn keyword mpConstant context_figs
|
||||
" mp-fobg.mpiv
|
||||
syn keyword mpDef DrawFoFrame
|
||||
syn keyword mpVardef equalpaths
|
||||
syn keyword mpPrimaryDef inset outset
|
||||
syn keyword mpVariable FoBackground FoBackgroundColor FoFrame FoLineColor
|
||||
syn keyword mpVariable FoLineStyle FoLineWidth FoSplit
|
||||
syn keyword mpConstant FoAll FoBottom FoDash FoDotted FoDouble FoGroove
|
||||
syn keyword mpConstant FoHidden FoInset FoLeft FoMedium FoNoColor FoNone
|
||||
syn keyword mpConstant FoOutset FoRidge FoRight FoSolid FoThick FoThin
|
||||
syn keyword mpConstant FoTop context_fobg
|
||||
" mp-form.mpiv
|
||||
syn keyword mpConstant context_form
|
||||
" mp-func.mpiv
|
||||
syn keyword mpDef constructedfunction constructedpairs
|
||||
syn keyword mpDef constructedpath curvedfunction curvedpairs
|
||||
syn keyword mpDef curvedpath function pathconnectors straightfunction
|
||||
syn keyword mpDef straightpairs straightpath
|
||||
syn keyword mpConstant context_func
|
||||
" mp-grap.mpiv
|
||||
syn keyword mpDef Gfor OUT auto begingraph circles crosses diamonds
|
||||
syn keyword mpDef downtriangles endgraph gdata gdraw gdrawarrow
|
||||
syn keyword mpDef gdrawdblarrow gfill graph_addto
|
||||
syn keyword mpDef graph_addto_currentpicture graph_comma
|
||||
syn keyword mpDef graph_coordinate_multiplication graph_draw
|
||||
syn keyword mpDef graph_draw_label graph_errorbar_text graph_fill
|
||||
syn keyword mpDef graph_generate_exponents
|
||||
syn keyword mpDef graph_generate_label_position
|
||||
syn keyword mpDef graph_generate_numbers graph_label_location
|
||||
syn keyword mpDef graph_scan_mark graph_scan_marks graph_setbounds
|
||||
syn keyword mpDef graph_suffix graph_tick_label
|
||||
syn keyword mpDef graph_with_pen_and_color graph_withlist
|
||||
syn keyword mpDef graph_xyscale lefttriangles makefunctionpath plot
|
||||
syn keyword mpDef plotsymbol points rainbow righttriangles smoothpath
|
||||
syn keyword mpDef squares stars uptriangles witherrorbars
|
||||
syn keyword mpVardef addtopath augment autogrid constant_fit
|
||||
syn keyword mpVardef constant_function det escaped_format exp
|
||||
syn keyword mpVardef exponential_fit exponential_function format
|
||||
syn keyword mpVardef formatted frame functionpath gaussian_fit
|
||||
syn keyword mpVardef gaussian_function gdotlabel glabel graph_Feform
|
||||
syn keyword mpVardef graph_Meform graph_arrowhead_extent graph_bounds
|
||||
syn keyword mpVardef graph_clear_bounds
|
||||
syn keyword mpVardef graph_convert_user_path_to_internal graph_cspan
|
||||
syn keyword mpVardef graph_draw_arrowhead graph_error graph_errorbars
|
||||
syn keyword mpVardef graph_exp graph_factor_and_exponent_to_string
|
||||
syn keyword mpVardef graph_gridline_picture graph_is_null
|
||||
syn keyword mpVardef graph_label_convert_user_to_internal graph_loptok
|
||||
syn keyword mpVardef graph_match_exponents graph_mlog
|
||||
syn keyword mpVardef graph_modified_exponent_ypart graph_pair_adjust
|
||||
syn keyword mpVardef graph_picture_conversion graph_post_draw
|
||||
syn keyword mpVardef graph_read_line graph_readpath graph_remap
|
||||
syn keyword mpVardef graph_scan_path graph_select_exponent_mark
|
||||
syn keyword mpVardef graph_select_mark graph_set_bounds
|
||||
syn keyword mpVardef graph_set_default_bounds graph_shapesize
|
||||
syn keyword mpVardef graph_stash_label graph_tick_mark_spacing
|
||||
syn keyword mpVardef graph_unknown_pair_bbox grid isdigit itick
|
||||
syn keyword mpVardef linear_fit linear_function ln logten lorentzian_fit
|
||||
syn keyword mpVardef lorentzian_function otick polynomial_fit
|
||||
syn keyword mpVardef polynomial_function power_law_fit
|
||||
syn keyword mpVardef power_law_function powten setcoords setrange
|
||||
syn keyword mpVardef sortpath strfmt tick varfmt
|
||||
syn keyword mpNewInternal Mzero doubleinfinity graph_log_minimum
|
||||
syn keyword mpNewInternal graph_minimum_number_of_marks largestmantissa
|
||||
syn keyword mpNewInternal linear lntwo log mlogten singleinfinity
|
||||
syn keyword mpVariable Autoform determinant fit_chi_squared
|
||||
syn keyword mpVariable graph_errorbar_picture graph_exp_marks
|
||||
syn keyword mpVariable graph_frame_pair_a graph_frame_pair_b
|
||||
syn keyword mpVariable graph_lin_marks graph_log_marks graph_modified_bias
|
||||
syn keyword mpVariable graph_modified_higher graph_modified_lower
|
||||
syn keyword mpVariable graph_shape r_s resistance_color resistance_name
|
||||
syn keyword mpConstant context_grap
|
||||
" mp-grid.mpiv
|
||||
syn keyword mpDef hlingrid hloggrid vlingrid vloggrid
|
||||
syn keyword mpVardef hlinlabel hlintext hlogtext linlin linlinpath
|
||||
syn keyword mpVardef linlog linlogpath loglin loglinpath loglog
|
||||
syn keyword mpVardef loglogpath processpath vlinlabel vlintext vlogtext
|
||||
syn keyword mpVariable fmt_initialize fmt_pictures fmt_precision
|
||||
syn keyword mpVariable fmt_separator fmt_zerocheck grid_eps
|
||||
syn keyword mpConstant context_grid
|
||||
" mp-grph.mpiv
|
||||
syn keyword mpDef beginfig begingraphictextfig data_mpo_file
|
||||
syn keyword mpDef data_mpy_file doloadfigure draw endfig
|
||||
syn keyword mpDef endgraphictextfig fill fixedplace graphictext
|
||||
syn keyword mpDef loadfigure new_graphictext normalwithshade number
|
||||
syn keyword mpDef old_graphictext outlinefill protectgraphicmacros
|
||||
syn keyword mpDef resetfig reversefill withdrawcolor withfillcolor
|
||||
syn keyword mpDef withshade
|
||||
syn keyword mpVariable currentgraphictext figureshift
|
||||
syn keyword mpConstant context_grph
|
||||
" mp-idea.mpiv
|
||||
syn keyword mpVardef bcomponent ccomponent gcomponent mcomponent
|
||||
syn keyword mpVardef rcomponent somecolor ycomponent
|
||||
" mp-luas.mpiv
|
||||
syn keyword mpDef luacall message
|
||||
syn keyword mpVardef MP lua lualist
|
||||
syn keyword mpConstant context_luas
|
||||
" mp-mlib.mpiv
|
||||
syn keyword mpDef autoalign bitmapimage circular_shade cmyk comment
|
||||
syn keyword mpDef defineshade eofill eofillup externalfigure figure
|
||||
syn keyword mpDef fillup label linear_shade multitonecolor namedcolor
|
||||
syn keyword mpDef nofill onlayer passarrayvariable passvariable
|
||||
syn keyword mpDef plain_label register resolvedcolor scantokens
|
||||
syn keyword mpDef set_circular_vector set_linear_vector shaded
|
||||
syn keyword mpDef spotcolor startpassingvariable stoppassingvariable
|
||||
syn keyword mpDef thelabel transparent[] usemetafunlabels
|
||||
syn keyword mpDef useplainlabels withcircularshade withlinearshade
|
||||
syn keyword mpDef withmask withproperties withshadecenter
|
||||
syn keyword mpDef withshadecolors withshadedirection withshadedomain
|
||||
syn keyword mpDef withshadefactor withshadefraction withshadeorigin
|
||||
syn keyword mpDef withshaderadius withshadestep withshadetransform
|
||||
syn keyword mpDef withshadevector withtransparency
|
||||
syn keyword mpVardef anchored checkbounds checkedbounds
|
||||
syn keyword mpVardef define_circular_shade define_linear_shade dotlabel
|
||||
syn keyword mpVardef escaped_format fmttext fontsize format formatted
|
||||
syn keyword mpVardef installlabel onetimefmttext onetimetextext
|
||||
syn keyword mpVardef outlinetext plain_thelabel properties rawfmttext
|
||||
syn keyword mpVardef rawtexbox rawtextext rule strfmt strut texbox
|
||||
syn keyword mpVardef textext thefmttext thelabel thetexbox thetextext
|
||||
syn keyword mpVardef tostring transparency_alternative_to_number
|
||||
syn keyword mpVardef validtexbox varfmt verbatim
|
||||
syn keyword mpPrimaryDef asgroup infont normalinfont shadedinto
|
||||
syn keyword mpPrimaryDef shownshadecenter shownshadedirection
|
||||
syn keyword mpPrimaryDef shownshadeorigin shownshadevector withshade
|
||||
syn keyword mpPrimaryDef withshademethod
|
||||
syn keyword mpNewInternal colorburntransparent colordodgetransparent
|
||||
syn keyword mpNewInternal colortransparent darkentransparent
|
||||
syn keyword mpNewInternal differencetransparent exclusiontransparent
|
||||
syn keyword mpNewInternal hardlighttransparent huetransparent
|
||||
syn keyword mpNewInternal lightentransparent luminositytransparent
|
||||
syn keyword mpNewInternal multiplytransparent normaltransparent
|
||||
syn keyword mpNewInternal overlaytransparent saturationtransparent
|
||||
syn keyword mpNewInternal screentransparent shadefactor softlighttransparent
|
||||
syn keyword mpNewInternal textextoffset
|
||||
syn keyword mpType property transparency
|
||||
syn keyword mpVariable currentoutlinetext shadeddown shadedleft
|
||||
syn keyword mpVariable shadedright shadedup shadeoffset trace_shades
|
||||
syn keyword mpConstant context_mlib
|
||||
" mp-page.mpiv
|
||||
syn keyword mpDef BoundCoverAreas BoundPageAreas Enlarged FakeRule
|
||||
syn keyword mpDef FakeWord LoadPageState OverlayBox RuleColor
|
||||
syn keyword mpDef SetAreaVariables SetPageArea SetPageBackPage
|
||||
syn keyword mpDef SetPageCoverPage SetPageField SetPageFrontPage
|
||||
syn keyword mpDef SetPageHsize SetPageHstep SetPageLocation
|
||||
syn keyword mpDef SetPagePage SetPageSpine SetPageVariables
|
||||
syn keyword mpDef SetPageVsize SetPageVstep StartCover StartPage
|
||||
syn keyword mpDef StopCover StopPage SwapPageState innerenlarged
|
||||
syn keyword mpDef llEnlarged lrEnlarged outerenlarged ulEnlarged
|
||||
syn keyword mpDef urEnlarged
|
||||
syn keyword mpVardef BackPageHeight BackPageWidth BackSpace BaseLineSkip
|
||||
syn keyword mpVardef BodyFontSize BottomDistance BottomHeight
|
||||
syn keyword mpVardef BottomSpace CoverHeight CoverWidth CurrentColumn
|
||||
syn keyword mpVardef CurrentHeight CurrentWidth CutSpace EmWidth
|
||||
syn keyword mpVardef ExHeight FooterDistance FooterHeight
|
||||
syn keyword mpVardef FrontPageHeight FrontPageWidth HSize HeaderDistance
|
||||
syn keyword mpVardef HeaderHeight InPageBody InnerEdgeDistance
|
||||
syn keyword mpVardef InnerEdgeWidth InnerMarginDistance InnerMarginWidth
|
||||
syn keyword mpVardef InnerSpaceWidth LastPageNumber LayoutColumnDistance
|
||||
syn keyword mpVardef LayoutColumnWidth LayoutColumns LeftEdgeDistance
|
||||
syn keyword mpVardef LeftEdgeWidth LeftMarginDistance LeftMarginWidth
|
||||
syn keyword mpVardef LineHeight MakeupHeight MakeupWidth NOfColumns
|
||||
syn keyword mpVardef NOfPages OnOddPage OnRightPage OuterEdgeDistance
|
||||
syn keyword mpVardef OuterEdgeWidth OuterMarginDistance OuterMarginWidth
|
||||
syn keyword mpVardef OuterSpaceWidth OverlayDepth OverlayHeight
|
||||
syn keyword mpVardef OverlayLineWidth OverlayOffset OverlayWidth
|
||||
syn keyword mpVardef PageDepth PageFraction PageNumber PageOffset
|
||||
syn keyword mpVardef PaperBleed PaperHeight PaperWidth PrintPaperHeight
|
||||
syn keyword mpVardef PrintPaperWidth RealPageNumber RightEdgeDistance
|
||||
syn keyword mpVardef RightEdgeWidth RightMarginDistance RightMarginWidth
|
||||
syn keyword mpVardef SpineHeight SpineWidth StrutDepth StrutHeight
|
||||
syn keyword mpVardef TextHeight TextWidth TopDistance TopHeight TopSkip
|
||||
syn keyword mpVardef TopSpace VSize defaultcolormodel
|
||||
syn keyword mpVariable Area BackPage CoverPage CurrentLayout Field
|
||||
syn keyword mpVariable FrontPage HorPos Hsize Hstep Location Page
|
||||
syn keyword mpVariable PageStateAvailable RuleDepth RuleDirection
|
||||
syn keyword mpVariable RuleFactor RuleH RuleHeight RuleOffset RuleOption
|
||||
syn keyword mpVariable RuleThickness RuleV RuleWidth Spine VerPos Vsize
|
||||
syn keyword mpVariable Vstep
|
||||
syn keyword mpConstant context_page
|
||||
" mp-shap.mpiv
|
||||
syn keyword mpDef drawline drawshape some_shape
|
||||
syn keyword mpDef start_predefined_shape_definition
|
||||
syn keyword mpDef stop_predefined_shape_definition
|
||||
syn keyword mpVardef drawpredefinedline drawpredefinedshape
|
||||
syn keyword mpVardef some_shape_path
|
||||
syn keyword mpVariable predefined_shapes predefined_shapes_xradius
|
||||
syn keyword mpVariable predefined_shapes_xxradius
|
||||
syn keyword mpVariable predefined_shapes_yradius
|
||||
syn keyword mpVariable predefined_shapes_yyradius
|
||||
syn keyword mpConstant context_shap
|
||||
" mp-step.mpiv
|
||||
syn keyword mpDef initialize_step_variables midbottomboundary
|
||||
syn keyword mpDef midtopboundary step_begin_cell step_begin_chart
|
||||
syn keyword mpDef step_cell_ali step_cell_bot step_cell_top
|
||||
syn keyword mpDef step_cells step_end_cell step_end_chart
|
||||
syn keyword mpDef step_text_bot step_text_mid step_text_top
|
||||
syn keyword mpDef step_texts
|
||||
syn keyword mpVariable cell_distance_x cell_distance_y cell_fill_color
|
||||
syn keyword mpVariable cell_line_color cell_line_width cell_offset
|
||||
syn keyword mpVariable chart_align chart_category chart_vertical
|
||||
syn keyword mpVariable line_distance line_height line_line_color
|
||||
syn keyword mpVariable line_line_width line_offset nofcells
|
||||
syn keyword mpVariable text_distance_set text_fill_color text_line_color
|
||||
syn keyword mpVariable text_line_width text_offset
|
||||
syn keyword mpConstant context_cell
|
||||
" mp-symb.mpiv
|
||||
syn keyword mpDef finishglyph prepareglyph
|
||||
syn keyword mpConstant lefttriangle midbar onebar righttriangle sidebar
|
||||
syn keyword mpConstant sublefttriangle subrighttriangle twobar
|
||||
" mp-text.mpiv
|
||||
syn keyword mpDef build_parshape
|
||||
syn keyword mpVardef found_point
|
||||
syn keyword mpVariable trace_parshape
|
||||
syn keyword mpConstant context_text
|
||||
" mp-tool.mpiv
|
||||
syn keyword mpCommand dump
|
||||
syn keyword mpDef addbackground b_color beginglyph break centerarrow
|
||||
syn keyword mpDef clearxy condition data_mpd_file detaileddraw
|
||||
syn keyword mpDef detailpaths dowithpath draw drawboundary
|
||||
syn keyword mpDef drawboundingbox drawcontrollines drawcontrolpoints
|
||||
syn keyword mpDef drawfill draworigin drawpath drawpathonly
|
||||
syn keyword mpDef drawpathwithpoints drawpoint drawpointlabels
|
||||
syn keyword mpDef drawpoints drawticks drawwholepath drawxticks
|
||||
syn keyword mpDef drawyticks endglyph fill finishsavingdata g_color
|
||||
syn keyword mpDef inner_boundingbox job_name leftarrow loadmodule
|
||||
syn keyword mpDef midarrowhead naturalizepaths newboolean newcolor
|
||||
syn keyword mpDef newnumeric newpair newpath newpicture newstring
|
||||
syn keyword mpDef newtransform normalcolors normaldraw normalfill
|
||||
syn keyword mpDef normalwithcolor outer_boundingbox pop_boundingbox
|
||||
syn keyword mpDef popboundingbox popcurrentpicture push_boundingbox
|
||||
syn keyword mpDef pushboundingbox pushcurrentpicture r_color readfile
|
||||
syn keyword mpDef recolor redraw refill register_dirty_chars
|
||||
syn keyword mpDef remapcolor remapcolors remappedcolor reprocess
|
||||
syn keyword mpDef resetarrows resetcolormap resetdrawoptions
|
||||
syn keyword mpDef resolvedcolor restroke retext rightarrow savedata
|
||||
syn keyword mpDef saveoptions scale_currentpicture set_ahlength
|
||||
syn keyword mpDef set_grid showgrid startplaincompatibility
|
||||
syn keyword mpDef startsavingdata stopplaincompatibility
|
||||
syn keyword mpDef stopsavingdata stripe_path_a stripe_path_n undashed
|
||||
syn keyword mpDef undrawfill untext visualizeddraw visualizedfill
|
||||
syn keyword mpDef visualizepaths withcolor withgray
|
||||
syn keyword mpDef xscale_currentpicture xshifted
|
||||
syn keyword mpDef xyscale_currentpicture yscale_currentpicture
|
||||
syn keyword mpDef yshifted
|
||||
syn keyword mpVardef acos acosh anglebetween area arrowhead
|
||||
syn keyword mpVardef arrowheadonpath arrowpath asciistring asin asinh
|
||||
syn keyword mpVardef atan basiccolors bbheight bbwidth bcomponent
|
||||
syn keyword mpVardef blackcolor bottomboundary boundingbox c_phantom
|
||||
syn keyword mpVardef ccomponent center cleanstring colorcircle
|
||||
syn keyword mpVardef colordecimals colordecimalslist colorlike colorpart
|
||||
syn keyword mpVardef colortype complementary complemented copylist cos
|
||||
syn keyword mpVardef cosh cot cotd curved ddddecimal dddecimal ddecimal
|
||||
syn keyword mpVardef decorated drawarrowpath epsed exp freedotlabel
|
||||
syn keyword mpVardef freelabel gcomponent getunstringed grayed greyed
|
||||
syn keyword mpVardef hsvtorgb infinite innerboundingbox interpolated inv
|
||||
syn keyword mpVardef invcos inverted invsin invtan laddered leftboundary
|
||||
syn keyword mpVardef leftpath leftrightpath listsize listtocurves
|
||||
syn keyword mpVardef listtolines ln log mcomponent new_on_grid
|
||||
syn keyword mpVardef outerboundingbox paired pen_size penpoint phantom
|
||||
syn keyword mpVardef pointarrow pow punked rangepath rcomponent
|
||||
syn keyword mpVardef redecorated repathed rightboundary rightpath
|
||||
syn keyword mpVardef rotation roundedsquare set_inner_boundingbox
|
||||
syn keyword mpVardef set_outer_boundingbox setunstringed shapedlist
|
||||
syn keyword mpVardef simplified sin sinh sortlist sqr straightpath tan
|
||||
syn keyword mpVardef tand tanh tensecircle thefreelabel topboundary
|
||||
syn keyword mpVardef tripled undecorated unitvector unspiked unstringed
|
||||
syn keyword mpVardef whitecolor ycomponent
|
||||
syn keyword mpPrimaryDef along blownup bottomenlarged cornered crossed
|
||||
syn keyword mpPrimaryDef enlarged enlonged leftenlarged llenlarged llmoved
|
||||
syn keyword mpPrimaryDef lrenlarged lrmoved on paralleled randomized
|
||||
syn keyword mpPrimaryDef randomizedcontrols randomshifted rightenlarged
|
||||
syn keyword mpPrimaryDef shortened sized smoothed snapped softened squeezed
|
||||
syn keyword mpPrimaryDef stretched superellipsed topenlarged ulenlarged
|
||||
syn keyword mpPrimaryDef ulmoved uncolored urenlarged urmoved xsized
|
||||
syn keyword mpPrimaryDef xstretched xyscaled xysized ysized ystretched zmod
|
||||
syn keyword mpSecondaryDef anglestriped intersection_point numberstriped
|
||||
syn keyword mpSecondaryDef peepholed
|
||||
syn keyword mpTertiaryDef cutends
|
||||
syn keyword mpNewInternal ahdimple ahvariant anglelength anglemethod
|
||||
syn keyword mpNewInternal angleoffset charscale cmykcolormodel graycolormodel
|
||||
syn keyword mpNewInternal greycolormodel maxdimensions metapostversion
|
||||
syn keyword mpNewInternal nocolormodel rgbcolormodel striped_normal_inner
|
||||
syn keyword mpNewInternal striped_normal_outer striped_reverse_inner
|
||||
syn keyword mpNewInternal striped_reverse_outer
|
||||
syn keyword mpType grayscale greyscale quadruplet triplet
|
||||
syn keyword mpVariable ahfactor collapse_data color_map drawoptionsfactor
|
||||
syn keyword mpVariable freedotlabelsize freelabeloffset grid grid_full
|
||||
syn keyword mpVariable grid_h grid_left grid_nx grid_ny grid_w grid_x
|
||||
syn keyword mpVariable grid_y intersection_found originlength
|
||||
syn keyword mpVariable plain_compatibility_data pointlabelfont
|
||||
syn keyword mpVariable pointlabelscale refillbackground savingdata
|
||||
syn keyword mpVariable savingdatadone swappointlabels ticklength tickstep
|
||||
syn keyword mpConstant CRLF DQUOTE PERCENT SPACE bcircle context_tool crlf
|
||||
syn keyword mpConstant darkblue darkcyan darkgray darkgreen darkmagenta
|
||||
syn keyword mpConstant darkred darkyellow downtriangle dquote freesquare
|
||||
syn keyword mpConstant fulldiamond fullsquare fulltriangle lcircle
|
||||
syn keyword mpConstant lefttriangle lightgray llcircle lltriangle lrcircle
|
||||
syn keyword mpConstant lrtriangle mpversion nocolor noline oddly
|
||||
syn keyword mpConstant originpath percent rcircle righttriangle space
|
||||
syn keyword mpConstant tcircle triangle ulcircle ultriangle unitcircle
|
||||
syn keyword mpConstant unitdiamond unittriangle uptriangle urcircle
|
||||
syn keyword mpConstant urtriangle
|
||||
endif " MetaFun macros
|
||||
|
||||
" Define the default highlighting
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link mpTeXinsert String
|
||||
hi def link mpTeXbegin Statement
|
||||
hi def link mpTeXend Statement
|
||||
hi def link mpInternal mfInternal
|
||||
hi def link mpMacro Macro
|
||||
|
||||
hi def link mpTeXdelim mpPrimitive
|
||||
hi def link mpBoolExp mfBoolExp
|
||||
hi def link mpNumExp mfNumExp
|
||||
hi def link mpPairExp mfPairExp
|
||||
hi def link mpPathExp mfPathExp
|
||||
hi def link mpPenExp mfPenExp
|
||||
hi def link mpPicExp mfPicExp
|
||||
hi def link mpStringExp mfStringExp
|
||||
hi def link mpInternal mfInternal
|
||||
hi def link mpCommand mfCommand
|
||||
hi def link mpType mfType
|
||||
hi def link mpPrimitive mfPrimitive
|
||||
hi def link mpDef mfDef
|
||||
hi def link mpVardef mpDef
|
||||
hi def link mpPrimaryDef mpDef
|
||||
hi def link mpSecondaryDef mpDef
|
||||
hi def link mpTertiaryDef mpDef
|
||||
hi def link mpNewInternal mpInternal
|
||||
hi def link mpVariable mfVariable
|
||||
hi def link mpConstant mfConstant
|
||||
hi def link mpOnOff mpPrimitive
|
||||
hi def link mpDash mpPrimitive
|
||||
|
||||
let b:current_syntax = "mp"
|
||||
|
||||
" vim: ts=8
|
||||
let &cpo = s:cpo_sav
|
||||
unlet! s:cpo_sav
|
||||
|
||||
" vim:sw=2
|
||||
|
||||
+16
-18
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Aug 14
|
||||
" Last Change: 2016 Sep 14
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -88,14 +88,14 @@ syn keyword pythonAsync async await
|
||||
" followed by decorator name, optional parenthesized list of arguments,
|
||||
" and the next line with either def, class, or another decorator.
|
||||
syn match pythonDecorator
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\%(([^)]*)\)\=\s*\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
|
||||
\ display nextgroup=pythonDecoratorName skipwhite
|
||||
|
||||
" A dot must be allowed because of @MyClass.myfunc decorators.
|
||||
" It must be preceded by a decorator symbol and on a separate line from
|
||||
" a function/class it decorates.
|
||||
syn match pythonDecoratorName
|
||||
\ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\%(([^)]*)\)\=\s*\n\)\@="
|
||||
\ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\)\@="
|
||||
\ contained display nextgroup=pythonFunction skipnl
|
||||
|
||||
" The zero-length non-grouping match of def or class before the function
|
||||
@@ -289,43 +289,41 @@ endif
|
||||
" Sync at the beginning of class, function, or method definition.
|
||||
syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*("
|
||||
|
||||
|
||||
" The default highlight links. Can be overridden later.
|
||||
hi def link pythonStatement Statement
|
||||
hi def link pythonConditional Conditional
|
||||
hi def link pythonStatement Statement
|
||||
hi def link pythonConditional Conditional
|
||||
hi def link pythonRepeat Repeat
|
||||
hi def link pythonOperator Operator
|
||||
hi def link pythonException Exception
|
||||
hi def link pythonException Exception
|
||||
hi def link pythonInclude Include
|
||||
hi def link pythonAsync Statement
|
||||
hi def link pythonDecorator Define
|
||||
hi def link pythonDecoratorName Function
|
||||
hi def link pythonAsync Statement
|
||||
hi def link pythonDecorator Define
|
||||
hi def link pythonDecoratorName Function
|
||||
hi def link pythonFunction Function
|
||||
hi def link pythonComment Comment
|
||||
hi def link pythonTodo Todo
|
||||
hi def link pythonTodo Todo
|
||||
hi def link pythonString String
|
||||
hi def link pythonRawString String
|
||||
hi def link pythonRawString String
|
||||
hi def link pythonQuotes String
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonEscape Special
|
||||
if !exists("python_no_number_highlight")
|
||||
hi def link pythonNumber Number
|
||||
endif
|
||||
if !exists("python_no_builtin_highlight")
|
||||
hi def link pythonBuiltin Function
|
||||
hi def link pythonBuiltin Function
|
||||
endif
|
||||
if !exists("python_no_exception_highlight")
|
||||
hi def link pythonExceptions Structure
|
||||
hi def link pythonExceptions Structure
|
||||
endif
|
||||
if exists("python_space_error_highlight")
|
||||
hi def link pythonSpaceError Error
|
||||
hi def link pythonSpaceError Error
|
||||
endif
|
||||
if !exists("python_no_doctest_highlight")
|
||||
hi def link pythonDoctest Special
|
||||
hi def link pythonDoctest Special
|
||||
hi def link pythonDoctestValue Define
|
||||
endif
|
||||
|
||||
|
||||
let b:current_syntax = "python"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
||||
@@ -381,7 +381,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \
|
||||
|
||||
" Here Strings: {{{1
|
||||
" =============
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if it's a posix
|
||||
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
|
||||
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
|
||||
endif
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
@rem :h --remote-silent for more details
|
||||
@rem
|
||||
@rem --servername VS_NET
|
||||
@rem This will create a new instance of vim called VS_NET. So if you
|
||||
open
|
||||
@rem This will create a new instance of vim called VS_NET. So if you open
|
||||
@rem multiple files from VS, they will use the same instance of Vim.
|
||||
@rem This allows you to have multiple copies of Vim running, but you can
|
||||
@rem control which one has VS files in it.
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
vimtutor <ENTER>
|
||||
|
||||
4. Если вы уверены в том, что запомнили эти шаги, выполните шаги от 1 до 3
|
||||
чтобы выйти снова запустить редактор.
|
||||
чтобы выйти и снова запустить редактор.
|
||||
|
||||
Замечание! :q! <ENTER> отбрасывает любые сделанные вами изменения. Через
|
||||
несколько уроков вы узнаете как сохранять изменения в файл.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# DEBUG=yes Build debug version (for VC7 and maybe later)
|
||||
#
|
||||
|
||||
TARGETOS=BOTH
|
||||
TARGETOS=WINNT
|
||||
!ifndef APPVER
|
||||
APPVER=5.0
|
||||
!endif
|
||||
|
||||
+14
-14
@@ -722,40 +722,40 @@ The MS-DOS support was removed in patch 7.4.1399.
|
||||
After you've built the Vim binaries as described above, you're ready to
|
||||
install Vim on your system. However, if you've obtained the Vim sources
|
||||
using Git, Mercurial or by downloading them as a unix tar file, you must
|
||||
first create a "vim74" directory. If you instead downloaded the sources as
|
||||
first create a "vim80" directory. If you instead downloaded the sources as
|
||||
zip files, you can skip this setup as the zip archives already have the
|
||||
correct directory structure.
|
||||
|
||||
A. Create a Vim "runtime" subdirectory named "vim74"
|
||||
A. Create a Vim "runtime" subdirectory named "vim80"
|
||||
-----------------------------------------------------
|
||||
If you obtained your Vim sources as zip files, you can skip this step.
|
||||
Otherwise, continue reading.
|
||||
|
||||
Go to the directory that contains the Vim "src" and "runtime"
|
||||
directories and create a new subdirectory named "vim74".
|
||||
directories and create a new subdirectory named "vim80".
|
||||
|
||||
Copy the "runtime" files into "vim74":
|
||||
copy runtime\* vim74
|
||||
Copy the "runtime" files into "vim80":
|
||||
copy runtime\* vim80
|
||||
|
||||
B. Copy the new binaries into the "vim74" directory
|
||||
B. Copy the new binaries into the "vim80" directory
|
||||
----------------------------------------------------
|
||||
Regardless of how you installed the Vim sources, you need to copy the
|
||||
new binaries you created above into "vim74":
|
||||
new binaries you created above into "vim80":
|
||||
|
||||
copy src\*.exe vim74
|
||||
copy src\GvimExt\gvimext.dll vim74
|
||||
copy src\xxd\xxd.exe vim74
|
||||
copy src\*.exe vim80
|
||||
copy src\GvimExt\gvimext.dll vim80
|
||||
copy src\xxd\xxd.exe vim80
|
||||
|
||||
C. Move the "vim74" directory into the Vim installation subdirectory
|
||||
C. Move the "vim80" directory into the Vim installation subdirectory
|
||||
---------------------------------------------------------------------
|
||||
Move the "vim74" subdirectory into the subdirectory where you want Vim
|
||||
Move the "vim80" subdirectory into the subdirectory where you want Vim
|
||||
to be installed. Typically, this subdirectory will be named "vim".
|
||||
If you already have a "vim74" subdirectory in "vim", delete it first
|
||||
If you already have a "vim80" subdirectory in "vim", delete it first
|
||||
by running its uninstal.exe program.
|
||||
|
||||
D. Install Vim
|
||||
---------------
|
||||
"cd" to your Vim installation subdirectory "vim\vim74" and run the
|
||||
"cd" to your Vim installation subdirectory "vim\vim80" and run the
|
||||
"install.exe" program. It will ask you a number of questions about
|
||||
how you would like to have your Vim setup. Among these are:
|
||||
- You can tell it to write a "_vimrc" file with your preferences in the
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// DBPrefsWindowController.m
|
||||
//
|
||||
|
||||
#import "MacVim.h"
|
||||
#import "DBPrefsWindowController.h"
|
||||
|
||||
|
||||
@@ -75,8 +76,8 @@ static DBPrefsWindowController *_sharedPrefsWindowController = nil;
|
||||
// If the developer attached a window to this controller
|
||||
// in Interface Builder, it gets replaced with this one.
|
||||
NSPanel *window = [[[NSPanel alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
|
||||
styleMask:(NSTitledWindowMask |
|
||||
NSClosableWindowMask)
|
||||
styleMask:(NSWindowStyleMaskTitled |
|
||||
NSWindowStyleMaskClosable)
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES] autorelease];
|
||||
[window setHidesOnDeactivate:NO];
|
||||
@@ -349,7 +350,7 @@ static DBPrefsWindowController *_sharedPrefsWindowController = nil;
|
||||
{
|
||||
[viewAnimation stopAnimation];
|
||||
|
||||
if ([self shiftSlowsAnimation] && [[[self window] currentEvent] modifierFlags] & NSShiftKeyMask)
|
||||
if ([self shiftSlowsAnimation] && [[[self window] currentEvent] modifierFlags] & NSEventModifierFlagShift)
|
||||
[viewAnimation setDuration:1.25];
|
||||
else
|
||||
[viewAnimation setDuration:0.25];
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>110</string>
|
||||
<string>113</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -181,12 +181,28 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
CFPreferencesSetAppValue(CFSTR("NSRepeatCountBinding"),
|
||||
CFSTR(""),
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
|
||||
int tabMinWidthKey;
|
||||
int tabMaxWidthKey;
|
||||
int tabOptimumWidthKey;
|
||||
if (shouldUseYosemiteTabBarStyle()) {
|
||||
tabMinWidthKey = 120;
|
||||
tabMaxWidthKey = 0;
|
||||
tabOptimumWidthKey = 0;
|
||||
} else {
|
||||
tabMinWidthKey = 64;
|
||||
tabMaxWidthKey = 6*64;
|
||||
tabOptimumWidthKey = 132;
|
||||
}
|
||||
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:NO], MMNoWindowKey,
|
||||
[NSNumber numberWithInt:64], MMTabMinWidthKey,
|
||||
[NSNumber numberWithInt:6*64], MMTabMaxWidthKey,
|
||||
[NSNumber numberWithInt:132], MMTabOptimumWidthKey,
|
||||
[NSNumber numberWithInt:tabMinWidthKey],
|
||||
MMTabMinWidthKey,
|
||||
[NSNumber numberWithInt:tabMaxWidthKey],
|
||||
MMTabMaxWidthKey,
|
||||
[NSNumber numberWithInt:tabOptimumWidthKey],
|
||||
MMTabOptimumWidthKey,
|
||||
[NSNumber numberWithBool:YES], MMShowAddTabButtonKey,
|
||||
[NSNumber numberWithInt:2], MMTextInsetLeftKey,
|
||||
[NSNumber numberWithInt:1], MMTextInsetRightKey,
|
||||
@@ -502,7 +518,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
if (modifiedBuffers) {
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Quit",
|
||||
@"Dialog button")];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Cancel",
|
||||
@@ -532,7 +548,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
if (numWindows > 1 || numTabs > 1) {
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Quit",
|
||||
@"Dialog button")];
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"Cancel",
|
||||
@@ -1566,7 +1582,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
}
|
||||
|
||||
[alert setInformativeText:text];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
|
||||
[alert runModal];
|
||||
[alert release];
|
||||
@@ -1735,7 +1751,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
@"Unknown URL Scheme dialog, text"),
|
||||
[url host]]];
|
||||
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
[alert runModal];
|
||||
[alert release];
|
||||
}
|
||||
@@ -1853,7 +1869,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
// background, the runloop won't bother flushing the autorelease pool.
|
||||
// Triggering an NSEvent works around this.
|
||||
// http://www.mikeash.com/pyblog/more-fun-with-autorelease.html
|
||||
NSEvent* event = [NSEvent otherEventWithType:NSApplicationDefined
|
||||
NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined
|
||||
location:NSZeroPoint
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* Some default NSApplication key input behavior is overridden here.
|
||||
*/
|
||||
|
||||
#import "MacVim.h"
|
||||
#import "MMApplication.h"
|
||||
|
||||
@implementation MMApplication
|
||||
@@ -27,14 +28,15 @@
|
||||
// help mode' (the keyDown: event itself never reaches the text view). By
|
||||
// clearing the 'help key flag' this event will be treated like a normal
|
||||
// key event.
|
||||
if ((NSKeyDown == type || NSKeyUp == type) && (flags & NSHelpKeyMask)) {
|
||||
flags &= ~NSHelpKeyMask;
|
||||
if ((NSEventTypeKeyDown == type || NSEventTypeKeyUp == type) &&
|
||||
(flags & NSEventModifierFlagHelp)) {
|
||||
flags &= ~NSEventModifierFlagHelp;
|
||||
event = [NSEvent keyEventWithType:[event type]
|
||||
location:[event locationInWindow]
|
||||
modifierFlags:flags
|
||||
timestamp:[event timestamp]
|
||||
windowNumber:[event windowNumber]
|
||||
context:[event context]
|
||||
context:nil // [event context] is always nil
|
||||
characters:[event characters]
|
||||
charactersIgnoringModifiers:[event charactersIgnoringModifiers]
|
||||
isARepeat:[event isARepeat]
|
||||
|
||||
@@ -3173,13 +3173,13 @@ static int eventModifierFlagsToVimModMask(int modifierFlags)
|
||||
{
|
||||
int modMask = 0;
|
||||
|
||||
if (modifierFlags & NSShiftKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagShift)
|
||||
modMask |= MOD_MASK_SHIFT;
|
||||
if (modifierFlags & NSControlKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagControl)
|
||||
modMask |= MOD_MASK_CTRL;
|
||||
if (modifierFlags & NSAlternateKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagOption)
|
||||
modMask |= MOD_MASK_ALT;
|
||||
if (modifierFlags & NSCommandKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagCommand)
|
||||
modMask |= MOD_MASK_CMD;
|
||||
|
||||
return modMask;
|
||||
@@ -3189,11 +3189,11 @@ static int eventModifierFlagsToVimMouseModMask(int modifierFlags)
|
||||
{
|
||||
int modMask = 0;
|
||||
|
||||
if (modifierFlags & NSShiftKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagShift)
|
||||
modMask |= MOUSE_SHIFT;
|
||||
if (modifierFlags & NSControlKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagControl)
|
||||
modMask |= MOUSE_CTRL;
|
||||
if (modifierFlags & NSAlternateKeyMask)
|
||||
if (modifierFlags & NSEventModifierFlagOption)
|
||||
modMask |= MOUSE_ALT;
|
||||
|
||||
return modMask;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* changes were made to adapt the code to MacVim.
|
||||
*/
|
||||
|
||||
#import "MacVim.h"
|
||||
#import "MMCoreTextView.h"
|
||||
|
||||
|
||||
@@ -150,12 +151,12 @@ static const NSTrackingRectTag kTrackingRectTag = 0xBADFACE;
|
||||
}
|
||||
}
|
||||
|
||||
// Sends a fake NSMouseExited event to the view for its current tracking rect.
|
||||
// Sends a fake NSEventTypeMouseExited event to the view for its current tracking rect.
|
||||
- (void)_sendToolTipMouseExited
|
||||
{
|
||||
// Nothing matters except window, trackingNumber, and userData.
|
||||
int windowNumber = [[self window] windowNumber];
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseExited
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSEventTypeMouseExited
|
||||
location:NSMakePoint(0, 0)
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
@@ -167,12 +168,12 @@ static const NSTrackingRectTag kTrackingRectTag = 0xBADFACE;
|
||||
[trackingRectOwner_ mouseExited:fakeEvent];
|
||||
}
|
||||
|
||||
// Sends a fake NSMouseEntered event to the view for its current tracking rect.
|
||||
// Sends a fake NSEventTypeMouseEntered event to the view for its current tracking rect.
|
||||
- (void)_sendToolTipMouseEntered
|
||||
{
|
||||
// Nothing matters except window, trackingNumber, and userData.
|
||||
int windowNumber = [[self window] windowNumber];
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSMouseEntered
|
||||
NSEvent *fakeEvent = [NSEvent enterExitEventWithType:NSEventTypeMouseEntered
|
||||
location:NSMakePoint(0, 0)
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
|
||||
@@ -910,7 +910,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
numColumns:width];
|
||||
[signImg drawInRect:r
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
} else if (DrawStringDrawType == type) {
|
||||
int bg = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -1412,10 +1412,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
|
||||
- (void)scrollRect:(NSRect)rect lineCount:(int)count
|
||||
{
|
||||
NSPoint destPoint = rect.origin;
|
||||
destPoint.y -= count * cellSize.height;
|
||||
|
||||
NSCopyBits(0, rect, destPoint);
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
}
|
||||
|
||||
- (void)deleteLinesFromRow:(int)row lineCount:(int)count
|
||||
|
||||
@@ -67,7 +67,7 @@ enum {
|
||||
// (another way would be to make the existing window large enough that the
|
||||
// title bar is off screen. but that doesn't work with multiple screens).
|
||||
self = [super initWithContentRect:[screen frame]
|
||||
styleMask:NSBorderlessWindowMask
|
||||
styleMask:NSWindowStyleMaskBorderless
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES
|
||||
// since we're passing [screen frame] above,
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
NSMutableDictionary *signImages;
|
||||
BOOL useMouseTime;
|
||||
NSDate *mouseDownTime;
|
||||
CGFloat scrollingDeltaX;
|
||||
CGFloat scrollingDeltaY;
|
||||
|
||||
// Input Manager
|
||||
NSRange imRange;
|
||||
|
||||
@@ -158,12 +158,13 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// ASCII chars in the range after space (0x20) and before backspace (0x7f).
|
||||
// Note that this implies that 'mmta' (if enabled) breaks input methods
|
||||
// when the Alt key is held.
|
||||
if ((flags & NSAlternateKeyMask) && [mmta boolValue] && [unmod length] == 1
|
||||
if ((flags & NSEventModifierFlagOption)
|
||||
&& [mmta boolValue] && [unmod length] == 1
|
||||
&& [unmod characterAtIndex:0] > 0x20) {
|
||||
ASLogDebug(@"MACMETA key, don't interpret it");
|
||||
string = unmod;
|
||||
} else if (imState && (flags & NSControlKeyMask)
|
||||
&& !(flags & (NSAlternateKeyMask|NSCommandKeyMask))
|
||||
} else if (imState && (flags & NSEventModifierFlagControl)
|
||||
&& !(flags & (NSEventModifierFlagOption|NSEventModifierFlagCommand))
|
||||
&& [unmod length] == 1
|
||||
&& ([unmod characterAtIndex:0] == '6' ||
|
||||
[unmod characterAtIndex:0] == '^')) {
|
||||
@@ -180,14 +181,15 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
[textView interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||
if (interpretKeyEventsSwallowedKey)
|
||||
string = nil;
|
||||
else if (flags & NSCommandKeyMask) {
|
||||
else if (flags & NSEventModifierFlagCommand) {
|
||||
// HACK! When Command is held we have to more or less guess whether
|
||||
// we should use characters or charactersIgnoringModifiers. The
|
||||
// following heuristic seems to work but it may have to change.
|
||||
// Note that the Shift and Alt flags may also need to be cleared
|
||||
// (see doKeyDown:keyCode:modifiers: in MMBackend).
|
||||
if ((flags & NSShiftKeyMask && !(flags & NSAlternateKeyMask))
|
||||
|| flags & NSControlKeyMask)
|
||||
if ((flags & NSEventModifierFlagShift
|
||||
&& !(flags & NSEventModifierFlagOption))
|
||||
|| flags & NSEventModifierFlagControl)
|
||||
string = unmod;
|
||||
}
|
||||
}
|
||||
@@ -278,6 +280,38 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)event
|
||||
{
|
||||
float dx = 0;
|
||||
float dy = 0;
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
|
||||
if ([event hasPreciseScrollingDeltas]) {
|
||||
NSSize cellSize = [textView cellSize];
|
||||
float thresholdX = cellSize.width;
|
||||
float thresholdY = cellSize.height;
|
||||
scrollingDeltaX += [event scrollingDeltaX];
|
||||
if (fabs(scrollingDeltaX) > thresholdX) {
|
||||
dx = roundf(scrollingDeltaX / thresholdX);
|
||||
scrollingDeltaX -= thresholdX * dx;
|
||||
}
|
||||
scrollingDeltaY += [event scrollingDeltaY];
|
||||
if (fabs(scrollingDeltaY) > thresholdY) {
|
||||
dy = roundf(scrollingDeltaY / thresholdY);
|
||||
scrollingDeltaY -= thresholdY * dy;
|
||||
}
|
||||
} else {
|
||||
scrollingDeltaX = 0;
|
||||
scrollingDeltaY = 0;
|
||||
dx = [event scrollingDeltaX];
|
||||
dy = [event scrollingDeltaY];
|
||||
}
|
||||
#else
|
||||
dx = [event deltaX];
|
||||
dy = [event deltaY];
|
||||
#endif
|
||||
|
||||
if (dx == 0 && dy == 0)
|
||||
return;
|
||||
|
||||
if ([self hasMarkedText]) {
|
||||
// We must clear the marked text since the cursor may move if the
|
||||
// marked text moves outside the view as a result of scrolling.
|
||||
@@ -286,11 +320,6 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
[[NSTextInputContext currentInputContext] discardMarkedText];
|
||||
}
|
||||
|
||||
float dx = [event deltaX];
|
||||
float dy = [event deltaY];
|
||||
if (dx == 0 && dy == 0)
|
||||
return;
|
||||
|
||||
int row, col;
|
||||
NSPoint pt = [textView convertPoint:[event locationInWindow] fromView:nil];
|
||||
if ([textView convertPoint:pt toRow:&row column:&col]) {
|
||||
@@ -339,12 +368,12 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// If desired, intepret Ctrl-Click as a right mouse click.
|
||||
BOOL translateCtrlClick = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMTranslateCtrlClickKey];
|
||||
flags = flags & NSDeviceIndependentModifierFlagsMask;
|
||||
flags = flags & NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
if (translateCtrlClick && button == 0 &&
|
||||
(flags == NSControlKeyMask ||
|
||||
flags == (NSControlKeyMask|NSAlphaShiftKeyMask))) {
|
||||
(flags == NSEventModifierFlagControl || flags ==
|
||||
(NSEventModifierFlagControl|NSEventModifierFlagCapsLock))) {
|
||||
button = 1;
|
||||
flags &= ~NSControlKeyMask;
|
||||
flags &= ~NSEventModifierFlagControl;
|
||||
}
|
||||
|
||||
[data appendBytes:&row length:sizeof(int)];
|
||||
@@ -853,7 +882,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
|
||||
// The low 16 bits are not used for modifier flags by NSEvent. Use
|
||||
// these bits for custom flags.
|
||||
flags &= NSDeviceIndependentModifierFlagsMask;
|
||||
flags &= NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
if ([currentEvent isARepeat])
|
||||
flags |= 1;
|
||||
|
||||
@@ -886,8 +915,8 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// HACK! Keys on the numeric key pad are treated as special keys by Vim
|
||||
// so we need to pass on key code and modifier flags in this situation.
|
||||
unsigned mods = [currentEvent modifierFlags];
|
||||
if (mods & NSNumericPadKeyMask) {
|
||||
flags = mods & NSDeviceIndependentModifierFlagsMask;
|
||||
if (mods & NSEventModifierFlagNumericPad) {
|
||||
flags = mods & NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
keyCode = [currentEvent keyCode];
|
||||
}
|
||||
|
||||
|
||||
@@ -1328,7 +1328,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
pt = [[windowController window] mouseLocationOutsideOfEventStream];
|
||||
}
|
||||
|
||||
NSEvent *event = [NSEvent mouseEventWithType:NSRightMouseDown
|
||||
NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeRightMouseDown
|
||||
location:pt
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
|
||||
+15
-8
@@ -127,10 +127,17 @@ enum {
|
||||
|
||||
if (shouldUseYosemiteTabBarStyle()) {
|
||||
CGFloat screenWidth = [[NSScreen mainScreen] frame].size.width;
|
||||
int tabMaxWidth = [ud integerForKey:MMTabMaxWidthKey];
|
||||
if (tabMaxWidth == 0)
|
||||
tabMaxWidth = screenWidth;
|
||||
int tabOptimumWidth = [ud integerForKey:MMTabOptimumWidthKey];
|
||||
if (tabOptimumWidth == 0)
|
||||
tabOptimumWidth = screenWidth;
|
||||
|
||||
[tabBarControl setStyleNamed:@"Yosemite"];
|
||||
[tabBarControl setCellMinWidth:120];
|
||||
[tabBarControl setCellMaxWidth:screenWidth];
|
||||
[tabBarControl setCellOptimumWidth:screenWidth];
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:tabMaxWidth];
|
||||
[tabBarControl setCellOptimumWidth:tabOptimumWidth];
|
||||
} else {
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:[ud integerForKey:MMTabMaxWidthKey]];
|
||||
@@ -190,11 +197,11 @@ enum {
|
||||
// weird behind the window resize throbber, so emulate the look of an
|
||||
// NSScrollView in the bottom right corner.
|
||||
if (![[self window] showsResizeIndicator] // XXX: make this a flag
|
||||
|| !([[self window] styleMask] & NSTexturedBackgroundWindowMask))
|
||||
|| !([[self window] styleMask] & NSWindowStyleMaskTexturedBackground))
|
||||
return;
|
||||
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
int sw = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
int sw = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
int sw = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
@@ -697,7 +704,7 @@ enum {
|
||||
|
||||
NSRect rect;
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
@@ -811,7 +818,7 @@ enum {
|
||||
{
|
||||
NSSize size = textViewSize;
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
@@ -833,7 +840,7 @@ enum {
|
||||
{
|
||||
NSRect rect = { {0, 0}, {contentSize.width, contentSize.height} };
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize:NSControlSizeRegular scrollerStyle:NSScrollerStyleLegacy];
|
||||
#else
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
#endif
|
||||
|
||||
@@ -127,15 +127,15 @@
|
||||
|
||||
- (id)initWithVimController:(MMVimController *)controller
|
||||
{
|
||||
unsigned styleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSMiniaturizableWindowMask | NSResizableWindowMask
|
||||
| NSUnifiedTitleAndToolbarWindowMask
|
||||
| NSTexturedBackgroundWindowMask;
|
||||
unsigned styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
|
||||
| NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable
|
||||
| NSWindowStyleMaskUnifiedTitleAndToolbar
|
||||
| NSWindowStyleMaskTexturedBackground;
|
||||
|
||||
if ([[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMNoTitleBarWindowKey]) {
|
||||
// No title bar setting
|
||||
styleMask &= ~NSTitledWindowMask;
|
||||
styleMask &= ~NSWindowStyleMaskTitled;
|
||||
}
|
||||
|
||||
// NOTE: The content rect is only used the very first time MacVim is
|
||||
@@ -175,7 +175,7 @@
|
||||
[win setDelegate:self];
|
||||
[win setInitialFirstResponder:[vimView textView]];
|
||||
|
||||
if ([win styleMask] & NSTexturedBackgroundWindowMask) {
|
||||
if ([win styleMask] & NSWindowStyleMaskTexturedBackground) {
|
||||
// On Leopard, we want to have a textured window to have nice
|
||||
// looking tabs. But the textured window look implies rounded
|
||||
// corners, which looks really weird -- disable them. This is a
|
||||
@@ -1066,8 +1066,8 @@
|
||||
|
||||
// Decide whether too zoom horizontally or not (always zoom vertically).
|
||||
NSEvent *event = [NSApp currentEvent];
|
||||
BOOL cmdLeftClick = [event type] == NSLeftMouseUp &&
|
||||
[event modifierFlags] & NSCommandKeyMask;
|
||||
BOOL cmdLeftClick = [event type] == NSEventTypeLeftMouseUp &&
|
||||
[event modifierFlags] & NSEventModifierFlagCommand;
|
||||
BOOL zoomBoth = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMZoomBothKey];
|
||||
zoomBoth = (zoomBoth && !cmdLeftClick) || (!zoomBoth && cmdLeftClick);
|
||||
@@ -1179,7 +1179,7 @@
|
||||
[context setDuration:0.5*duration];
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] | NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForUnified];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1244,7 +1244,7 @@
|
||||
|
||||
fullScreenEnabled = NO;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] & ~NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForMetal];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1275,7 +1275,7 @@
|
||||
[context setDuration:0.5*duration];
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] & ~NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForMetal];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1323,7 +1323,7 @@
|
||||
|
||||
fullScreenEnabled = YES;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[window setStyleMask:([window styleMask] | NSWindowStyleMaskFullScreen)];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForUnified];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
@@ -1513,7 +1513,7 @@
|
||||
BOOL tabBarVisible = ![[vimView tabBarControl] isHidden];
|
||||
BOOL toolbarHidden = [decoratedWindow toolbar] == nil;
|
||||
BOOL windowTextured = ([decoratedWindow styleMask] &
|
||||
NSTexturedBackgroundWindowMask) != 0;
|
||||
NSWindowStyleMaskTexturedBackground) != 0;
|
||||
BOOL hideSeparator = NO;
|
||||
|
||||
if (fullScreenEnabled || tabBarVisible)
|
||||
|
||||
+73
-10
@@ -9,8 +9,6 @@
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <asl.h>
|
||||
|
||||
|
||||
// Taken from /usr/include/AvailabilityMacros.h
|
||||
#ifndef MAC_OS_X_VERSION_10_7
|
||||
@@ -28,6 +26,9 @@
|
||||
#ifndef MAC_OS_X_VERSION_10_11
|
||||
# define MAC_OS_X_VERSION_10_11 101100
|
||||
#endif
|
||||
#ifndef MAC_OS_X_VERSION_10_12
|
||||
# define MAC_OS_X_VERSION_10_12 101200
|
||||
#endif
|
||||
|
||||
// Needed for pre-10.11 SDK
|
||||
#ifndef NSAppKitVersionNumber10_10
|
||||
@@ -37,6 +38,45 @@
|
||||
# define NSAppKitVersionNumber10_10_Max 1349
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
// Deprecated constants in 10.12 SDK
|
||||
# define NSAlertStyleCritical NSCriticalAlertStyle
|
||||
# define NSAlertStyleInformational NSInformationalAlertStyle
|
||||
# define NSAlertStyleWarning NSWarningAlertStyle
|
||||
# define NSCompositingOperationSourceOver NSCompositeSourceOver
|
||||
# define NSControlSizeRegular NSRegularControlSize
|
||||
# define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||
# define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
# define NSEventModifierFlagControl NSControlKeyMask
|
||||
# define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask
|
||||
# define NSEventModifierFlagHelp NSHelpKeyMask
|
||||
# define NSEventModifierFlagNumericPad NSNumericPadKeyMask
|
||||
# define NSEventModifierFlagOption NSAlternateKeyMask
|
||||
# define NSEventModifierFlagShift NSShiftKeyMask
|
||||
# define NSEventTypeApplicationDefined NSApplicationDefined
|
||||
# define NSEventTypeKeyDown NSKeyDown
|
||||
# define NSEventTypeKeyUp NSKeyUp
|
||||
# define NSEventTypeLeftMouseUp NSLeftMouseUp
|
||||
# define NSEventTypeMouseEntered NSMouseEntered
|
||||
# define NSEventTypeMouseExited NSMouseExited
|
||||
# define NSEventTypeRightMouseDown NSRightMouseDown
|
||||
# define NSWindowStyleMaskBorderless NSBorderlessWindowMask
|
||||
# define NSWindowStyleMaskClosable NSClosableWindowMask
|
||||
# define NSWindowStyleMaskFullScreen NSFullScreenWindowMask
|
||||
# define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
|
||||
# define NSWindowStyleMaskResizable NSResizableWindowMask
|
||||
# define NSWindowStyleMaskTexturedBackground NSTexturedBackgroundWindowMask
|
||||
# define NSWindowStyleMaskTitled NSTitledWindowMask
|
||||
# define NSWindowStyleMaskUnifiedTitleAndToolbar NSUnifiedTitleAndToolbarWindowMask
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
# import <asl.h>
|
||||
# define MM_USE_ASL
|
||||
#else
|
||||
# import <os/log.h>
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// This is the protocol MMBackend implements.
|
||||
@@ -360,7 +400,10 @@ extern int ASLogLevel;
|
||||
|
||||
void ASLInit();
|
||||
|
||||
#define ASLog(level, fmt, ...) \
|
||||
#if defined(MM_USE_ASL)
|
||||
|
||||
# define MM_ASL_LEVEL_DEFAULT ASL_LEVEL_NOTICE
|
||||
# define ASLog(level, fmt, ...) \
|
||||
if (level <= ASLogLevel) { \
|
||||
asl_log(NULL, NULL, level, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
@@ -369,10 +412,30 @@ void ASLInit();
|
||||
|
||||
// Note: These macros are used like ASLogErr(@"text num=%d", 42). Objective-C
|
||||
// style specifiers (%@) are supported.
|
||||
#define ASLogCrit(fmt, ...) ASLog(ASL_LEVEL_CRIT, fmt, ##__VA_ARGS__)
|
||||
#define ASLogErr(fmt, ...) ASLog(ASL_LEVEL_ERR, fmt, ##__VA_ARGS__)
|
||||
#define ASLogWarn(fmt, ...) ASLog(ASL_LEVEL_WARNING, fmt, ##__VA_ARGS__)
|
||||
#define ASLogNotice(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
#define ASLogInfo(fmt, ...) ASLog(ASL_LEVEL_INFO, fmt, ##__VA_ARGS__)
|
||||
#define ASLogDebug(fmt, ...) ASLog(ASL_LEVEL_DEBUG, fmt, ##__VA_ARGS__)
|
||||
#define ASLogTmp(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
# define ASLogCrit(fmt, ...) ASLog(ASL_LEVEL_CRIT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogErr(fmt, ...) ASLog(ASL_LEVEL_ERR, fmt, ##__VA_ARGS__)
|
||||
# define ASLogWarn(fmt, ...) ASLog(ASL_LEVEL_WARNING, fmt, ##__VA_ARGS__)
|
||||
# define ASLogNotice(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
# define ASLogInfo(fmt, ...) ASLog(ASL_LEVEL_INFO, fmt, ##__VA_ARGS__)
|
||||
# define ASLogDebug(fmt, ...) ASLog(ASL_LEVEL_DEBUG, fmt, ##__VA_ARGS__)
|
||||
# define ASLogTmp(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
# define MM_ASL_LEVEL_DEFAULT OS_LOG_TYPE_DEFAULT
|
||||
# define ASLog(level, fmt, ...) \
|
||||
if (level <= ASLogLevel) { \
|
||||
os_log_with_type(OS_LOG_DEFAULT, level, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
[[NSString stringWithFormat:fmt, ##__VA_ARGS__] UTF8String]); \
|
||||
}
|
||||
|
||||
# define ASLogCrit(fmt, ...) ASLog(OS_LOG_TYPE_FAULT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogErr(fmt, ...) ASLog(OS_LOG_TYPE_ERROR, fmt, ##__VA_ARGS__)
|
||||
# define ASLogWarn(fmt, ...) ASLog(OS_LOG_TYPE_DEFAULT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogNotice(fmt, ...) ASLog(OS_LOG_TYPE_DEFAULT, fmt, ##__VA_ARGS__)
|
||||
# define ASLogInfo(fmt, ...) ASLog(OS_LOG_TYPE_INFO, fmt, ##__VA_ARGS__)
|
||||
# define ASLogDebug(fmt, ...) ASLog(OS_LOG_TYPE_DEBUG, fmt, ##__VA_ARGS__)
|
||||
# define ASLogTmp(fmt, ...) ASLog(OS_LOG_TYPE_DEFAULT, fmt, ##__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
||||
+19
-3
@@ -124,7 +124,7 @@ NSString *MMRendererKey = @"MMRenderer";
|
||||
// Vim find pasteboard type (string contains Vim regex patterns)
|
||||
NSString *VimFindPboardType = @"VimFindPboardType";
|
||||
|
||||
int ASLogLevel = ASL_LEVEL_NOTICE;
|
||||
int ASLogLevel = MM_ASL_LEVEL_DEFAULT;
|
||||
|
||||
|
||||
|
||||
@@ -378,12 +378,27 @@ ASLInit()
|
||||
if (logLevelObj) {
|
||||
int logLevel = [logLevelObj intValue];
|
||||
if (logLevel < 0) logLevel = 0;
|
||||
#if defined(MM_USE_ASL)
|
||||
if (logLevel > ASL_LEVEL_DEBUG) logLevel = ASL_LEVEL_DEBUG;
|
||||
|
||||
ASLogLevel = logLevel;
|
||||
asl_set_filter(NULL, ASL_FILTER_MASK_UPTO(logLevel));
|
||||
#else
|
||||
switch (logLevel) {
|
||||
case 0: case 1: case 2:
|
||||
logLevel = OS_LOG_TYPE_FAULT; break;
|
||||
case 3:
|
||||
logLevel = OS_LOG_TYPE_ERROR; break;
|
||||
case 4: case 5:
|
||||
logLevel = OS_LOG_TYPE_DEFAULT; break;
|
||||
case 6:
|
||||
logLevel = OS_LOG_TYPE_INFO; break;
|
||||
default:
|
||||
logLevel = OS_LOG_TYPE_DEBUG; break;
|
||||
}
|
||||
#endif
|
||||
ASLogLevel = logLevel;
|
||||
}
|
||||
|
||||
#if defined(MM_USE_ASL)
|
||||
// Allow for changing whether a copy of each log should be sent to stderr
|
||||
// (this defaults to NO if this key is missing in the user defaults
|
||||
// database). The above filter mask is applied to logs going to stderr,
|
||||
@@ -391,4 +406,5 @@ ASLInit()
|
||||
BOOL logToStdErr = [ud boolForKey:MMLogToStdErrKey];
|
||||
if (logToStdErr)
|
||||
asl_add_log_file(NULL, 2); // The file descriptor for stderr is 2
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
52A364761C4A57C1005757EC /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 52A364721C4A5789005757EC /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
52B7ED9B1C4A4D6900AFFF15 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 52B7ED9A1C4A4D6900AFFF15 /* dsa_pub.pem */; };
|
||||
52818B031C1C08CE00F59085 /* QLStephen.qlgenerator in Copy QuickLookPlugin */ = {isa = PBXBuildFile; fileRef = 52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
528DA66A1426D4F9003380F1 /* macvim-askpass in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 528DA6691426D4EB003380F1 /* macvim-askpass */; };
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
@@ -153,6 +154,17 @@
|
||||
name = "Copy QuickLookPlugin";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
528DA6671426D456003380F1 /* Copy Scripts */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 6;
|
||||
files = (
|
||||
528DA66A1426D4F9003380F1 /* macvim-askpass in Copy Scripts */,
|
||||
);
|
||||
name = "Copy Scripts";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -237,6 +249,7 @@
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
32CA4F630368D1EE00C91783 /* MacVim_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacVim_Prefix.pch; sourceTree = "<group>"; };
|
||||
52818AFA1C1C075300F59085 /* QuickLookStephen.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = QuickLookStephen.xcodeproj; path = qlstephen/QuickLookStephen.xcodeproj; sourceTree = "<group>"; };
|
||||
528DA6691426D4EB003380F1 /* macvim-askpass */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "macvim-askpass"; sourceTree = "<group>"; };
|
||||
52A364721C4A5789005757EC /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
|
||||
52B7ED9A1C4A4D6900AFFF15 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
@@ -454,6 +467,14 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
528DA6681426D477003380F1 /* Scripts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
528DA6691426D4EB003380F1 /* macvim-askpass */,
|
||||
);
|
||||
name = Scripts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -469,6 +490,7 @@
|
||||
52818B021C1C088000F59085 /* Copy QuickLookPlugin */,
|
||||
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */,
|
||||
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */,
|
||||
528DA6671426D456003380F1 /* Copy Scripts */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
||||
@@ -260,7 +260,7 @@ showHiddenFilesView()
|
||||
[button setAction:@selector(hiddenFilesButtonToggled:)];
|
||||
|
||||
// Use the regular control size (checkbox is a bit smaller without this)
|
||||
NSControlSize buttonSize = NSRegularControlSize;
|
||||
NSControlSize buttonSize = NSControlSizeRegular;
|
||||
float fontSize = [NSFont systemFontSizeForControlSize:buttonSize];
|
||||
NSCell *theCell = [button cell];
|
||||
NSFont *theFont = [NSFont fontWithName:[[theCell font] fontName]
|
||||
|
||||
@@ -303,7 +303,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
if (!truncatingTailParagraphStyle) {
|
||||
truncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[truncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
|
||||
[truncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[truncatingTailParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:truncatingTailParagraphStyle range:range];
|
||||
|
||||
@@ -356,7 +356,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
// rollover
|
||||
if ([cell isHighlighted]) {
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(aRect, NSCompositingOperationSourceAtop);
|
||||
}
|
||||
|
||||
aRect.origin.x -= 1;
|
||||
@@ -393,7 +393,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
if ([cell closeButtonPressed]) closeButton = metalCloseButtonDown;
|
||||
|
||||
closeButtonSize = [closeButton size];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
|
||||
// scoot label over
|
||||
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
|
||||
@@ -462,7 +462,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
{
|
||||
MyNSDrawWindowBackground(rect);
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
|
||||
NSRectFillUsingOperation(rect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(rect, NSCompositingOperationSourceAtop);
|
||||
[[NSColor darkGrayColor] set];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+0.5)];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+rect.size.height-0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+rect.size.height-0.5)];
|
||||
@@ -479,7 +479,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[centeredParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
NSMidY(bounds) - (imageSize.height * 0.5f));
|
||||
[image drawAtPoint:drawPoint
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0f];
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
{
|
||||
if(_isPlaceholder){
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
|
||||
NSRectFillUsingOperation(cellFrame, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(cellFrame, NSCompositingOperationSourceAtop);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
[image addRepresentation:rep];
|
||||
NSImage *returnImage = [[[NSImage alloc] initWithSize:[rep size]] autorelease];
|
||||
[returnImage lockFocus];
|
||||
[image drawAtPoint:NSMakePoint(0.0, 0.0) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.7];
|
||||
[image drawAtPoint:NSMakePoint(0.0, 0.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:0.7];
|
||||
[returnImage unlockFocus];
|
||||
if(![[self indicator] isHidden]){
|
||||
NSImage *pi = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"pi"]];
|
||||
@@ -352,7 +352,7 @@
|
||||
NSPoint indicatorPoint = NSMakePoint([self frame].size.width - MARGIN_X - kPSMTabBarIndicatorWidth, MARGIN_Y);
|
||||
if(([self state] == NSOnState) && ([[_controlView styleName] isEqualToString:@"Metal"]))
|
||||
indicatorPoint.y += 1.0;
|
||||
[pi drawAtPoint:indicatorPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.7];
|
||||
[pi drawAtPoint:indicatorPoint fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:0.7];
|
||||
[returnImage unlockFocus];
|
||||
[pi release];
|
||||
}
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_12) || \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
# define NSCompositingOperationSourceOver NSCompositeSourceOver
|
||||
# define NSCompositingOperationSourceAtop NSCompositeSourceAtop
|
||||
# define NSTextAlignmentCenter NSCenterTextAlignment
|
||||
#endif
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
# define kPSMTabBarControlHeight 25
|
||||
#else
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
if ([cell isHighlighted])
|
||||
{
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(aRect, NSCompositingOperationSourceAtop);
|
||||
}
|
||||
|
||||
// frame
|
||||
@@ -389,7 +389,7 @@
|
||||
if ([cell closeButtonPressed]) closeButton = unifiedCloseButtonDown;
|
||||
|
||||
closeButtonSize = [closeButton size];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
|
||||
// scoot label over
|
||||
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
|
||||
@@ -473,7 +473,7 @@
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[centeredParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
|
||||
@@ -308,7 +308,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
if (!truncatingTailParagraphStyle) {
|
||||
truncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[truncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingHead];
|
||||
[truncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[truncatingTailParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:truncatingTailParagraphStyle range:range];
|
||||
|
||||
@@ -353,7 +353,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
aRect.origin.x += 0.5;
|
||||
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(aRect, NSCompositingOperationSourceAtop);
|
||||
|
||||
// frame
|
||||
[lineColor set];
|
||||
@@ -385,7 +385,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
if ([cell closeButtonPressed]) button = closeButtonDown;
|
||||
|
||||
closeButtonSize = [button size];
|
||||
[button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
[button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
}
|
||||
|
||||
// object counter
|
||||
@@ -432,7 +432,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
YosemiteNSDrawWindowBackground(rect, [self backgroundColor:isKeyWindow]);
|
||||
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.0] set];
|
||||
NSRectFillUsingOperation(rect, NSCompositeSourceAtop);
|
||||
NSRectFillUsingOperation(rect, NSCompositingOperationSourceAtop);
|
||||
[[self borderColor] set];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+0.5)];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+rect.size.height-0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+rect.size.height-0.5)];
|
||||
@@ -449,7 +449,7 @@ void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
[centeredParagraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
|
||||
@@ -1507,9 +1507,9 @@ gui_mch_dialog(
|
||||
// Ensure no data is on the output queue before presenting the dialog.
|
||||
gui_macvim_force_flush();
|
||||
|
||||
int style = NSInformationalAlertStyle;
|
||||
if (VIM_WARNING == type) style = NSWarningAlertStyle;
|
||||
else if (VIM_ERROR == type) style = NSCriticalAlertStyle;
|
||||
int style = NSAlertStyleInformational;
|
||||
if (VIM_WARNING == type) style = NSAlertStyleWarning;
|
||||
else if (VIM_ERROR == type) style = NSAlertStyleCritical;
|
||||
|
||||
NSMutableDictionary *attr = [NSMutableDictionary
|
||||
dictionaryWithObject:[NSNumber numberWithInt:style]
|
||||
@@ -2247,13 +2247,13 @@ static int vimModMaskToEventModifierFlags(int mods)
|
||||
int flags = 0;
|
||||
|
||||
if (mods & MOD_MASK_SHIFT)
|
||||
flags |= NSShiftKeyMask;
|
||||
flags |= NSEventModifierFlagShift;
|
||||
if (mods & MOD_MASK_CTRL)
|
||||
flags |= NSControlKeyMask;
|
||||
flags |= NSEventModifierFlagControl;
|
||||
if (mods & MOD_MASK_ALT)
|
||||
flags |= NSAlternateKeyMask;
|
||||
flags |= NSEventModifierFlagOption;
|
||||
if (mods & MOD_MASK_CMD)
|
||||
flags |= NSCommandKeyMask;
|
||||
flags |= NSEventModifierFlagCommand;
|
||||
|
||||
return flags;
|
||||
}
|
||||
@@ -2263,7 +2263,7 @@ static int vimModMaskToEventModifierFlags(int mods)
|
||||
// -- Channel Support ------------------------------------------------------
|
||||
|
||||
void *
|
||||
gui_macvim_add_channel(channel_T *channel, int part)
|
||||
gui_macvim_add_channel(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
dispatch_source_t s =
|
||||
dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,
|
||||
|
||||
@@ -37,6 +37,10 @@ set guitablabel=%M%t
|
||||
" that is generated by :hardcopy.
|
||||
set printexpr=system('open\ -a\ Preview\ '.v:fname_in)\ +\ v:shell_error
|
||||
|
||||
" askpass
|
||||
let $SSH_ASKPASS = simplify($VIM . '/../../MacOS') . '/macvim-askpass'
|
||||
let $SUDO_ASKPASS = $SSH_ASKPASS
|
||||
|
||||
|
||||
" This is so that HIG Cmd and Option movement mappings can be disabled by
|
||||
" adding the line
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#! /bin/sh
|
||||
|
||||
#
|
||||
# An SSH_ASKPASS command for MacOS X
|
||||
#
|
||||
# Author: Joseph Mocker, Sun Microsystems
|
||||
#
|
||||
# http://blog.retep.org/2009/04/09/ssh-askpass-on-osx-10-5/
|
||||
|
||||
#
|
||||
# To use this script:
|
||||
# setenv SSH_ASKPASS "macos-askpass"
|
||||
# setenv DISPLAY ":0"
|
||||
#
|
||||
|
||||
TITLE=${MACOS_ASKPASS_TITLE:-"SSH"}
|
||||
|
||||
DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
|
||||
DIALOG="$DIALOG with icon caution with hidden answer"
|
||||
|
||||
result=`osascript -e 'tell application "Finder"' -e "activate" -e "$DIALOG" -e "text returned of result" -e 'end tell'`
|
||||
osascript -e 'tell application "MacVim"' -e "activate" -e 'end tell'
|
||||
|
||||
if [ "$result" = "" ]; then
|
||||
exit 1
|
||||
else
|
||||
echo "$result"
|
||||
exit 0
|
||||
fi
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#import "QLSFileAttributes.h"
|
||||
|
||||
#define DEFAULT_MAX_FILE_SIZE 1024 * 100
|
||||
|
||||
// Generate a preview for the document with the given url
|
||||
OSStatus GeneratePreviewForURL(void *thisInterface,
|
||||
@@ -40,6 +41,38 @@ OSStatus GeneratePreviewForURL(void *thisInterface,
|
||||
(NSString *)kQLPreviewPropertyHeightKey : @800
|
||||
};
|
||||
|
||||
// Get size of current File
|
||||
NSFileManager *man = [NSFileManager defaultManager];
|
||||
NSURL *file_url = (__bridge NSURL *)(url);
|
||||
NSDictionary *attrs = [man attributesOfItemAtPath: [file_url path] error: NULL];
|
||||
|
||||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
// the plugin is running as com.apple.quicklook.satellite therefore we need to load our own settings
|
||||
NSDictionary *defaults = [userDefaults persistentDomainForName:@"com.whomwah.quicklookstephen"];
|
||||
|
||||
long long maxFileSizeSetting = [[defaults valueForKey:@"maxFileSize"] longLongValue];
|
||||
unsigned long long maxFileSize = DEFAULT_MAX_FILE_SIZE;
|
||||
if(maxFileSizeSetting > 0) {
|
||||
maxFileSize = maxFileSizeSetting;
|
||||
}
|
||||
|
||||
// Display less data, if file is too big
|
||||
if(attrs.fileSize > maxFileSize) {
|
||||
NSFileHandle *myFile= [NSFileHandle fileHandleForReadingAtPath:[file_url path]];
|
||||
if(!myFile) {
|
||||
return noErr;
|
||||
}
|
||||
NSData *displayData = [myFile readDataOfLength:maxFileSize];
|
||||
[myFile closeFile];
|
||||
|
||||
QLPreviewRequestSetDataRepresentation(
|
||||
request,
|
||||
(__bridge CFDataRef)displayData,
|
||||
kUTTypePlainText,
|
||||
(__bridge CFDictionaryRef)previewProperties);
|
||||
return noErr;
|
||||
}
|
||||
QLPreviewRequestSetURLRepresentation(
|
||||
request,
|
||||
url,
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
#include <QuickLook/QuickLook.h>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RegexKitLite.h"
|
||||
|
||||
#import "QLSFileAttributes.h"
|
||||
|
||||
|
||||
/**
|
||||
* This dictionary is used for a file with no extension. It maps the MIME type
|
||||
* (as returned by file(1)) onto an appropriate thumbnail badge.
|
||||
@@ -72,10 +70,11 @@ static NSString *ThumbnailBadgeForItemWithAttributes(
|
||||
// Does the filename match a known pattern? If so, use the appropriate badge.
|
||||
if (!badge && [fileExtension isEqualToString:@""]) {
|
||||
NSDictionary *map = filenameRegexToBadgeMap();
|
||||
|
||||
[map enumerateKeysAndObjectsUsingBlock:
|
||||
^(NSString *regex, NSString *candidateBadge, BOOL *stop) {
|
||||
if ([fileName rkl_isMatchedByRegex:regex]) {
|
||||
^(NSString *pattern, NSString *candidateBadge, BOOL *stop) {
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:nil];
|
||||
NSRange range = [regex rangeOfFirstMatchInString:fileName options:0 range:NSMakeRange(0, fileName.length)];
|
||||
if (range.location != NSNotFound) {
|
||||
badge = candidateBadge;
|
||||
*stop = true;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
<key>CFBundleName</key>
|
||||
<string>QLStephen</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.4</string>
|
||||
<string>1.44</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.4.2</string>
|
||||
<string>1.4.4</string>
|
||||
<key>CFPlugInDynamicRegisterFunction</key>
|
||||
<string></string>
|
||||
<key>CFPlugInDynamicRegistration</key>
|
||||
@@ -54,7 +54,7 @@
|
||||
<key>CFPlugInUnloadFunction</key>
|
||||
<string></string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2013 Duncan Robertson. All rights reserved.</string>
|
||||
<string>Copyright © 2016 Duncan Robertson. All rights reserved.</string>
|
||||
<key>QLNeedsToBeRunInMainThread</key>
|
||||
<true/>
|
||||
<key>QLPreviewHeight</key>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
#import "QLSFileAttributes.h"
|
||||
#import "RegexKitLite.h"
|
||||
|
||||
@interface QLSFileAttributes ()
|
||||
|
||||
@@ -19,18 +18,22 @@
|
||||
|
||||
@implementation QLSFileAttributes
|
||||
|
||||
+ (instancetype)attributesForItemAtURL:(NSURL *)aURL
|
||||
{
|
||||
NSString *magicString = [self magicStringForItemAtURL:aURL];
|
||||
+ (instancetype)attributesForItemAtURL:(NSURL *)aURL {
|
||||
if ([aURL.lastPathComponent isEqualToString:@".DS_Store"]) {
|
||||
NSLog(@"Ignore the .DS_Store file.");
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSString *magicString = [self magicStringForItemAtURL:aURL usingLcALL:@"en_US.UTF-8"];
|
||||
if (!magicString) magicString = [self magicStringForItemAtURL:aURL usingLcALL:@"C"];
|
||||
if (!magicString) return nil;
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"(\\S+/\\S+); charset=(\\S+)" options:0 error:nil];
|
||||
NSTextCheckingResult *match = [regex firstMatchInString:magicString options:0 range:NSMakeRange(0, magicString.length)];
|
||||
|
||||
NSArray *matches = [magicString rkl_captureComponentsMatchedByRegex:
|
||||
@"(\\S+/\\S+); charset=(\\S+)"];
|
||||
if (!match) return nil;
|
||||
|
||||
if (![matches count]) return nil;
|
||||
|
||||
NSString *mimeType = matches[1];
|
||||
NSString *charset = matches[2];
|
||||
NSString *mimeType = [magicString substringWithRange:[match rangeAtIndex:1]];
|
||||
NSString *charset = [magicString substringWithRange:[match rangeAtIndex:2]];
|
||||
|
||||
BOOL mimeTypeIsTextual = [self mimeTypeIsTextual:mimeType];
|
||||
|
||||
@@ -50,14 +53,13 @@
|
||||
// Private Methods
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+ (NSString *)magicStringForItemAtURL:(NSURL *)aURL
|
||||
{
|
||||
+ (NSString *)magicStringForItemAtURL:(NSURL *)aURL usingLcALL:(NSString *)lcALL {
|
||||
NSString *path = [aURL path];
|
||||
NSParameterAssert(path);
|
||||
|
||||
NSMutableDictionary *environment =
|
||||
[NSProcessInfo.processInfo.environment mutableCopy];
|
||||
environment[@"LC_ALL"] = @"en_US.UTF-8";
|
||||
environment[@"LC_ALL"] = lcALL;
|
||||
|
||||
NSTask *task = [NSTask new];
|
||||
task.launchPath = @"/usr/bin/file";
|
||||
@@ -94,8 +96,7 @@
|
||||
* @return YES if mimeType contains "text", or if the mime type conforms to the
|
||||
* public.text UTI.
|
||||
*/
|
||||
+ (BOOL)mimeTypeIsTextual:(NSString *)mimeType
|
||||
{
|
||||
+ (BOOL)mimeTypeIsTextual:(NSString *)mimeType {
|
||||
NSArray *components = [mimeType componentsSeparatedByString:@"/"];
|
||||
if (components.count != 2)
|
||||
return NO;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0107ABFF15C76F2900C65F1A /* QLSFileAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 0107ABFD15C76F2900C65F1A /* QLSFileAttributes.m */; };
|
||||
0149EB3B15F2E8E4003AB298 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 0149EB3915F2E8E4003AB298 /* RegexKitLite.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
0149EB3E15F2E9A3003AB298 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0149EB3D15F2E9A3003AB298 /* libicucore.dylib */; };
|
||||
2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */; };
|
||||
61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */; };
|
||||
@@ -23,9 +22,7 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0107ABFC15C76F2900C65F1A /* QLSFileAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QLSFileAttributes.h; sourceTree = "<group>"; };
|
||||
0107ABFD15C76F2900C65F1A /* QLSFileAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QLSFileAttributes.m; sourceTree = "<group>"; };
|
||||
0149EB3815F2E8E4003AB298 /* RegexKitLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegexKitLite.h; sourceTree = "<group>"; };
|
||||
0149EB3915F2E8E4003AB298 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = "<group>"; };
|
||||
0107ABFD15C76F2900C65F1A /* QLSFileAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = QLSFileAttributes.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
|
||||
0149EB3D15F2E9A3003AB298 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
08FB77B6FE84183AC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
@@ -57,19 +54,9 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0149EB3F15F2EC37003AB298 /* Third-Party */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0149EB3815F2E8E4003AB298 /* RegexKitLite.h */,
|
||||
0149EB3915F2E8E4003AB298 /* RegexKitLite.m */,
|
||||
);
|
||||
name = "Third-Party";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C166AFE841209C02AAC07 /* QuickLookStephen */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0149EB3F15F2EC37003AB298 /* Third-Party */,
|
||||
08FB77AFFE84173DC02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
|
||||
@@ -130,6 +117,7 @@
|
||||
8D57630F048677EA00EA77CD /* Resources */,
|
||||
8D576311048677EA00EA77CD /* Sources */,
|
||||
8D576313048677EA00EA77CD /* Frameworks */,
|
||||
698210201CC62DD000504BBF /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -146,7 +134,7 @@
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0720;
|
||||
LastUpgradeCheck = 0730;
|
||||
};
|
||||
buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QuickLookStephen" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
@@ -175,6 +163,22 @@
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
698210201CC62DD000504BBF /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "qlmanage -r";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D576311048677EA00EA77CD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
@@ -184,7 +188,6 @@
|
||||
2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.m in Sources */,
|
||||
61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.m in Sources */,
|
||||
0107ABFF15C76F2900C65F1A /* QLSFileAttributes.m in Sources */,
|
||||
0149EB3B15F2E8E4003AB298 /* RegexKitLite.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -1,295 +0,0 @@
|
||||
//
|
||||
// RegexKitLite.h
|
||||
// http://regexkit.sourceforge.net/
|
||||
// Licensed under the terms of the BSD License, as specified below.
|
||||
//
|
||||
|
||||
/*
|
||||
Copyright (c) 2008-2010, John Engelhart
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the Zang Industries nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSError.h>
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import <Foundation/NSRange.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#endif // __OBJC__
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <TargetConditionals.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef REGEXKITLITE_VERSION_DEFINED
|
||||
#define REGEXKITLITE_VERSION_DEFINED
|
||||
|
||||
#define _RKL__STRINGIFY(b) #b
|
||||
#define _RKL_STRINGIFY(a) _RKL__STRINGIFY(a)
|
||||
#define _RKL_JOIN_VERSION(a,b) _RKL_STRINGIFY(a##.##b)
|
||||
#define _RKL_VERSION_STRING(a,b) _RKL_JOIN_VERSION(a,b)
|
||||
|
||||
#define REGEXKITLITE_VERSION_MAJOR 4
|
||||
#define REGEXKITLITE_VERSION_MINOR 0
|
||||
|
||||
#define REGEXKITLITE_VERSION_CSTRING _RKL_VERSION_STRING(REGEXKITLITE_VERSION_MAJOR, REGEXKITLITE_VERSION_MINOR)
|
||||
#define REGEXKITLITE_VERSION_NSSTRING @REGEXKITLITE_VERSION_CSTRING
|
||||
|
||||
#endif // REGEXKITLITE_VERSION_DEFINED
|
||||
|
||||
#if !defined(RKL_BLOCKS) && defined(NS_BLOCKS_AVAILABLE) && (NS_BLOCKS_AVAILABLE == 1)
|
||||
#define RKL_BLOCKS 1
|
||||
#endif
|
||||
|
||||
#if defined(RKL_BLOCKS) && (RKL_BLOCKS == 1)
|
||||
#define _RKL_BLOCKS_ENABLED 1
|
||||
#endif // defined(RKL_BLOCKS) && (RKL_BLOCKS == 1)
|
||||
|
||||
#if defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__)
|
||||
#warning RegexKitLite support for Blocks is enabled, but __BLOCKS__ is not defined. This compiler may not support Blocks, in which case the behavior is undefined. This will probably cause numerous compiler errors.
|
||||
#endif // defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__)
|
||||
|
||||
// For Mac OS X < 10.5.
|
||||
#ifndef NSINTEGER_DEFINED
|
||||
#define NSINTEGER_DEFINED
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
#define NSIntegerMin LONG_MIN
|
||||
#define NSIntegerMax LONG_MAX
|
||||
#define NSUIntegerMax ULONG_MAX
|
||||
#else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
#define NSIntegerMin INT_MIN
|
||||
#define NSIntegerMax INT_MAX
|
||||
#define NSUIntegerMax UINT_MAX
|
||||
#endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
#endif // NSINTEGER_DEFINED
|
||||
|
||||
#ifndef RKLREGEXOPTIONS_DEFINED
|
||||
#define RKLREGEXOPTIONS_DEFINED
|
||||
|
||||
// These must be identical to their ICU regex counterparts. See http://www.icu-project.org/userguide/regexp.html
|
||||
enum {
|
||||
RKLNoOptions = 0,
|
||||
RKLCaseless = 2,
|
||||
RKLComments = 4,
|
||||
RKLDotAll = 32,
|
||||
RKLMultiline = 8,
|
||||
RKLUnicodeWordBoundaries = 256
|
||||
};
|
||||
typedef uint32_t RKLRegexOptions; // This must be identical to the ICU 'flags' argument type.
|
||||
|
||||
#endif // RKLREGEXOPTIONS_DEFINED
|
||||
|
||||
#ifndef RKLREGEXENUMERATIONOPTIONS_DEFINED
|
||||
#define RKLREGEXENUMERATIONOPTIONS_DEFINED
|
||||
|
||||
enum {
|
||||
RKLRegexEnumerationNoOptions = 0UL,
|
||||
RKLRegexEnumerationCapturedStringsNotRequired = 1UL << 9,
|
||||
RKLRegexEnumerationReleaseStringReturnedByReplacementBlock = 1UL << 10,
|
||||
RKLRegexEnumerationFastCapturedStringsXXX = 1UL << 11,
|
||||
};
|
||||
typedef NSUInteger RKLRegexEnumerationOptions;
|
||||
|
||||
#endif // RKLREGEXENUMERATIONOPTIONS_DEFINED
|
||||
|
||||
#ifndef _REGEXKITLITE_H_
|
||||
#define _REGEXKITLITE_H_
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465)
|
||||
#define RKL_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
||||
#else
|
||||
#define RKL_DEPRECATED_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
#if defined(NS_REQUIRES_NIL_TERMINATION)
|
||||
#define RKL_REQUIRES_NIL_TERMINATION NS_REQUIRES_NIL_TERMINATION
|
||||
#else // defined(NS_REQUIRES_NIL_TERMINATION)
|
||||
#define RKL_REQUIRES_NIL_TERMINATION
|
||||
#endif // defined(NS_REQUIRES_NIL_TERMINATION)
|
||||
|
||||
// This requires a few levels of rewriting to get the desired results.
|
||||
#define _RKL_CONCAT_2(c,d) c ## d
|
||||
#define _RKL_CONCAT(a,b) _RKL_CONCAT_2(a,b)
|
||||
|
||||
#ifdef RKL_PREPEND_TO_METHODS
|
||||
#define RKL_METHOD_PREPEND(x) _RKL_CONCAT(RKL_PREPEND_TO_METHODS, x)
|
||||
#else // RKL_PREPEND_TO_METHODS
|
||||
#define RKL_METHOD_PREPEND(x) x
|
||||
#endif // RKL_PREPEND_TO_METHODS
|
||||
|
||||
// If it looks like low memory notifications might be available, add code to register and respond to them.
|
||||
// This is (should be) harmless if it turns out that this isn't the case, since the notification that we register for,
|
||||
// UIApplicationDidReceiveMemoryWarningNotification, is dynamically looked up via dlsym().
|
||||
#if ((defined(TARGET_OS_EMBEDDED) && (TARGET_OS_EMBEDDED != 0)) || (defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE != 0))) && (!defined(RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS) || (RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS != 0))
|
||||
#define RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS 1
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
// NSException exception name.
|
||||
extern NSString * const RKLICURegexException;
|
||||
|
||||
// NSError error domains and user info keys.
|
||||
extern NSString * const RKLICURegexErrorDomain;
|
||||
|
||||
extern NSString * const RKLICURegexEnumerationOptionsErrorKey;
|
||||
extern NSString * const RKLICURegexErrorCodeErrorKey;
|
||||
extern NSString * const RKLICURegexErrorNameErrorKey;
|
||||
extern NSString * const RKLICURegexLineErrorKey;
|
||||
extern NSString * const RKLICURegexOffsetErrorKey;
|
||||
extern NSString * const RKLICURegexPreContextErrorKey;
|
||||
extern NSString * const RKLICURegexPostContextErrorKey;
|
||||
extern NSString * const RKLICURegexRegexErrorKey;
|
||||
extern NSString * const RKLICURegexRegexOptionsErrorKey;
|
||||
extern NSString * const RKLICURegexReplacedCountErrorKey;
|
||||
extern NSString * const RKLICURegexReplacedStringErrorKey;
|
||||
extern NSString * const RKLICURegexReplacementStringErrorKey;
|
||||
extern NSString * const RKLICURegexSubjectRangeErrorKey;
|
||||
extern NSString * const RKLICURegexSubjectStringErrorKey;
|
||||
|
||||
@interface NSString (RegexKitLiteAdditions)
|
||||
|
||||
+ (void)RKL_METHOD_PREPEND(clearStringCache);
|
||||
|
||||
// Although these are marked as deprecated, a bug in GCC prevents a warning from being issues for + class methods. Filed bug with Apple, #6736857.
|
||||
+ (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex RKL_DEPRECATED_ATTRIBUTE;
|
||||
+ (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex options:(RKLRegexOptions)options error:(NSError **)error RKL_DEPRECATED_ATTRIBUTE;
|
||||
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex range:(NSRange)range;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error;
|
||||
|
||||
- (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex;
|
||||
- (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex inRange:(NSRange)range;
|
||||
- (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error;
|
||||
|
||||
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex;
|
||||
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex capture:(NSInteger)capture;
|
||||
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex inRange:(NSRange)range;
|
||||
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error;
|
||||
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex;
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex capture:(NSInteger)capture;
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex inRange:(NSRange)range;
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error;
|
||||
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement;
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange;
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error;
|
||||
|
||||
//// >= 3.0
|
||||
|
||||
- (NSInteger)RKL_METHOD_PREPEND(captureCount);
|
||||
- (NSInteger)RKL_METHOD_PREPEND(captureCountWithOptions):(RKLRegexOptions)options error:(NSError **)error;
|
||||
|
||||
- (BOOL)RKL_METHOD_PREPEND(isRegexValid);
|
||||
- (BOOL)RKL_METHOD_PREPEND(isRegexValidWithOptions):(RKLRegexOptions)options error:(NSError **)error;
|
||||
|
||||
- (void)RKL_METHOD_PREPEND(flushCachedRegexData);
|
||||
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex capture:(NSInteger)capture;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex range:(NSRange)range;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range capture:(NSInteger)capture error:(NSError **)error;
|
||||
|
||||
|
||||
- (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error;
|
||||
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error;
|
||||
|
||||
//// >= 4.0
|
||||
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList;
|
||||
|
||||
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count;
|
||||
|
||||
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
|
||||
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
|
||||
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
|
||||
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList;
|
||||
|
||||
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count;
|
||||
|
||||
#ifdef _RKL_BLOCKS_ENABLED
|
||||
|
||||
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
|
||||
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
|
||||
#endif // _RKL_BLOCKS_ENABLED
|
||||
|
||||
@end
|
||||
|
||||
@interface NSMutableString (RegexKitLiteAdditions)
|
||||
|
||||
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement;
|
||||
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange;
|
||||
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error;
|
||||
|
||||
//// >= 4.0
|
||||
|
||||
#ifdef _RKL_BLOCKS_ENABLED
|
||||
|
||||
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
|
||||
|
||||
#endif // _RKL_BLOCKS_ENABLED
|
||||
|
||||
@end
|
||||
|
||||
#endif // __OBJC__
|
||||
|
||||
#endif // _REGEXKITLITE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
+7
-13
@@ -1,7 +1,7 @@
|
||||
# Makefile for Vim on Win32 (Windows NT/2000/XP/2003 and Windows 95/98/Me)
|
||||
# and Win64, using the Microsoft Visual C++ compilers. Known to work with
|
||||
# VC5, VC6 (VS98), VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005),
|
||||
# VC9 (VS2008), VC10 (VS2010) and VC11 (VS2012)
|
||||
# Makefile for Vim on Win32 (Windows XP/2003/Vista/7/8/10) and Win64,
|
||||
# using the Microsoft Visual C++ compilers. Known to work with VC5, VC6 (VS98),
|
||||
# VC7.0 (VS2002), VC7.1 (VS2003), VC8 (VS2005), VC9 (VS2008), VC10 (VS2010),
|
||||
# VC11 (VS2012), VC12 (VS2013) and VC14 (VS2015)
|
||||
#
|
||||
# To build using other Windows compilers, see INSTALLpc.txt
|
||||
#
|
||||
@@ -119,7 +119,7 @@
|
||||
# yes: Write a normal mapfile.
|
||||
# lines: Write a mapfile with line numbers (only for VC6 and later)
|
||||
#
|
||||
# Static Code Analysis: ANALYZE=yes (works with VS2012 only)
|
||||
# Static Code Analysis: ANALYZE=yes (works with VS2012 or later)
|
||||
#
|
||||
# You can combine any of these interfaces
|
||||
#
|
||||
@@ -162,9 +162,9 @@
|
||||
# you can set DEFINES on the command line, e.g.,
|
||||
# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
|
||||
|
||||
# Build on both Windows NT/XP and Windows 9x
|
||||
# Build on Windows NT/XP
|
||||
|
||||
TARGETOS = BOTH
|
||||
TARGETOS = WINNT
|
||||
|
||||
# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
|
||||
# interfaces.
|
||||
@@ -436,13 +436,7 @@ CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
|
||||
#>>>>> end of choices
|
||||
###########################################################################
|
||||
|
||||
!ifdef OS
|
||||
OS_TYPE = winnt
|
||||
DEL_TREE = rmdir /s /q
|
||||
!else
|
||||
OS_TYPE = win95
|
||||
DEL_TREE = deltree /y
|
||||
!endif
|
||||
|
||||
INTDIR=$(OBJDIR)
|
||||
OUTDIR=$(OBJDIR)
|
||||
|
||||
+4
-2
@@ -2045,7 +2045,6 @@ test1 \
|
||||
test_breakindent \
|
||||
test_changelist \
|
||||
test_close_count \
|
||||
test_command_count \
|
||||
test_comparators \
|
||||
test_erasebackword \
|
||||
test_eval \
|
||||
@@ -2065,7 +2064,7 @@ test1 \
|
||||
test40 test41 test42 test43 test44 test45 test48 test49 \
|
||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
||||
test60 test64 test65 test66 test67 test68 test69 \
|
||||
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
|
||||
test70 test72 test73 test74 test75 test77 test78 test79 \
|
||||
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
||||
test100 test101 test103 test104 test107 test108:
|
||||
@@ -2083,6 +2082,8 @@ test_arglist \
|
||||
test_channel \
|
||||
test_charsearch \
|
||||
test_cmdline \
|
||||
test_command_count \
|
||||
test_crypt \
|
||||
test_cscope \
|
||||
test_cursor_func \
|
||||
test_delete \
|
||||
@@ -2097,6 +2098,7 @@ test_arglist \
|
||||
test_farsi \
|
||||
test_feedkeys \
|
||||
test_file_perm \
|
||||
test_fileformat \
|
||||
test_filter_cmd \
|
||||
test_filter_map \
|
||||
test_fnameescape \
|
||||
|
||||
Vendored
+1
-1
@@ -12122,7 +12122,7 @@ for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
|
||||
usleep utime utimes
|
||||
do :
|
||||
|
||||
+240
-176
File diff suppressed because it is too large
Load Diff
@@ -190,6 +190,7 @@
|
||||
#undef HAVE_SIGSET
|
||||
#undef HAVE_SIGSETJMP
|
||||
#undef HAVE_SIGSTACK
|
||||
#undef HAVE_SIGPROCMASK
|
||||
#undef HAVE_SIGVEC
|
||||
#undef HAVE_SMACK
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
+1
-1
@@ -3677,7 +3677,7 @@ AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
|
||||
usleep utime utimes)
|
||||
AC_FUNC_FSEEKO
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user