mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.0072
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
|
*syntax.txt* For Vim version 7.0aa. Last change: 2005 May 18
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -1579,6 +1579,14 @@ $VIMRUNTIME/syntax/syntax.vim).
|
|||||||
mv_finance mv_logic mv_powseries
|
mv_finance mv_logic mv_powseries
|
||||||
|
|
||||||
|
|
||||||
|
MATHEMATICA *mma.vim* *mma-syntax* *mathematica-syntax*
|
||||||
|
|
||||||
|
Empty *.m files will automatically be presumed to be Matlab files unless you
|
||||||
|
have the following in your .vimrc: >
|
||||||
|
|
||||||
|
let filetype_m = "mma"
|
||||||
|
|
||||||
|
|
||||||
MOO *moo.vim* *moo-syntax*
|
MOO *moo.vim* *moo-syntax*
|
||||||
|
|
||||||
If you use C-style comments inside expressions and find it mangles your
|
If you use C-style comments inside expressions and find it mangles your
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Apr 24
|
*todo.txt* For Vim version 7.0aa. Last change: 2005 May 18
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -30,33 +30,46 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
|||||||
*known-bugs*
|
*known-bugs*
|
||||||
-------------------- Known bugs and current work -----------------------
|
-------------------- Known bugs and current work -----------------------
|
||||||
|
|
||||||
This doesn't work: "a[var1:var2]". Requires space before/after ':'. Can this
|
|
||||||
be fixed? Otherwise document it.
|
|
||||||
|
|
||||||
regmatch(): "regstack" could start with a fixed block of data for speed.
|
|
||||||
"backpos" is never freed. (Alexei Alexandrov)
|
|
||||||
|
|
||||||
Starting without any buffers, set nocp, ":b <Tab>" gives error message.
|
|
||||||
(Ciaran McCressh for Aron Griffis)
|
|
||||||
|
|
||||||
Problem with 'insertmode'. (Georg Dahn, 2005 April 9, expl. April 14)
|
Problem with 'insertmode'. (Georg Dahn, 2005 April 9, expl. April 14)
|
||||||
Problem with CTRL-V pasting more than one line. (Georg Dahn, 2005 April 11)
|
Problem with CTRL-V pasting more than one line. (Georg Dahn, 2005 April 11)
|
||||||
|
|
||||||
Patch for setqflist() (Yegappan Lakshmanan, 2005 April 11)
|
Patch for setqflist() (Yegappan Lakshmanan, 2005 April 11)
|
||||||
|
|
||||||
|
":help \=<Tab>" doesn't find "sub-replace-\=".
|
||||||
|
|
||||||
In an errorfile expand "~/" to home directory. (Arnout Engelen)
|
In an errorfile expand "~/" to home directory. (Arnout Engelen)
|
||||||
|
|
||||||
Patch for 2html.vim to disable folding (Michael Schaap, 2005 April 12)
|
Patch for 2html.vim to disable folding (Michael Schaap, 2005 April 12)
|
||||||
|
|
||||||
Win32: Alt-F10 no longer working? (Bill McCarthy, April 18)
|
Win32: Alt-F10 no longer working? (Bill McCarthy, April 18)
|
||||||
|
|
||||||
|
Patch for if_python to make exit work better with threads. (ugo)
|
||||||
|
|
||||||
With "wa" in 'formatoptions', backspace at start-of-line doesn't work. It
|
With "wa" in 'formatoptions', backspace at start-of-line doesn't work. It
|
||||||
should delete the space at the end of the previous line. (Alan Isaac)
|
should delete the space at the end of the previous line. (Alan Isaac)
|
||||||
|
|
||||||
|
GTK GUI: Running a script that does :vsp and :quit, causing the left scrollbar
|
||||||
|
to appear and disappear, causes resizing. (gvcolors.vim from Charles Campbell,
|
||||||
|
2005 April 25)
|
||||||
|
|
||||||
|
Problem with ":mksession" for "vim -o "+argdel *" prog1 prog2 prog3"
|
||||||
|
(Bill McCarthy, 2005 April 26)
|
||||||
|
|
||||||
|
getreg('=') returns the result of evaluating the expression. How to get the
|
||||||
|
expression itself, so that it can be restored? (David Fishburn) Perhaps use
|
||||||
|
getreg('=', 1). Also make setreg('=') work then.
|
||||||
|
|
||||||
|
Win32: With the taskbar at the top of the screen, scrolling doesn't redraw
|
||||||
|
properly. (Sergey Khorev, 2005 April 27)
|
||||||
|
|
||||||
Mac unicode patch (Da Woon Jung):
|
Mac unicode patch (Da Woon Jung):
|
||||||
- selecting proportional font breaks display
|
- selecting proportional font breaks display
|
||||||
- UTF-8 text causes display problems. Font replacement causes this.
|
- UTF-8 text causes display problems. Font replacement causes this.
|
||||||
|
|
||||||
|
When 'shortmess' is empty and 'keymap' set to accents, in Insert mode CTRL-N
|
||||||
|
may cause the hit-enter prompt. Typing 'a then doesn't result in the accented
|
||||||
|
character. (Ilya Dogolazky)
|
||||||
|
|
||||||
autoload:
|
autoload:
|
||||||
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
|
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
|
||||||
script names and a help file and produces a script that can be sourced to
|
script names and a help file and produces a script that can be sourced to
|
||||||
@@ -74,9 +87,17 @@ Win32: Balloon text can't contain line break.
|
|||||||
Add has("balloon_multiline")
|
Add has("balloon_multiline")
|
||||||
|
|
||||||
setline() should accept a List.
|
setline() should accept a List.
|
||||||
|
|
||||||
|
smsg() uses IObuff. The checks for the result not fitting are complicated,
|
||||||
|
find another solution. Add vsnprintf() and snprintf() functions?
|
||||||
|
http://www.ijs.si/software/snprintf/
|
||||||
|
|
||||||
Add ":[range]sort" command. Sort on specified field, using a regexp? Remove
|
Add ":[range]sort" command. Sort on specified field, using a regexp? Remove
|
||||||
duplicates?
|
duplicates?
|
||||||
|
|
||||||
|
Patch to alternate fold highlighting. (Anthony Iano-Fletcher, 2005 May 12)
|
||||||
|
More levels?
|
||||||
|
|
||||||
Awaiting response:
|
Awaiting response:
|
||||||
- Patch for mch_FullName() also in Vim 6.3? os_mswin.c
|
- Patch for mch_FullName() also in Vim 6.3? os_mswin.c
|
||||||
- Win32: tearoff menu window should have a scrollbar when it's taller than
|
- Win32: tearoff menu window should have a scrollbar when it's taller than
|
||||||
@@ -90,6 +111,8 @@ PLANNED FOR VERSION 7.0:
|
|||||||
|
|
||||||
- Add SPELLCHECKER, with support for many languages.
|
- Add SPELLCHECKER, with support for many languages.
|
||||||
- Use "engspchk" from Charles Campbell for ideas.
|
- Use "engspchk" from Charles Campbell for ideas.
|
||||||
|
- Is it worth trying the trie structure (see code from Olaf Seibert, 2005
|
||||||
|
May 9)
|
||||||
- Spell checking code todo's:
|
- Spell checking code todo's:
|
||||||
- Implement user and project word lists. Commands to add words and to
|
- Implement user and project word lists. Commands to add words and to
|
||||||
mark words as wrong.
|
mark words as wrong.
|
||||||
@@ -265,6 +288,9 @@ PLANNED FOR VERSION 7.0:
|
|||||||
|
|
||||||
Adjust src/main.aap for installing manpages like in Makefile.
|
Adjust src/main.aap for installing manpages like in Makefile.
|
||||||
|
|
||||||
|
Also generate the .pdb file that can be used to generate a useful crash report
|
||||||
|
on MS-Windows. (George Reilly)
|
||||||
|
|
||||||
Add strtol() to avoid the problems with leading zero causing octal conversion.
|
Add strtol() to avoid the problems with leading zero causing octal conversion.
|
||||||
|
|
||||||
Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
|
Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
|
||||||
@@ -323,8 +349,6 @@ Updated Ruby interface. (Ryan Paul)
|
|||||||
|
|
||||||
Awaiting updated patches:
|
Awaiting updated patches:
|
||||||
--- awaiting updated patch ---
|
--- awaiting updated patch ---
|
||||||
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar
|
|
||||||
15, but it doesn't use "initdir" or "dflt". (will update patch)
|
|
||||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||||
Aric Blumer has a patch for this.
|
Aric Blumer has a patch for this.
|
||||||
He will update the patch for 6.3.
|
He will update the patch for 6.3.
|
||||||
@@ -2104,6 +2128,7 @@ Autocommands:
|
|||||||
changing the buffer name.
|
changing the buffer name.
|
||||||
8 Add ScriptReadCmd event: used to load remote Vim scripts, e.g.
|
8 Add ScriptReadCmd event: used to load remote Vim scripts, e.g.
|
||||||
"vim -u http://mach/path/vimrc".
|
"vim -u http://mach/path/vimrc".
|
||||||
|
7 Add TagJump event: do something after jumping to a tag.
|
||||||
8 Use another option than 'updatetime' for the CursorHold event. The two
|
8 Use another option than 'updatetime' for the CursorHold event. The two
|
||||||
things are unrelated for the user (but the implementation is more
|
things are unrelated for the user (but the implementation is more
|
||||||
difficult).
|
difficult).
|
||||||
@@ -2786,7 +2811,7 @@ Searching:
|
|||||||
7 From xvim: Allow a newline in search patterns (also for :s, can delete
|
7 From xvim: Allow a newline in search patterns (also for :s, can delete
|
||||||
newline). Add BOW, EOW, NEWL, NLORANY, NLBUTANY, magic 'n' and 'r', etc.
|
newline). Add BOW, EOW, NEWL, NLORANY, NLBUTANY, magic 'n' and 'r', etc.
|
||||||
[not in xvim:] Add option to switch on matches crossing ONE line boundary.
|
[not in xvim:] Add option to switch on matches crossing ONE line boundary.
|
||||||
7 Add ":iselect", a combination of ":ilist" and ":tselect". (Aaron)
|
7 Add ":iselect", a combination of ":ilist" and ":tselect". (Aaron) (Zellner)
|
||||||
Also ":dselect".
|
Also ":dselect".
|
||||||
|
|
||||||
|
|
||||||
@@ -3334,8 +3359,6 @@ Various improvements:
|
|||||||
changes all together instead of for each command (e.g. for the rot13
|
changes all together instead of for each command (e.g. for the rot13
|
||||||
macro).
|
macro).
|
||||||
- Add command like "[I" that also shows the tree of included files.
|
- Add command like "[I" that also shows the tree of included files.
|
||||||
- Add command like ":ts" that shows the output of "[I" and asks for a match
|
|
||||||
to jump to. (Zellner)
|
|
||||||
- ":set sm^L" results in ":set s", because short names of options are also
|
- ":set sm^L" results in ":set s", because short names of options are also
|
||||||
expanded. Is there a better way to do this?
|
expanded. Is there a better way to do this?
|
||||||
- Add ":@!" command, to ":@" like what ":source!" is to ":source".
|
- Add ":@!" command, to ":@" like what ":source!" is to ":source".
|
||||||
|
@@ -400,13 +400,13 @@ N *+X11* Unix only: can restore window title |X11|
|
|||||||
:redi[r] @{a-zA-Z} Redirect messages to register {a-z}. Append to the
|
:redi[r] @{a-zA-Z} Redirect messages to register {a-z}. Append to the
|
||||||
contents of the register if its name is given
|
contents of the register if its name is given
|
||||||
uppercase {A-Z}. {not in Vi}
|
uppercase {A-Z}. {not in Vi}
|
||||||
:redi[r] @{a-z}> Append messages to register {a-z}. {not in Vi}
|
:redi[r] @{a-z}>> Append messages to register {a-z}. {not in Vi}
|
||||||
|
|
||||||
:redi[r] @* Redirect messages to the clipboard. {not in Vi}
|
:redi[r] @* Redirect messages to the clipboard. {not in Vi}
|
||||||
:redi[r] @*> Append messages to the clipboard. {not in Vi}
|
:redi[r] @*>> Append messages to the clipboard. {not in Vi}
|
||||||
|
|
||||||
:redi[r] @" Redirect messages to the unnamed register. {not in Vi}
|
:redi[r] @" Redirect messages to the unnamed register. {not in Vi}
|
||||||
:redi[r] @"> Append messages to the unnamed register. {not in Vi}
|
:redi[r] @">> Append messages to the unnamed register. {not in Vi}
|
||||||
|
|
||||||
:redi[r] => {var} Redirect messages to a variable. If the variable
|
:redi[r] => {var} Redirect messages to a variable. If the variable
|
||||||
doesn't exist, then it is created. If the variable
|
doesn't exist, then it is created. If the variable
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Apr 24
|
*version7.txt* For Vim version 7.0aa. Last change: 2005 May 18
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -619,6 +619,9 @@ window.
|
|||||||
|
|
||||||
Added the "%s" item to 'errorformat'. (Yegappan Lakshmanan)
|
Added the "%s" item to 'errorformat'. (Yegappan Lakshmanan)
|
||||||
|
|
||||||
|
GTK GUI: use the GTK file dialog when it's available. Mix from patches by
|
||||||
|
Grahame Bowland and Evan Webb.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
COMPILE TIME CHANGES *compile-changes-7*
|
COMPILE TIME CHANGES *compile-changes-7*
|
||||||
|
|
||||||
@@ -1059,4 +1062,10 @@ we find the same position again and advance one character.
|
|||||||
When in diff mode and making a change that causes the "changed" highlighting
|
When in diff mode and making a change that causes the "changed" highlighting
|
||||||
to disappear or reappear, it was still highlighted in another window.
|
to disappear or reappear, it was still highlighted in another window.
|
||||||
|
|
||||||
|
When a ":next" command fails because the user selects "Abort" at the ATTENTION
|
||||||
|
prompt the argument index was advanced anyway.
|
||||||
|
|
||||||
|
When "~" is in 'iskeyword' the "gd" doesn't work, it's used for the previous
|
||||||
|
substitute pattern. Put "\V" in the pattern to avoid that.
|
||||||
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2005 Apr 13
|
" Last Change: 2005 May 18
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
@@ -822,7 +822,11 @@ fun! s:FTm()
|
|||||||
endif
|
endif
|
||||||
let n = n + 1
|
let n = n + 1
|
||||||
endwhile
|
endwhile
|
||||||
setf matlab
|
if exists("g:filetype_m")
|
||||||
|
exe "setf " . g:filetype_m
|
||||||
|
else
|
||||||
|
setf matlab
|
||||||
|
endif
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" Maya Extension Language
|
" Maya Extension Language
|
||||||
@@ -1435,8 +1439,14 @@ au BufNewFile,BufRead *.il setf skill
|
|||||||
au BufNewFile,BufRead .slrnrc setf slrnrc
|
au BufNewFile,BufRead .slrnrc setf slrnrc
|
||||||
au BufNewFile,BufRead *.score setf slrnsc
|
au BufNewFile,BufRead *.score setf slrnsc
|
||||||
|
|
||||||
" Smalltalk
|
" Smalltalk (and TeX)
|
||||||
au BufNewFile,BufRead *.st,*.cls setf st
|
au BufNewFile,BufRead *.st setf st
|
||||||
|
au BufNewFile,BufRead *.cls
|
||||||
|
\ if getline(1) =~ '^%' |
|
||||||
|
\ setf tex |
|
||||||
|
\ else |
|
||||||
|
\ setf st |
|
||||||
|
\ endif
|
||||||
|
|
||||||
" Smarty templates
|
" Smarty templates
|
||||||
au BufNewFile,BufRead *.tpl setf smarty
|
au BufNewFile,BufRead *.tpl setf smarty
|
||||||
|
75
runtime/indent/mma.vim
Normal file
75
runtime/indent/mma.vim
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
" Vim indent file
|
||||||
|
" Language: Mathematica
|
||||||
|
" Author: steve layland <layland@wolfram.com>
|
||||||
|
" Last Change: Sat May 10 18:56:22 CDT 2005
|
||||||
|
" Source: http://vim.sourceforge.net/scripts/script.php?script_id=1274
|
||||||
|
" http://members.wolfram.com/layland/vim/indent/mma.vim
|
||||||
|
"
|
||||||
|
" NOTE:
|
||||||
|
" Empty .m files will automatically be presumed to be Matlab files
|
||||||
|
" unless you have the following in your .vimrc:
|
||||||
|
"
|
||||||
|
" let filetype_m="mma"
|
||||||
|
"
|
||||||
|
" Credits:
|
||||||
|
" o steve hacked this out of a random indent file in the Vim 6.1
|
||||||
|
" distribution that he no longer remembers...sh.vim? Thanks!
|
||||||
|
|
||||||
|
" Only load this indent file when no other was loaded.
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
setlocal indentexpr=GetMmaIndent()
|
||||||
|
setlocal indentkeys+=0[,0],0(,0)
|
||||||
|
setlocal nosi "turn off smart indent so we don't over analyze } blocks
|
||||||
|
|
||||||
|
if exists("*GetMmaIndent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
function GetMmaIndent()
|
||||||
|
|
||||||
|
" Hit the start of the file, use zero indent.
|
||||||
|
if v:lnum == 0
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Find a non-blank line above the current line.
|
||||||
|
let lnum = prevnonblank(v:lnum - 1)
|
||||||
|
|
||||||
|
" use indenting as a base
|
||||||
|
let ind = indent(v:lnum)
|
||||||
|
let lnum = v:lnum
|
||||||
|
|
||||||
|
" if previous line has an unmatched bracket, or ( indent.
|
||||||
|
" doesn't do multiple parens/blocks/etc...
|
||||||
|
|
||||||
|
" also, indent only if this line if this line isn't starting a new
|
||||||
|
" block... TODO - fix this with indentkeys?
|
||||||
|
if getline(v:lnum-1) =~ '\\\@<!\%(\[[^\]]*\|([^)]*\|{[^}]*\)$' && getline(v:lnum) !~ '\s\+[\[({]'
|
||||||
|
let ind = ind+&sw
|
||||||
|
endif
|
||||||
|
|
||||||
|
" if this line had unmatched closing block,
|
||||||
|
" indent to the matching opening block
|
||||||
|
if getline(v:lnum) =~ '[^[]*]\s*$'
|
||||||
|
" move to the closing bracket
|
||||||
|
call search(']','bW')
|
||||||
|
" and find it's partner's indent
|
||||||
|
let ind = indent(searchpair('\[','',']','bWn'))
|
||||||
|
" same for ( blocks
|
||||||
|
elseif getline(v:lnum) =~ '[^(]*)$'
|
||||||
|
call search(')','bW')
|
||||||
|
let ind = indent(searchpair('(','',')','bWn'))
|
||||||
|
|
||||||
|
" and finally, close { blocks if si ain't already set
|
||||||
|
elseif getline(v:lnum) =~ '[^{]*}'
|
||||||
|
call search('}','bW')
|
||||||
|
let ind = indent(searchpair('{','','}','bWn'))
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ind
|
||||||
|
endfunction
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
" Vim plugin for editing compressed files.
|
" Vim plugin for editing compressed files.
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2005 Mar 24
|
" Last Change: 2005 May 18
|
||||||
|
|
||||||
" Exit quickly when:
|
" Exit quickly when:
|
||||||
" - this plugin was already loaded
|
" - this plugin was already loaded
|
||||||
@@ -48,12 +48,41 @@ fun s:check(cmd)
|
|||||||
exe "return s:have_" . name
|
exe "return s:have_" . name
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
|
" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
|
||||||
|
" the flags in the compressed file.
|
||||||
|
" The only compression methods that can be detected are max speed (-1) and max
|
||||||
|
" compression (-9).
|
||||||
|
fun s:set_compression(line)
|
||||||
|
" get the Compression Method
|
||||||
|
let l:cm = char2nr(a:line[2])
|
||||||
|
" if it's 8 (DEFLATE), we can check for the compression level
|
||||||
|
if l:cm == 8
|
||||||
|
" get the eXtra FLags
|
||||||
|
let l:xfl = char2nr(a:line[8])
|
||||||
|
" max compression
|
||||||
|
if l:xfl == 2
|
||||||
|
let b:gzip_comp_arg = "-9"
|
||||||
|
" min compression
|
||||||
|
elseif l:xfl == 4
|
||||||
|
let b:gzip_comp_arg = "-1"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
|
||||||
" After reading compressed file: Uncompress text in buffer with "cmd"
|
" After reading compressed file: Uncompress text in buffer with "cmd"
|
||||||
fun s:read(cmd)
|
fun s:read(cmd)
|
||||||
" don't do anything if the cmd is not supported
|
" don't do anything if the cmd is not supported
|
||||||
if !s:check(a:cmd)
|
if !s:check(a:cmd)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" for gzip check current compression level and set b:gzip_comp_arg.
|
||||||
|
silent! unlet b:gzip_comp_arg
|
||||||
|
if a:cmd[0] == 'g'
|
||||||
|
call s:set_compression(getline(1))
|
||||||
|
endif
|
||||||
|
|
||||||
" make 'patchmode' empty, we don't want a copy of the written file
|
" make 'patchmode' empty, we don't want a copy of the written file
|
||||||
let pm_save = &pm
|
let pm_save = &pm
|
||||||
set pm=
|
set pm=
|
||||||
@@ -121,7 +150,11 @@ fun s:write(cmd)
|
|||||||
let nm = resolve(expand("<afile>"))
|
let nm = resolve(expand("<afile>"))
|
||||||
let nmt = s:tempname(nm)
|
let nmt = s:tempname(nm)
|
||||||
if rename(nm, nmt) == 0
|
if rename(nm, nmt) == 0
|
||||||
call system(a:cmd . " " . nmt)
|
if exists("b:gzip_comp_arg")
|
||||||
|
call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
|
||||||
|
else
|
||||||
|
call system(a:cmd . " " . nmt)
|
||||||
|
endif
|
||||||
call rename(nmt . "." . expand("<afile>:e"), nm)
|
call rename(nmt . "." . expand("<afile>:e"), nm)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -131,8 +164,15 @@ endfun
|
|||||||
fun s:appre(cmd)
|
fun s:appre(cmd)
|
||||||
" don't do anything if the cmd is not supported
|
" don't do anything if the cmd is not supported
|
||||||
if s:check(a:cmd)
|
if s:check(a:cmd)
|
||||||
" Rename to a weird name to avoid the risk of overwriting another file
|
|
||||||
let nm = expand("<afile>")
|
let nm = expand("<afile>")
|
||||||
|
|
||||||
|
" for gzip check current compression level and set b:gzip_comp_arg.
|
||||||
|
silent! unlet b:gzip_comp_arg
|
||||||
|
if a:cmd[0] == 'g'
|
||||||
|
call s:set_compression(readfile(nm, "b", 1)[0])
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Rename to a weird name to avoid the risk of overwriting another file
|
||||||
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
|
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
|
||||||
let nmte = nmt . "." . expand("<afile>:e")
|
let nmte = nmt . "." . expand("<afile>:e")
|
||||||
if rename(nm, nmte) == 0
|
if rename(nm, nmte) == 0
|
||||||
|
@@ -1,41 +1,229 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Mathematica
|
" Language: Mathematica
|
||||||
" Maintainer: Wolfgang Waltenberger <wwalten@ben.tuwien.ac.at>
|
" Maintainer: steve layland <layland@wolfram.com>
|
||||||
" Last Change: Thu 26 Apr 2001 13:20:03 CEST
|
" Last Change: Tue May 10 18:31:00 CDT 2005
|
||||||
|
" Source: http://vim.sourceforge.net/scripts/script.php?script_id=1273
|
||||||
|
" http://members.wri.com/layland/vim/syntax/mma.vim
|
||||||
|
"
|
||||||
|
" NOTE:
|
||||||
|
" Empty .m files will automatically be presumed as Matlab files
|
||||||
|
" unless you have the following in your .vimrc:
|
||||||
|
"
|
||||||
|
" let filetype_m="mma"
|
||||||
|
"
|
||||||
|
" I also recommend setting the default 'Comment' hilighting to something
|
||||||
|
" other than the color used for 'Function', since both are plentiful in
|
||||||
|
" most mathematica files, and they are often the same color (when using
|
||||||
|
" background=dark). I use
|
||||||
|
"
|
||||||
|
" hi Comment ctermfg=darkcyan
|
||||||
|
"
|
||||||
|
" darkgreen also looks good on my terminal.
|
||||||
|
"
|
||||||
|
" Credits:
|
||||||
|
" o Original Mathematica syntax version written by
|
||||||
|
" Wolfgang Waltenberger <wwalten@ben.tuwien.ac.at>
|
||||||
|
" o Some ideas like the CommentStar,CommentTitle were adapted
|
||||||
|
" from the Java vim syntax file by Claudio Fleiner. Thanks!
|
||||||
|
" o Everything else written by steve <layland@wolfram.com>
|
||||||
|
"
|
||||||
|
" TODO:
|
||||||
|
" folding
|
||||||
|
" fix nesting
|
||||||
|
" finish populating popular symbols
|
||||||
|
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
elseif exists("b:current_syntax")
|
elseif exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syn match mmaError "\*)"
|
" Group Definitions:
|
||||||
syn match mmaFixme "FIXME"
|
syntax cluster mmaNotes contains=mmaTodo,mmaFixme
|
||||||
syn region mmaComment start=+(\*+ end=+\*)+ skipempty contains=mmaFixme
|
syntax cluster mmaComments contains=mmaComment,mmaFunctionComment,mmaItem,mmaFunctionTitle,mmaCommentStar
|
||||||
syn match mmaMessage "\a*::\a*"
|
syntax cluster mmaCommentStrings contains=mmaLooseQuote,mmaCommentString,mmaUnicode
|
||||||
syn region mmaString start=+'+ end=+'+
|
syntax cluster mmaStrings contains=@mmaCommentStrings,mmaString
|
||||||
syn region mmaString start=+"+ end=+"+
|
syntax cluster mmaTop contains=mmaOperator,mmaGenericFunction,mmaPureFunction,mmaVariable
|
||||||
syn region mmaString start=+\\\"+ end=+\"+
|
|
||||||
syn region mmaString start=+\"+ end=+\"+
|
|
||||||
|
|
||||||
syn match mmaVariable "$\a*"
|
" Variables:
|
||||||
|
" Dollar sign variables
|
||||||
|
syntax match mmaVariable "$\a\+\d*"
|
||||||
|
" Preceding contexts
|
||||||
|
syntax match mmaVariable "`\=\a\+\d*`"
|
||||||
|
|
||||||
syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}"
|
" Numbers:
|
||||||
syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}\(Integer\|Real\|Pattern\|Symbol\)"
|
syntax match mmaNumber "\<\%(\d\+\.\=\d*\|\d*\.\=\d\+\)\>"
|
||||||
syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}\(Rational\|Complex\|Head\)"
|
syntax match mmaNumber "`\d\+\>"
|
||||||
syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}?[A-Za-z01-9`]*"
|
|
||||||
|
|
||||||
" prefix/infix/postfix notations
|
" Predefined Constants:
|
||||||
syn match mmaGenericFunction "[A-Za-z01-9`]*\s*\(\[\|@\)"he=e-1
|
" to list all predefined Symbols would be too insane...
|
||||||
syn match mmaGenericFunction "[A-Za-z01-9`]*\s*\(/@\|@@\)"he=e-2
|
" it's probably smarter to define a select few, and get the rest from
|
||||||
syn match mmaGenericFunction "\~\s*[A-Za-z01-9`]*\s*\~"hs=s+1,he=e-1
|
" context if absolutely necessary.
|
||||||
syn match mmaGenericFunction "//\s*[A-Za-z01-9`]*"hs=s+2
|
" TODO - populate this with other often used Symbols
|
||||||
syn match mmaOperator "/;"
|
|
||||||
|
|
||||||
syn match mmaPureFunction "#\d*"
|
" standard fixed symbols:
|
||||||
syn match mmaPureFunction "&"
|
syntax keyword mmaVariable True False None Automatic All Null C General
|
||||||
|
|
||||||
syn match mmaUnicode "\\\[[a-zA-Z01-9]*\]"
|
" mathematical constants:
|
||||||
|
syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher
|
||||||
|
|
||||||
|
" stream data / atomic heads:
|
||||||
|
syntax keyword mmaVariable Byte Character Expression Number Real String Word EndOfFile Integer Symbol
|
||||||
|
|
||||||
|
" sets:
|
||||||
|
syntax keyword mmaVariable Integers Complexes Reals Booleans Rationals
|
||||||
|
|
||||||
|
" character classes:
|
||||||
|
syntax keyword mmaPattern DigitCharacter LetterCharacter WhitespaceCharacter WordCharacter EndOfString StartOfString EndOfLine StartOfLine WordBoundary
|
||||||
|
|
||||||
|
" SelectionMove directions/units:
|
||||||
|
syntax keyword mmaVariable Next Previous After Before Character Word Expression TextLine CellContents Cell CellGroup EvaluationCell ButtonCell GeneratedCell Notebook
|
||||||
|
syntax keyword mmaVariable CellTags CellStyle CellLabel
|
||||||
|
|
||||||
|
" TableForm positions:
|
||||||
|
syntax keyword mmaVariable Above Below Left Right
|
||||||
|
|
||||||
|
" colors:
|
||||||
|
syntax keyword mmaVariable Black Blue Brown Cyan Gray Green Magenta Orange Pink Purple Red White Yellow
|
||||||
|
|
||||||
|
" function attributes
|
||||||
|
syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub
|
||||||
|
|
||||||
|
" Strings:
|
||||||
|
" "string"
|
||||||
|
" 'string' is not accepted (until literal strings are supported!)
|
||||||
|
syntax region mmaString start=+\\\@<!"+ skip=+\\\@<!\\\%(\\\\\)*"+ end=+"+
|
||||||
|
syntax region mmaCommentString oneline start=+\\\@<!"+ skip=+\\\@<!\\\%(\\\\\)*"+ end=+"+ contained
|
||||||
|
|
||||||
|
" Function Usage Messages:
|
||||||
|
" "SymbolName::item"
|
||||||
|
syntax match mmaMessage "$\=\a\+\d*::\a\+\d*"
|
||||||
|
|
||||||
|
" Pure Functions:
|
||||||
|
syntax match mmaPureFunction "#\%(#\|\d\+\)\="
|
||||||
|
syntax match mmaPureFunction "&"
|
||||||
|
|
||||||
|
" Named Functions:
|
||||||
|
" Since everything is pretty much a function, get this straight
|
||||||
|
" from context
|
||||||
|
syntax match mmaGenericFunction "[A-Za-z0-9`]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator
|
||||||
|
syntax match mmaGenericFunction "\~\s*[^~]\+\s*\~"hs=s+1,he=e-1 contains=mmaOperator,mmaBoring
|
||||||
|
syntax match mmaGenericFunction "//\s*[A-Za-z0-9`]\+"hs=s+2 contains=mmaOperator
|
||||||
|
|
||||||
|
" Comment Keywords:
|
||||||
|
syntax keyword mmaTodo TODO NOTE HEY contained
|
||||||
|
syntax match mmaTodo "X\{3,}" contained
|
||||||
|
syntax keyword mmaFixme FIX[ME] FIXTHIS BROKEN contained
|
||||||
|
" yay pirates...
|
||||||
|
syntax match mmaFixme "\%(Y\=A\+R\+G\+\|GRR\+\|CR\+A\+P\+\)\%(!\+\)\=" contained
|
||||||
|
syntax match mmaemPHAsis "\(_\+\)[ a-zA-Z0-9]\+\1" contained
|
||||||
|
|
||||||
|
" Comment Sections:
|
||||||
|
" this:
|
||||||
|
" :that:
|
||||||
|
syntax match mmaItem "\%(^[( |*\t]*\)\@<=\%(:\+\|\a\)[a-zA-Z0-9 ]\+:" contained contains=@mmaNotes
|
||||||
|
|
||||||
|
" Actual Mathematica Comments:
|
||||||
|
" (* *)
|
||||||
|
" allow nesting (* (* *) *) even though the frontend
|
||||||
|
" won't always like it.
|
||||||
|
syntax region mmaComment start=+(\*+ end=+\*)+ skipempty contains=@mmaNotes,mmaItem,@mmaCommentStrings,mmaemPHAsis,mmaComment
|
||||||
|
|
||||||
|
" Function Comments:
|
||||||
|
" just like a normal comment except the first sentance is Special ala Java
|
||||||
|
" (** *)
|
||||||
|
" TODO - fix this for nesting, or not...
|
||||||
|
syntax region mmaFunctionComment start="(\*\*\+" end="\*\+)" contains=@mmaNotes,mmaItem,mmaFunctionTitle,@mmaCommentStrings,mmaemPHAsis,mmaComment
|
||||||
|
syntax region mmaFunctionTitle contained matchgroup=mmaFunctionComment start="\%((\*\*[ *]*\)" matchgroup=mmaFunctionTitle keepend end=".[.!-]\=\s*$" end="[.!-][ \t\r<&]"me=e-1 end="\%(\*\+)\)\@=" contained contains=@mmaNotes,mmaItem,mmaCommentStar
|
||||||
|
|
||||||
|
" catch remaining (**********)'s
|
||||||
|
syntax match mmaComment "(\*\*\+)"
|
||||||
|
" catch preceding *
|
||||||
|
syntax match mmaCommentStar "^\s*\*\+" contained
|
||||||
|
|
||||||
|
" Patterns:
|
||||||
|
" Each pattern marker below can be Blank[] (_), BlankSequence[] (__)
|
||||||
|
" or BlankNullSequence[] (___). Most examples below can also be
|
||||||
|
" combined, for example Pattern tests with Default values.
|
||||||
|
"
|
||||||
|
" _Head Anonymous patterns
|
||||||
|
" name_Head
|
||||||
|
" name:(_Head|_Head2) Named patterns
|
||||||
|
"
|
||||||
|
" _Head : val
|
||||||
|
" name:_Head:val Default values
|
||||||
|
"
|
||||||
|
" _Head?testQ,
|
||||||
|
" _Head?(test[#]&) Pattern tests
|
||||||
|
"
|
||||||
|
" name_Head/;test[name] Conditionals
|
||||||
|
"
|
||||||
|
" _Head:. Predefined Default
|
||||||
|
"
|
||||||
|
" .. ... Pattern Repeat
|
||||||
|
|
||||||
|
syntax match mmaPatternError "\%(_\{4,}\|)\s*&\s*)\@!\)" contained
|
||||||
|
|
||||||
|
"pattern name:
|
||||||
|
syntax match mmaPattern "[A-Za-z0-9`]\+\s*:\+[=>]\@!" contains=mmaOperator
|
||||||
|
"pattern default:
|
||||||
|
syntax match mmaPattern ": *[^ ,]\+[\], ]\@=" contains=@mmaCommentStrings,@mmaTop,mmaOperator
|
||||||
|
"pattern head/test:
|
||||||
|
syntax match mmaPattern "[A-Za-z0-9`]*_\+\%(\a\+\)\=\%(?([^)]\+)\|?[^\]},]\+\)\=" contains=@mmaTop,@mmaCommentStrings,mmaPatternError
|
||||||
|
|
||||||
|
" Operators:
|
||||||
|
" /: ^= ^:= UpValue
|
||||||
|
" /; Conditional
|
||||||
|
" := = DownValue
|
||||||
|
" == === ||
|
||||||
|
" != =!= && Logic
|
||||||
|
" >= <= < >
|
||||||
|
" += -= *=
|
||||||
|
" /= ++ -- Math
|
||||||
|
" ^*
|
||||||
|
" -> :> Rules
|
||||||
|
" @@ @@@ Apply
|
||||||
|
" /@ //@ Map
|
||||||
|
" /. //. Replace
|
||||||
|
" // @ Function application
|
||||||
|
" <> ~~ String/Pattern join
|
||||||
|
" ~ infix operator
|
||||||
|
" . : Pattern operators
|
||||||
|
syntax match mmaOperator "\%(@\{1,3}\|//[.@]\=\)"
|
||||||
|
syntax match mmaOperator "\%(/[;:@.]\=\|\^\=:\==\)"
|
||||||
|
syntax match mmaOperator "\%([-:=]\=>\|<=\=\)"
|
||||||
|
"syntax match mmaOperator "\%(++\=\|--\=\|[/+-*]=\|[^*]\)"
|
||||||
|
syntax match mmaOperator "[*+=^.:?-]"
|
||||||
|
syntax match mmaOperator "\%(\~\~\=\)"
|
||||||
|
syntax match mmaOperator "\%(=\{2,3}\|=\=!=\|||\=\|&&\|!\)" contains=ALLBUT,mmaPureFunction
|
||||||
|
|
||||||
|
|
||||||
|
" Special Characters:
|
||||||
|
" \[Name] named character
|
||||||
|
" \ooo octal
|
||||||
|
" \.xx 2 digit hex
|
||||||
|
" \:xxxx 4 digit hex (multibyte unicode)
|
||||||
|
syntax match mmaUnicode "\\\[\w\+\d*\]"
|
||||||
|
syntax match mmaUnicode "\\\%(\x\{3}\|\.\x\{2}\|:\x\{4}\)"
|
||||||
|
|
||||||
|
" Syntax Errors:
|
||||||
|
syntax match mmaError "\*)" containedin=ALLBUT,@mmaComments,@mmaStrings
|
||||||
|
syntax match mmaError "\%([&:|+*/?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings
|
||||||
|
|
||||||
|
" Punctuation:
|
||||||
|
" things that shouldn't really be highlighted, or highlighted
|
||||||
|
" in they're own group if you _really_ want. :)
|
||||||
|
" ( ) { }
|
||||||
|
" TODO - use Delimiter group?
|
||||||
|
syntax match mmaBoring "[(){}]" contained
|
||||||
|
|
||||||
|
" Function Arguments:
|
||||||
|
" anything between brackets []
|
||||||
|
" TODO - make good folds for this.
|
||||||
|
"syntax region mmaArgument start="\[" end="]" containedin=ALLBUT,@mmaComments,@mmaCommentStrings transparent fold
|
||||||
|
"syntax sync fromstart
|
||||||
|
"set foldmethod=syntax
|
||||||
|
"set foldminlines=10
|
||||||
|
|
||||||
if version >= 508 || !exists("did_mma_syn_inits")
|
if version >= 508 || !exists("did_mma_syn_inits")
|
||||||
if version < 508
|
if version < 508
|
||||||
@@ -45,17 +233,33 @@ if version >= 508 || !exists("did_mma_syn_inits")
|
|||||||
command -nargs=+ HiLink hi def link <args>
|
command -nargs=+ HiLink hi def link <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HiLink mmaOperator Operator
|
" NOTE - the following links are not guaranteed to
|
||||||
HiLink mmaVariable Identifier
|
" look good under all colorschemes. You might need to
|
||||||
HiLink mmaString String
|
" :so $VIMRUNTIME/syntax/hitest.vim and tweak these to
|
||||||
HiLink mmaUnicode String
|
" look good in yours
|
||||||
HiLink mmaMessage Identifier
|
|
||||||
HiLink mmaPattern Identifier
|
HiLink mmaComment Comment
|
||||||
HiLink mmaGenericFunction Function
|
HiLink mmaCommentStar Comment
|
||||||
HiLink mmaError Error
|
HiLink mmaFunctionComment Comment
|
||||||
HiLink mmaFixme Error
|
HiLink mmaLooseQuote Comment
|
||||||
HiLink mmaComment Comment
|
HiLink mmaGenericFunction Function
|
||||||
HiLink mmaPureFunction Operator
|
HiLink mmaOperator Operator
|
||||||
|
HiLink mmaPatternOp Operator
|
||||||
|
HiLink mmaPureFunction Operator
|
||||||
|
HiLink mmaVariable Identifier
|
||||||
|
HiLink mmaString String
|
||||||
|
HiLink mmaCommentString String
|
||||||
|
HiLink mmaUnicode String
|
||||||
|
HiLink mmaMessage Type
|
||||||
|
HiLink mmaNumber Type
|
||||||
|
HiLink mmaPattern Type
|
||||||
|
HiLink mmaError Error
|
||||||
|
HiLink mmaFixme Error
|
||||||
|
HiLink mmaPatternError Error
|
||||||
|
HiLink mmaTodo Todo
|
||||||
|
HiLink mmaemPHAsis Special
|
||||||
|
HiLink mmaFunctionTitle Special
|
||||||
|
HiLink mmaItem Preproc
|
||||||
|
|
||||||
delcommand HiLink
|
delcommand HiLink
|
||||||
endif
|
endif
|
||||||
|
100
src/eval.c
100
src/eval.c
@@ -580,8 +580,12 @@ static pos_T *var2fpos __ARGS((typval_T *varp, int lnum));
|
|||||||
static int get_env_len __ARGS((char_u **arg));
|
static int get_env_len __ARGS((char_u **arg));
|
||||||
static int get_id_len __ARGS((char_u **arg));
|
static int get_id_len __ARGS((char_u **arg));
|
||||||
static int get_name_len __ARGS((char_u **arg, char_u **alias, int evaluate, int verbose));
|
static int get_name_len __ARGS((char_u **arg, char_u **alias, int evaluate, int verbose));
|
||||||
static char_u *find_name_end __ARGS((char_u *arg, char_u **expr_start, char_u **expr_end, int incl_br));
|
static char_u *find_name_end __ARGS((char_u *arg, char_u **expr_start, char_u **expr_end, int flags));
|
||||||
|
#define FNE_INCL_BR 1 /* find_name_end(): include [] in name */
|
||||||
|
#define FNE_CHECK_START 2 /* find_name_end(): check name starts with
|
||||||
|
valid character */
|
||||||
static int eval_isnamec __ARGS((int c));
|
static int eval_isnamec __ARGS((int c));
|
||||||
|
static int eval_isnamec1 __ARGS((int c));
|
||||||
static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose));
|
static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose));
|
||||||
static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose));
|
static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose));
|
||||||
static typval_T *alloc_tv __ARGS((void));
|
static typval_T *alloc_tv __ARGS((void));
|
||||||
@@ -650,7 +654,7 @@ static void list_vim_vars __ARGS((void));
|
|||||||
static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
|
static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
|
||||||
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
|
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
|
||||||
static int check_changedtick __ARGS((char_u *arg));
|
static int check_changedtick __ARGS((char_u *arg));
|
||||||
static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet));
|
static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
|
||||||
static void clear_lval __ARGS((lval_T *lp));
|
static void clear_lval __ARGS((lval_T *lp));
|
||||||
static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op));
|
static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op));
|
||||||
static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op));
|
static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op));
|
||||||
@@ -663,6 +667,9 @@ static int do_lock_var __ARGS((lval_T *lp, char_u *name_end, int deep, int lock)
|
|||||||
static void item_lock __ARGS((typval_T *tv, int deep, int lock));
|
static void item_lock __ARGS((typval_T *tv, int deep, int lock));
|
||||||
static int tv_islocked __ARGS((typval_T *tv));
|
static int tv_islocked __ARGS((typval_T *tv));
|
||||||
|
|
||||||
|
/* Character used as separated in autoload function/variable names. */
|
||||||
|
#define AUTOLOAD_CHAR '#'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the global and v: variables.
|
* Initialize the global and v: variables.
|
||||||
*/
|
*/
|
||||||
@@ -792,7 +799,7 @@ var_redir_start(name, append)
|
|||||||
typval_T tv;
|
typval_T tv;
|
||||||
|
|
||||||
/* Make sure a valid variable name is specified */
|
/* Make sure a valid variable name is specified */
|
||||||
if (!eval_isnamec(*name) || VIM_ISDIGIT(*name))
|
if (!eval_isnamec1(*name))
|
||||||
{
|
{
|
||||||
EMSG(_(e_invarg));
|
EMSG(_(e_invarg));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
@@ -810,7 +817,8 @@ var_redir_start(name, append)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Parse the variable name (can be a dict or list entry). */
|
/* Parse the variable name (can be a dict or list entry). */
|
||||||
redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE);
|
redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE,
|
||||||
|
FNE_CHECK_START);
|
||||||
if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL)
|
if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL)
|
||||||
{
|
{
|
||||||
if (redir_endp != NULL && *redir_endp != NUL)
|
if (redir_endp != NULL && *redir_endp != NUL)
|
||||||
@@ -1551,7 +1559,7 @@ skip_var_one(arg)
|
|||||||
{
|
{
|
||||||
if (vim_strchr((char_u *)"$@&", *arg) != NULL)
|
if (vim_strchr((char_u *)"$@&", *arg) != NULL)
|
||||||
++arg;
|
++arg;
|
||||||
return find_name_end(arg, NULL, NULL, TRUE);
|
return find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1643,7 +1651,7 @@ list_arg_vars(eap, arg)
|
|||||||
{
|
{
|
||||||
if (error || eap->skip)
|
if (error || eap->skip)
|
||||||
{
|
{
|
||||||
arg = find_name_end(arg, NULL, NULL, TRUE);
|
arg = find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START);
|
||||||
if (!vim_iswhite(*arg) && !ends_excmd(*arg))
|
if (!vim_iswhite(*arg) && !ends_excmd(*arg))
|
||||||
{
|
{
|
||||||
emsg_severe = TRUE;
|
emsg_severe = TRUE;
|
||||||
@@ -1888,11 +1896,11 @@ ex_let_one(arg, tv, copy, endchars, op)
|
|||||||
* ":let var = expr": Set internal variable.
|
* ":let var = expr": Set internal variable.
|
||||||
* ":let {expr} = expr": Idem, name made with curly braces
|
* ":let {expr} = expr": Idem, name made with curly braces
|
||||||
*/
|
*/
|
||||||
else if ((eval_isnamec(*arg) && !VIM_ISDIGIT(*arg)) || *arg == '{')
|
else if (eval_isnamec1(*arg) || *arg == '{')
|
||||||
{
|
{
|
||||||
lval_T lv;
|
lval_T lv;
|
||||||
|
|
||||||
p = get_lval(arg, tv, &lv, FALSE, FALSE, FALSE);
|
p = get_lval(arg, tv, &lv, FALSE, FALSE, FALSE, FNE_CHECK_START);
|
||||||
if (p != NULL && lv.ll_name != NULL)
|
if (p != NULL && lv.ll_name != NULL)
|
||||||
{
|
{
|
||||||
if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
|
if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)
|
||||||
@@ -1942,13 +1950,14 @@ check_changedtick(arg)
|
|||||||
* Returns NULL for a parsing error. Still need to free items in "lp"!
|
* Returns NULL for a parsing error. Still need to free items in "lp"!
|
||||||
*/
|
*/
|
||||||
static char_u *
|
static char_u *
|
||||||
get_lval(name, rettv, lp, unlet, skip, quiet)
|
get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags)
|
||||||
char_u *name;
|
char_u *name;
|
||||||
typval_T *rettv;
|
typval_T *rettv;
|
||||||
lval_T *lp;
|
lval_T *lp;
|
||||||
int unlet;
|
int unlet;
|
||||||
int skip;
|
int skip;
|
||||||
int quiet; /* don't give error messages */
|
int quiet; /* don't give error messages */
|
||||||
|
int fne_flags; /* flags for find_name_end() */
|
||||||
{
|
{
|
||||||
char_u *p;
|
char_u *p;
|
||||||
char_u *expr_start, *expr_end;
|
char_u *expr_start, *expr_end;
|
||||||
@@ -1969,11 +1978,11 @@ get_lval(name, rettv, lp, unlet, skip, quiet)
|
|||||||
{
|
{
|
||||||
/* When skipping just find the end of the name. */
|
/* When skipping just find the end of the name. */
|
||||||
lp->ll_name = name;
|
lp->ll_name = name;
|
||||||
return find_name_end(name, NULL, NULL, TRUE);
|
return find_name_end(name, NULL, NULL, FNE_INCL_BR | fne_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the end of the name. */
|
/* Find the end of the name. */
|
||||||
p = find_name_end(name, &expr_start, &expr_end, FALSE);
|
p = find_name_end(name, &expr_start, &expr_end, fne_flags);
|
||||||
if (expr_start != NULL)
|
if (expr_start != NULL)
|
||||||
{
|
{
|
||||||
/* Don't expand the name when we already know there is an error. */
|
/* Don't expand the name when we already know there is an error. */
|
||||||
@@ -2842,7 +2851,8 @@ ex_unletlock(eap, argstart, deep)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Parse the name and find the end. */
|
/* Parse the name and find the end. */
|
||||||
name_end = get_lval(arg, NULL, &lv, TRUE, eap->skip || error, FALSE);
|
name_end = get_lval(arg, NULL, &lv, TRUE, eap->skip || error, FALSE,
|
||||||
|
FNE_CHECK_START);
|
||||||
if (lv.ll_name == NULL)
|
if (lv.ll_name == NULL)
|
||||||
error = TRUE; /* error but continue parsing */
|
error = TRUE; /* error but continue parsing */
|
||||||
if (name_end == NULL || (!vim_iswhite(*name_end)
|
if (name_end == NULL || (!vim_iswhite(*name_end)
|
||||||
@@ -10178,7 +10188,8 @@ f_islocked(argvars, rettv)
|
|||||||
dictitem_T *di;
|
dictitem_T *di;
|
||||||
|
|
||||||
rettv->vval.v_number = -1;
|
rettv->vval.v_number = -1;
|
||||||
end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE, FALSE);
|
end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE, FALSE,
|
||||||
|
FNE_CHECK_START);
|
||||||
if (end != NULL && lv.ll_name != NULL)
|
if (end != NULL && lv.ll_name != NULL)
|
||||||
{
|
{
|
||||||
if (*end != NUL)
|
if (*end != NUL)
|
||||||
@@ -13967,7 +13978,8 @@ get_name_len(arg, alias, evaluate, verbose)
|
|||||||
/*
|
/*
|
||||||
* Find the end of the name; check for {} construction.
|
* Find the end of the name; check for {} construction.
|
||||||
*/
|
*/
|
||||||
p = find_name_end(*arg, &expr_start, &expr_end, FALSE);
|
p = find_name_end(*arg, &expr_start, &expr_end,
|
||||||
|
len > 0 ? 0 : FNE_CHECK_START);
|
||||||
if (expr_start != NULL)
|
if (expr_start != NULL)
|
||||||
{
|
{
|
||||||
char_u *temp_string;
|
char_u *temp_string;
|
||||||
@@ -14002,15 +14014,16 @@ get_name_len(arg, alias, evaluate, verbose)
|
|||||||
* Find the end of a variable or function name, taking care of magic braces.
|
* Find the end of a variable or function name, taking care of magic braces.
|
||||||
* If "expr_start" is not NULL then "expr_start" and "expr_end" are set to the
|
* If "expr_start" is not NULL then "expr_start" and "expr_end" are set to the
|
||||||
* start and end of the first magic braces item.
|
* start and end of the first magic braces item.
|
||||||
|
* "flags" can have FNE_INCL_BR and FNE_CHECK_START.
|
||||||
* Return a pointer to just after the name. Equal to "arg" if there is no
|
* Return a pointer to just after the name. Equal to "arg" if there is no
|
||||||
* valid name.
|
* valid name.
|
||||||
*/
|
*/
|
||||||
static char_u *
|
static char_u *
|
||||||
find_name_end(arg, expr_start, expr_end, incl_br)
|
find_name_end(arg, expr_start, expr_end, flags)
|
||||||
char_u *arg;
|
char_u *arg;
|
||||||
char_u **expr_start;
|
char_u **expr_start;
|
||||||
char_u **expr_end;
|
char_u **expr_end;
|
||||||
int incl_br; /* Include [] indexes and .name */
|
int flags;
|
||||||
{
|
{
|
||||||
int mb_nest = 0;
|
int mb_nest = 0;
|
||||||
int br_nest = 0;
|
int br_nest = 0;
|
||||||
@@ -14022,10 +14035,14 @@ find_name_end(arg, expr_start, expr_end, incl_br)
|
|||||||
*expr_end = NULL;
|
*expr_end = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Quick check for valid starting character. */
|
||||||
|
if ((flags & FNE_CHECK_START) && !eval_isnamec1(*arg) && *arg != '{')
|
||||||
|
return arg;
|
||||||
|
|
||||||
for (p = arg; *p != NUL
|
for (p = arg; *p != NUL
|
||||||
&& (eval_isnamec(*p)
|
&& (eval_isnamec(*p)
|
||||||
|| *p == '{'
|
|| *p == '{'
|
||||||
|| (incl_br && (*p == '[' || *p == '.'))
|
|| ((flags & FNE_INCL_BR) && (*p == '[' || *p == '.'))
|
||||||
|| mb_nest != 0
|
|| mb_nest != 0
|
||||||
|| br_nest != 0); ++p)
|
|| br_nest != 0); ++p)
|
||||||
{
|
{
|
||||||
@@ -14108,7 +14125,7 @@ make_expanded_name(in_start, expr_start, expr_end, in_end)
|
|||||||
|
|
||||||
if (retval != NULL)
|
if (retval != NULL)
|
||||||
{
|
{
|
||||||
temp_result = find_name_end(retval, &expr_start, &expr_end, FALSE);
|
temp_result = find_name_end(retval, &expr_start, &expr_end, 0);
|
||||||
if (expr_start != NULL)
|
if (expr_start != NULL)
|
||||||
{
|
{
|
||||||
/* Further expansion! */
|
/* Further expansion! */
|
||||||
@@ -14130,7 +14147,18 @@ make_expanded_name(in_start, expr_start, expr_end, in_end)
|
|||||||
eval_isnamec(c)
|
eval_isnamec(c)
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
return (ASCII_ISALNUM(c) || c == '_' || c == ':');
|
return (ASCII_ISALNUM(c) || c == '_' || c == ':' || c == AUTOLOAD_CHAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return TRUE if character "c" can be used as the first character in a
|
||||||
|
* variable or function name (excluding '{' and '}').
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
eval_isnamec1(c)
|
||||||
|
int c;
|
||||||
|
{
|
||||||
|
return (ASCII_ISALPHA(c) || c == '_');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -14729,8 +14757,8 @@ find_var_ht(name, varname)
|
|||||||
{
|
{
|
||||||
if (name[1] != ':')
|
if (name[1] != ':')
|
||||||
{
|
{
|
||||||
/* The name must not start with a colon. */
|
/* The name must not start with a colon or #. */
|
||||||
if (name[0] == ':')
|
if (name[0] == ':' || name[0] == AUTOLOAD_CHAR)
|
||||||
return NULL;
|
return NULL;
|
||||||
*varname = name;
|
*varname = name;
|
||||||
|
|
||||||
@@ -14745,8 +14773,10 @@ find_var_ht(name, varname)
|
|||||||
*varname = name + 2;
|
*varname = name + 2;
|
||||||
if (*name == 'g') /* global variable */
|
if (*name == 'g') /* global variable */
|
||||||
return &globvarht;
|
return &globvarht;
|
||||||
/* There must be no ':' in the rest of the name, unless g: is used */
|
/* There must be no ':' or '#' in the rest of the name, unless g: is used
|
||||||
if (vim_strchr(name + 2, ':') != NULL)
|
*/
|
||||||
|
if (vim_strchr(name + 2, ':') != NULL
|
||||||
|
|| vim_strchr(name + 2, AUTOLOAD_CHAR) != NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (*name == 'b') /* buffer variable */
|
if (*name == 'b') /* buffer variable */
|
||||||
return &curbuf->b_vars.dv_hashtab;
|
return &curbuf->b_vars.dv_hashtab;
|
||||||
@@ -15886,7 +15916,7 @@ ex_function(eap)
|
|||||||
|
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
if (fudi.fd_dict == NULL && vim_strchr(name, ':') != NULL)
|
if (fudi.fd_dict == NULL && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
|
||||||
{
|
{
|
||||||
int slen, plen;
|
int slen, plen;
|
||||||
char_u *scriptname;
|
char_u *scriptname;
|
||||||
@@ -16018,7 +16048,8 @@ trans_function_name(pp, skip, flags, fdp)
|
|||||||
if (lead > 2)
|
if (lead > 2)
|
||||||
start += lead;
|
start += lead;
|
||||||
|
|
||||||
end = get_lval(start, NULL, &lv, FALSE, skip, flags & TFN_QUIET);
|
end = get_lval(start, NULL, &lv, FALSE, skip, flags & TFN_QUIET,
|
||||||
|
lead > 2 ? 0 : FNE_CHECK_START);
|
||||||
if (end == start)
|
if (end == start)
|
||||||
{
|
{
|
||||||
if (!skip)
|
if (!skip)
|
||||||
@@ -16038,7 +16069,7 @@ trans_function_name(pp, skip, flags, fdp)
|
|||||||
EMSG2(_(e_invarg2), start);
|
EMSG2(_(e_invarg2), start);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*pp = find_name_end(start, NULL, NULL, TRUE);
|
*pp = find_name_end(start, NULL, NULL, FNE_INCL_BR);
|
||||||
goto theend;
|
goto theend;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16236,13 +16267,14 @@ function_exists(name)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Return TRUE if "name" looks like a builtin function name: starts with a
|
* Return TRUE if "name" looks like a builtin function name: starts with a
|
||||||
* lower case letter and doesn't contain a ':'.
|
* lower case letter and doesn't contain a ':' or AUTOLOAD_CHAR.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
builtin_function(name)
|
builtin_function(name)
|
||||||
char_u *name;
|
char_u *name;
|
||||||
{
|
{
|
||||||
return ASCII_ISLOWER(name[0]) && vim_strchr(name, ':') == NULL;
|
return ASCII_ISLOWER(name[0]) && vim_strchr(name, ':') == NULL
|
||||||
|
&& vim_strchr(name, AUTOLOAD_CHAR) == NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_PROFILE) || defined(PROTO)
|
#if defined(FEAT_PROFILE) || defined(PROTO)
|
||||||
@@ -16440,7 +16472,7 @@ script_autoload(name)
|
|||||||
int ret = FALSE;
|
int ret = FALSE;
|
||||||
|
|
||||||
/* If there is no colon after name[1] there is no package name. */
|
/* If there is no colon after name[1] there is no package name. */
|
||||||
p = vim_strchr(name, ':');
|
p = vim_strchr(name, AUTOLOAD_CHAR);
|
||||||
if (p == NULL || p <= name + 2)
|
if (p == NULL || p <= name + 2)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -16464,15 +16496,15 @@ autoload_name(name)
|
|||||||
char_u *p;
|
char_u *p;
|
||||||
char_u *scriptname;
|
char_u *scriptname;
|
||||||
|
|
||||||
/* Get the script file name: replace ':' with '/', append ".vim". */
|
/* Get the script file name: replace '#' with '/', append ".vim". */
|
||||||
scriptname = alloc((unsigned)(STRLEN(name) + 14));
|
scriptname = alloc((unsigned)(STRLEN(name) + 14));
|
||||||
if (scriptname == NULL)
|
if (scriptname == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
STRCPY(scriptname, "autoload/");
|
STRCPY(scriptname, "autoload/");
|
||||||
STRCAT(scriptname, name);
|
STRCAT(scriptname, name);
|
||||||
*vim_strrchr(scriptname, ':') = NUL;
|
*vim_strrchr(scriptname, AUTOLOAD_CHAR) = NUL;
|
||||||
STRCAT(scriptname, ".vim");
|
STRCAT(scriptname, ".vim");
|
||||||
while ((p = vim_strchr(scriptname, ':')) != NULL)
|
while ((p = vim_strchr(scriptname, AUTOLOAD_CHAR)) != NULL)
|
||||||
*p = '/';
|
*p = '/';
|
||||||
return scriptname;
|
return scriptname;
|
||||||
}
|
}
|
||||||
@@ -16852,7 +16884,7 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
trunc_string(tv2string(&argvars[i], &tofree, numbuf),
|
trunc_string(tv2string(&argvars[i], &tofree, numbuf),
|
||||||
buf, MSG_BUF_LEN);
|
buf, MSG_BUF_CLEN);
|
||||||
msg_puts(buf);
|
msg_puts(buf);
|
||||||
vim_free(tofree);
|
vim_free(tofree);
|
||||||
}
|
}
|
||||||
@@ -16940,7 +16972,7 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
|
|||||||
char_u *tofree;
|
char_u *tofree;
|
||||||
|
|
||||||
trunc_string(tv2string(fc.rettv, &tofree, numbuf),
|
trunc_string(tv2string(fc.rettv, &tofree, numbuf),
|
||||||
buf, MSG_BUF_LEN);
|
buf, MSG_BUF_CLEN);
|
||||||
smsg((char_u *)_("%s returning %s"), sn, buf);
|
smsg((char_u *)_("%s returning %s"), sn, buf);
|
||||||
vim_free(tofree);
|
vim_free(tofree);
|
||||||
}
|
}
|
||||||
|
@@ -6307,7 +6307,7 @@ sign_list_defined(sp)
|
|||||||
{
|
{
|
||||||
char_u *p;
|
char_u *p;
|
||||||
|
|
||||||
smsg((char_u *)"sign %s", sp->sn_name);
|
msg_str((char_u *)"sign %s", sp->sn_name);
|
||||||
if (sp->sn_icon != NULL)
|
if (sp->sn_icon != NULL)
|
||||||
{
|
{
|
||||||
MSG_PUTS(" icon=");
|
MSG_PUTS(" icon=");
|
||||||
|
@@ -141,7 +141,14 @@ do_debug(cmd)
|
|||||||
if (sourcing_name != NULL)
|
if (sourcing_name != NULL)
|
||||||
msg(sourcing_name);
|
msg(sourcing_name);
|
||||||
if (sourcing_lnum != 0)
|
if (sourcing_lnum != 0)
|
||||||
smsg((char_u *)_("line %ld: %s"), (long)sourcing_lnum, cmd);
|
{
|
||||||
|
char_u buf[IOSIZE];
|
||||||
|
|
||||||
|
/* Truncate the command, the whole must fit in IObuff. */
|
||||||
|
STRNCPY(buf, cmd, IOSIZE - 50);
|
||||||
|
buf[IOSIZE - 50] = NUL;
|
||||||
|
smsg((char_u *)_("line %ld: %s"), (long)sourcing_lnum, buf);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
msg_str((char_u *)_("cmd: %s"), cmd);
|
msg_str((char_u *)_("cmd: %s"), cmd);
|
||||||
|
|
||||||
@@ -1942,6 +1949,7 @@ do_argfile(eap, argn)
|
|||||||
{
|
{
|
||||||
int other;
|
int other;
|
||||||
char_u *p;
|
char_u *p;
|
||||||
|
int old_arg_idx = curwin->w_arg_idx;
|
||||||
|
|
||||||
if (argn < 0 || argn >= ARGCOUNT)
|
if (argn < 0 || argn >= ARGCOUNT)
|
||||||
{
|
{
|
||||||
@@ -1995,14 +2003,16 @@ do_argfile(eap, argn)
|
|||||||
)
|
)
|
||||||
arg_had_last = TRUE;
|
arg_had_last = TRUE;
|
||||||
|
|
||||||
/* Edit the file; always use the last known line number. */
|
/* Edit the file; always use the last known line number.
|
||||||
(void)do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
* When it fails (e.g. Abort for already edited file) restore the
|
||||||
|
* argument index. */
|
||||||
|
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
||||||
eap, ECMD_LAST,
|
eap, ECMD_LAST,
|
||||||
(P_HID(curwin->w_buffer) ? ECMD_HIDE : 0) +
|
(P_HID(curwin->w_buffer) ? ECMD_HIDE : 0) +
|
||||||
(eap->forceit ? ECMD_FORCEIT : 0));
|
(eap->forceit ? ECMD_FORCEIT : 0)) == FAIL)
|
||||||
|
curwin->w_arg_idx = old_arg_idx;
|
||||||
/* like Vi: set the mark where the cursor is in the file. */
|
/* like Vi: set the mark where the cursor is in the file. */
|
||||||
if (eap->cmdidx != CMD_argdo)
|
else if (eap->cmdidx != CMD_argdo)
|
||||||
setmark('\'');
|
setmark('\'');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2463,8 +2473,14 @@ do_in_runtimepath(name, all, callback, cookie)
|
|||||||
if (buf != NULL && rtp_copy != NULL)
|
if (buf != NULL && rtp_copy != NULL)
|
||||||
{
|
{
|
||||||
if (p_verbose > 1)
|
if (p_verbose > 1)
|
||||||
smsg((char_u *)_("Searching for \"%s\" in \"%s\""),
|
{
|
||||||
|
if (STRLEN(name) + STRLEN(p_rtp) > IOSIZE - 100)
|
||||||
|
MSG(_("Searching for a long name in 'runtimepath'"));
|
||||||
|
else
|
||||||
|
smsg((char_u *)_("Searching for \"%s\" in \"%s\""),
|
||||||
(char *)name, (char *)p_rtp);
|
(char *)name, (char *)p_rtp);
|
||||||
|
}
|
||||||
|
|
||||||
/* Loop over all entries in 'runtimepath'. */
|
/* Loop over all entries in 'runtimepath'. */
|
||||||
rtp = rtp_copy;
|
rtp = rtp_copy;
|
||||||
while (*rtp != NUL && (all || !did_one))
|
while (*rtp != NUL && (all || !did_one))
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
# ifdef EBCDIC
|
# ifdef EBCDIC
|
||||||
#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
||||||
# else
|
# else
|
||||||
#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
1315
src/po/it.po
1315
src/po/it.po
File diff suppressed because it is too large
Load Diff
@@ -7506,7 +7506,7 @@ get_attr_entry(table, aep)
|
|||||||
return i + ATTR_OFF;
|
return i + ATTR_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (table->ga_len + ATTR_OFF >= 256)
|
if (table->ga_len + ATTR_OFF > MAX_TYPENR)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Running out of attribute entries! remove all attributes, and
|
* Running out of attribute entries! remove all attributes, and
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
||||||
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
||||||
#
|
#
|
||||||
# Last change: 2005 Jan 19
|
# Last change: 2005 May 18
|
||||||
#
|
#
|
||||||
# This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX.
|
# This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX.
|
||||||
# Edit the lines in the Configuration section below to select.
|
# Edit the lines in the Configuration section below to select.
|
||||||
@@ -57,7 +57,8 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
|
|||||||
test33.out test34.out test35.out test36.out test37.out \
|
test33.out test34.out test35.out test36.out test37.out \
|
||||||
test38.out test39.out test40.out test41.out test42.out \
|
test38.out test39.out test40.out test41.out test42.out \
|
||||||
test43.out test44.out test45.out test46.out \
|
test43.out test44.out test45.out test46.out \
|
||||||
test48.out test51.out test53.out test54.out test55.out
|
test48.out test51.out test53.out test54.out test55.out \
|
||||||
|
test56.out
|
||||||
|
|
||||||
.IFDEF WANT_GUI
|
.IFDEF WANT_GUI
|
||||||
SCRIPT_GUI = test16.out
|
SCRIPT_GUI = test16.out
|
||||||
|
@@ -14,7 +14,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
|
|||||||
test38.out test39.out test40.out test41.out test42.out \
|
test38.out test39.out test40.out test41.out test42.out \
|
||||||
test43.out test44.out test45.out test46.out test47.out \
|
test43.out test44.out test45.out test46.out test47.out \
|
||||||
test48.out test49.out test51.out test52.out test53.out \
|
test48.out test49.out test51.out test52.out test53.out \
|
||||||
test54.out test55.out
|
test54.out test55.out test56.out
|
||||||
|
|
||||||
SCRIPTS_GUI = test16.out
|
SCRIPTS_GUI = test16.out
|
||||||
|
|
||||||
|
21
src/testdir/test56.in
Normal file
21
src/testdir/test56.in
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Test for script-local function. vim: set ft=vim :
|
||||||
|
|
||||||
|
STARTTEST
|
||||||
|
:so small.vim
|
||||||
|
:"
|
||||||
|
:set nocp
|
||||||
|
:/^start:/+1,/^end:/-1w! Xtest.vim
|
||||||
|
:source Xtest.vim
|
||||||
|
_x
|
||||||
|
:$-1,$wq! test.out
|
||||||
|
ENDTEST
|
||||||
|
|
||||||
|
start:
|
||||||
|
fun <SID>DoLast()
|
||||||
|
call append(line('$'), "last line")
|
||||||
|
endfun
|
||||||
|
fun s:DoNothing()
|
||||||
|
call append(line('$'), "nothing line")
|
||||||
|
endfun
|
||||||
|
nnoremap <buffer> _x :call <SID>DoNothing()<bar>call <SID>DoLast()<cr>
|
||||||
|
end:
|
2
src/testdir/test56.ok
Normal file
2
src/testdir/test56.ok
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
nothing line
|
||||||
|
last line
|
Reference in New Issue
Block a user