Skip to content
Snippets Groups Projects
Commit 9de99979 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

Runtime file updates.

parent bc226b6d
No related merge requests found
*todo.txt* For Vim version 7.3f. Last change: 2010 Aug 08 *todo.txt* For Vim version 7.3f. Last change: 2010 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -30,10 +30,13 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. ...@@ -30,10 +30,13 @@ 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 -----------------------
'cursorline' stops too early in a help file, caused by conceal feature.
Before release 7.3: Before release 7.3:
- Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23) - Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23)
Test 73 fails on MS-Windows when compiled with DJGPP. Test 73 fails on MS-Windows when compiled with DJGPP.
Possibly change WIN3264 to MSWIN || MSDOS.
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5) Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
...@@ -57,6 +60,10 @@ Results in E670. (Tony Mechelynck, 2010 May 2) ...@@ -57,6 +60,10 @@ Results in E670. (Tony Mechelynck, 2010 May 2)
":helpgrep" does not put the cursor in the correct column when preceded by ":helpgrep" does not put the cursor in the correct column when preceded by
accented character. (Tony Mechelynck, 2010 Apr 15) accented character. (Tony Mechelynck, 2010 Apr 15)
Echo starts in the wrong column:
while 1 | let s = input('A') | echo 'R' | endw
(Boyko Bantchev, 2010 Aug 9)
Patch: Let rare word highlighting overrule good word highlighting. Patch: Let rare word highlighting overrule good word highlighting.
(Jakson A. Aquino, 2010 Jul 30) (Jakson A. Aquino, 2010 Jul 30)
......
" Vim filetype plugin file " Vim filetype plugin file
" Language: Perl " Language: Perl
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Maintainer: Andy Lester <andy@petdance.com>
" Last Change: 20 Jan 2009 " URL: http://github.com/petdance/vim-perl
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin " Last Change: 2009-08-14
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1 let b:did_ftplugin = 1
......
" Vim filetype plugin file
" Language: Perl 6
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2009-04-18
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
"
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
let s:save_cpo = &cpo
set cpo-=C
setlocal formatoptions+=crq
setlocal comments=:#
setlocal commentstring=#%s
" Change the browse dialog on Win32 to show mainly Perl-related files
if has("gui_win32")
let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
\ "Perl Modules (*.pm)\t*.pm\n" .
\ "Perl Documentation Files (*.pod)\t*.pod\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
setlocal include=\\<\\(use\\\|require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
setlocal define=[^A-Za-z_]
setlocal iskeyword=@,48-57,_,192-255
" The following line changes a global variable but is necessary to make
" gf and similar commands work. Thanks to Andrew Pimlott for pointing out
" the problem. If this causes a " problem for you, add an
" after/ftplugin/perl6.vim file that contains
" set isfname-=:
set isfname+=:
" Set this once, globally.
if !exists("perl6path")
if executable("perl6")
if &shellxquote != '"'
let perl6path = system('perl6 -e "print join(q/,/,@*INC)"')
else
let perl6path = system("perl6 -e 'print join(q/,/,@*INC)'")
endif
let perl6path = substitute(perl6path,',.$',',,','')
else
" If we can't call perl6 to get its path, just default to using the
" current directory and the directory of the current file.
let perl6path = ".,,"
endif
endif
let &l:path=perl6path
"---------------------------------------------
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
\ " | unlet! b:browsefilter"
" Restore the saved compatibility options.
let &cpo = s:save_cpo
" Vim filetype plugin file " Vim filetype plugin file
" Language: XS (Perl extension interface language) " Language: XS (Perl extension interface language)
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Andy Lester <andy@petdance.com>
" Last Change: 2001 Sep 18 " URL: http://github.com/petdance/vim-perl
" Last Change: 2009-08-14
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
endif endif
" Just use the C plugin for now. " Just use the C plugin for now.
......
" Vim indent file " Vim indent file
" Language: Perl " Language: Perl 5
" Author: Rafael Garcia-Suarez <rgarciasuarez@free.fr> " Author: Andy Lester <andy@petdance.com>
" URL: http://rgarciasuarez.free.fr/vim/indent/perl.vim " URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2010 Jul 28 " Last Change: June 3, 2009
" Suggestions and improvements by : " Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints) " Aaron J. Sherman (use syntax for hints)
" Artem Chuprina (play nice with folding) " Artem Chuprina (play nice with folding)
" Benjamin R. Haskell (fold syntax group fix)
" TODO things that are not or not properly indented (yet) : " TODO things that are not or not properly indented (yet) :
" - Continued statements " - Continued statements
...@@ -22,7 +21,7 @@ ...@@ -22,7 +21,7 @@
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
finish finish
endif endif
let b:did_indent = 1 let b:did_indent = 1
...@@ -30,14 +29,14 @@ let b:did_indent = 1 ...@@ -30,14 +29,14 @@ let b:did_indent = 1
let b:indent_use_syntax = has("syntax") let b:indent_use_syntax = has("syntax")
setlocal indentexpr=GetPerlIndent() setlocal indentexpr=GetPerlIndent()
setlocal indentkeys+=0=,0),0=or,0=and setlocal indentkeys+=0=,0),0],0=or,0=and
if !b:indent_use_syntax if !b:indent_use_syntax
setlocal indentkeys+=0=EO setlocal indentkeys+=0=EO
endif endif
" Only define the function once. " Only define the function once.
if exists("*GetPerlIndent") if exists("*GetPerlIndent")
finish finish
endif endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
...@@ -45,137 +44,137 @@ set cpo-=C ...@@ -45,137 +44,137 @@ set cpo-=C
function GetPerlIndent() function GetPerlIndent()
" Get the line to be indented " Get the line to be indented
let cline = getline(v:lnum) let cline = getline(v:lnum)
" Indent POD markers to column 0 " Indent POD markers to column 0
if cline =~ '^\s*=\L\@!' if cline =~ '^\s*=\L\@!'
return 0 return 0
endif endif
" Don't reindent coments on first column " Don't reindent coments on first column
if cline =~ '^#.' if cline =~ '^#.'
return 0 return 0
endif endif
" Get current syntax item at the line's first char " Get current syntax item at the line's first char
let csynid = '' let csynid = ''
if b:indent_use_syntax if b:indent_use_syntax
let csynid = synIDattr(synID(v:lnum,1,0),"name") let csynid = synIDattr(synID(v:lnum,1,0),"name")
endif
" Don't reindent POD and heredocs
if csynid == "perlPOD" || csynid == "perlHereDoc" || csynid =~ "^pod"
return indent(v:lnum)
endif
" Indent end-of-heredocs markers to column 0
if b:indent_use_syntax
" Assumes that an end-of-heredoc marker matches \I\i* to avoid
" confusion with other types of strings
if csynid == "perlStringStartEnd" && cline =~ '^\I\i*$'
return 0
endif endif
else
" Without syntax hints, assume that end-of-heredocs markers begin with EO " Don't reindent POD and heredocs
if cline =~ '^\s*EO' if csynid == "perlPOD" || csynid == "perlHereDoc" || csynid =~ "^pod"
return 0 return indent(v:lnum)
endif endif
endif
" Indent end-of-heredocs markers to column 0
" Now get the indent of the previous perl line. if b:indent_use_syntax
" Assumes that an end-of-heredoc marker matches \I\i* to avoid
" Find a non-blank line above the current line. " confusion with other types of strings
let lnum = prevnonblank(v:lnum - 1) if csynid == "perlStringStartEnd" && cline =~ '^\I\i*$'
" Hit the start of the file, use zero indent. return 0
if lnum == 0 endif
return 0 else
endif " Without syntax hints, assume that end-of-heredocs markers begin with EO
let line = getline(lnum) if cline =~ '^\s*EO'
let ind = indent(lnum) return 0
" Skip heredocs, POD, and comments on 1st column endif
if b:indent_use_syntax
let skippin = 2
while skippin
let synid = synIDattr(synID(lnum,1,0),"name")
if (synid == "perlStringStartEnd" && line =~ '^\I\i*$')
\ || (skippin != 2 && synid == "perlPOD")
\ || (skippin != 2 && synid == "perlHereDoc")
\ || synid == "perlComment"
\ || synid =~ "^pod"
let lnum = prevnonblank(lnum - 1)
if lnum == 0
return 0
endif
let line = getline(lnum)
let ind = indent(lnum)
let skippin = 1
else
let skippin = 0
endif
endwhile
else
if line =~ "^EO"
let lnum = search("<<[\"']\\=EO", "bW")
let line = getline(lnum)
let ind = indent(lnum)
endif endif
endif
" Now get the indent of the previous perl line.
" Indent blocks enclosed by {} or ()
if b:indent_use_syntax " Find a non-blank line above the current line.
" Find a real opening brace let lnum = prevnonblank(v:lnum - 1)
let bracepos = match(line, '[(){}]', matchend(line, '^\s*[)}]')) " Hit the start of the file, use zero indent.
while bracepos != -1 if lnum == 0
let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name") return 0
" If the brace is highlighted in one of those groups, indent it.
" 'perlHereDoc' is here only to handle the case '&foo(<<EOF)'.
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid == "perlHereDoc"
\ || synid =~ "^perlFiledescStatement"
\ || synid =~ '^perl\(Sub\|Block\)Fold'
let brace = strpart(line, bracepos, 1)
if brace == '(' || brace == '{'
let ind = ind + &sw
else
let ind = ind - &sw
endif
endif
let bracepos = match(line, '[(){}]', bracepos + 1)
endwhile
let bracepos = matchend(cline, '^\s*[)}]')
if bracepos != -1
let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid =~ '^perl\(Sub\|Block\)Fold'
let ind = ind - &sw
endif
endif endif
else let line = getline(lnum)
if line =~ '[{(]\s*\(#[^)}]*\)\=$' let ind = indent(lnum)
let ind = ind + &sw " Skip heredocs, POD, and comments on 1st column
if b:indent_use_syntax
let skippin = 2
while skippin
let synid = synIDattr(synID(lnum,1,0),"name")
if (synid == "perlStringStartEnd" && line =~ '^\I\i*$')
\ || (skippin != 2 && synid == "perlPOD")
\ || (skippin != 2 && synid == "perlHereDoc")
\ || synid == "perlComment"
\ || synid =~ "^pod"
let lnum = prevnonblank(lnum - 1)
if lnum == 0
return 0
endif
let line = getline(lnum)
let ind = indent(lnum)
let skippin = 1
else
let skippin = 0
endif
endwhile
else
if line =~ "^EO"
let lnum = search("<<[\"']\\=EO", "bW")
let line = getline(lnum)
let ind = indent(lnum)
endif
endif endif
if cline =~ '^\s*[)}]'
let ind = ind - &sw " Indent blocks enclosed by {}, (), or []
if b:indent_use_syntax
" Find a real opening brace
let bracepos = match(line, '[(){}\[\]]', matchend(line, '^\s*[)}\]]'))
while bracepos != -1
let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name")
" If the brace is highlighted in one of those groups, indent it.
" 'perlHereDoc' is here only to handle the case '&foo(<<EOF)'.
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid == "perlHereDoc"
\ || synid =~ "^perlFiledescStatement"
\ || synid =~ '^perl\(Sub\|Block\)Fold'
let brace = strpart(line, bracepos, 1)
if brace == '(' || brace == '{' || brace == '['
let ind = ind + &sw
else
let ind = ind - &sw
endif
endif
let bracepos = match(line, '[(){}\[\]]', bracepos + 1)
endwhile
let bracepos = matchend(cline, '^\s*[)}\]]')
if bracepos != -1
let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid =~ '^perl\(Sub\|Block\)Fold'
let ind = ind - &sw
endif
endif
else
if line =~ '[{\[(]\s*\(#[^)}\]]*\)\=$'
let ind = ind + &sw
endif
if cline =~ '^\s*[)}\]]'
let ind = ind - &sw
endif
endif endif
endif
" Indent lines that begin with 'or' or 'and' " Indent lines that begin with 'or' or 'and'
if cline =~ '^\s*\(or\|and\)\>' if cline =~ '^\s*\(or\|and\)\>'
if line !~ '^\s*\(or\|and\)\>' if line !~ '^\s*\(or\|and\)\>'
let ind = ind + &sw let ind = ind + &sw
endif
elseif line =~ '^\s*\(or\|and\)\>'
let ind = ind - &sw
endif endif
elseif line =~ '^\s*\(or\|and\)\>'
let ind = ind - &sw
endif
return ind return ind
endfunction endfunction
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save
" vim:ts=8:sts=2:sw=2 " vim:ts=8:sts=4:sw=4:expandtab:ft=vim
This diff is collapsed.
...@@ -141,6 +141,7 @@ syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!" ...@@ -141,6 +141,7 @@ syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!"
" Special variables first ($^A, ...) and ($|, $', ...) " Special variables first ($^A, ...) and ($|, $', ...)
syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\=" syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\="
syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]" syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]"
syn match perlVarPlain "%+"
syn match perlVarPlain "$\%(0\|[1-9]\d*\)" syn match perlVarPlain "$\%(0\|[1-9]\d*\)"
" Same as above, but avoids confusion in $::foo (equivalent to $main::foo) " Same as above, but avoids confusion in $::foo (equivalent to $main::foo)
syn match perlVarPlain "$::\@!" syn match perlVarPlain "$::\@!"
...@@ -216,7 +217,8 @@ syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\ ...@@ -216,7 +217,8 @@ syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\
syn match perlNotEmptyLine "^\s\+$" contained syn match perlNotEmptyLine "^\s\+$" contained
" Highlight '} else if (...) {', it should be '} else { if (...) { ' or " Highlight '} else if (...) {', it should be '} else { if (...) { ' or
" '} elsif (...) {'. " '} elsif (...) {'.
syn match perlElseIfError "[^[:space:]{]\+" contained syn match perlElseIfError "\s\+if" contained
syn keyword perlElseIfError elseif
" Variable interpolation " Variable interpolation
" "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment