summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-04-13 23:04:47 +0200
committerBram Moolenaar <Bram@vim.org>2012-04-13 23:04:47 +0200
commit53bfca22f1f67934defa5f9c62ae5a6d5cf9f198 (patch)
tree99509c9b58f5f10912f19b8179c4743d4c205835
parent09210ac93cacd4552593604066a86b2e7036a636 (diff)
downloadvim-53bfca22f1f67934defa5f9c62ae5a6d5cf9f198.zip
Updated runtime files.
-rw-r--r--runtime/autoload/netrw.vim1
-rw-r--r--runtime/doc/eval.txt4
-rw-r--r--runtime/doc/if_lua.txt15
-rw-r--r--runtime/doc/map.txt4
-rw-r--r--runtime/doc/syntax.txt4
-rw-r--r--runtime/doc/tags18
-rw-r--r--runtime/doc/todo.txt4
-rw-r--r--runtime/doc/windows.txt8
-rw-r--r--runtime/filetype.vim14
-rw-r--r--runtime/ftplugin/git.vim5
-rw-r--r--runtime/ftplugin/gitcommit.vim17
-rw-r--r--runtime/indent/gitconfig.vim4
-rw-r--r--runtime/syntax/asm.vim7
-rw-r--r--runtime/syntax/django.vim6
-rw-r--r--runtime/syntax/gitcommit.vim8
-rw-r--r--runtime/syntax/gitrebase.vim5
16 files changed, 74 insertions, 50 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 316593345..2700a8c82 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -324,7 +324,6 @@ call s:NetrwInit("g:netrw_localmkdir","mkdir")
if !executable(g:netrw_localmkdir)
call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
endif
-endif
call s:NetrwInit("g:netrw_remote_mkdir","mkdir")
if exists("g:netrw_local_movecmd")
let g:netrw_localmovecmd= g:netrw_local_movecmd"
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 321995ec2..73ea05eb8 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.3. Last change: 2012 Apr 01
+*eval.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5092,7 +5092,7 @@ setline({lnum}, {text}) *setline()*
will be set to the items in the list. Example: >
:call setline(5, ['aaa', 'bbb', 'ccc'])
< This is equivalent to: >
- :for [n, l] in [[5, 6, 7], ['aaa', 'bbb', 'ccc']]
+ :for [n, l] in [[5, 'aaa'], [6, 'bbb'], [7, 'ccc']]
: call setline(n, l)
:endfor
< Note: The '[ and '] marks are not set.
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index 718a229eb..6626e383e 100644
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -59,13 +59,14 @@ Example:
<
*:luado*
-:[range]luado {body} Execute Lua function "function (line) {body} end" for
- each line in the [range], with the function argument
- being set to the text of each line in turn, without a
- trailing <EOL>. If the value returned by the function
- is a string it becomes the text of the line in the
- current turn. The default for [range] is the whole
- file: "1,$". {not in Vi}
+:[range]luado {body} Execute Lua function "function (line, linenr) {body}
+ end" for each line in the [range], with the function
+ argument being set to the text of each line in turn,
+ without a trailing <EOL>, and the current line number.
+ If the value returned by the function is a string it
+ becomes the text of the line in the current turn. The
+ default for [range] is the whole file: "1,$".
+ {not in Vi}
Examples:
>
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index f117f6fb3..0c46d4542 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 7.3. Last change: 2012 Feb 02
+*map.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1188,7 +1188,7 @@ reported if any are supplied). However, it is possible to specify that the
command can take arguments, using the -nargs attribute. Valid cases are:
-nargs=0 No arguments are allowed (the default)
- -nargs=1 Exactly one argument is require, it includes spaces
+ -nargs=1 Exactly one argument is required, it includes spaces
-nargs=* Any number of arguments are allowed (0, 1, or many),
separated by white space
-nargs=? 0 or 1 arguments are allowed
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 5a8326091..f6db8f780 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.3. Last change: 2012 Apr 05
+*syntax.txt* For Vim version 7.3. Last change: 2012 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2841,7 +2841,7 @@ substitution will not be made.
(La)Tex keywords normally use the characters 0-9,a-z,A-Z,192-255 only
but the "_" is the only one that causes problems. So, by default,
-syntax/tex.vim overrides the usual |'iskeyword'| setting (using |setlocal|)
+syntax/tex.vim overrides the usual |'iskeyword'| setting (using |:setlocal|)
with one that works for LaTeX.
However, one may override this iskeyword re-setting by setting the
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 8d7e1d6e7..0e5bacd72 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3630,9 +3630,6 @@ E287 mbyte.txt /*E287*
E288 mbyte.txt /*E288*
E289 mbyte.txt /*E289*
E29 change.txt /*E29*
-E290 mbyte.txt /*E290*
-E291 mbyte.txt /*E291*
-E292 mbyte.txt /*E292*
E293 message.txt /*E293*
E294 message.txt /*E294*
E295 message.txt /*E295*
@@ -4995,6 +4992,7 @@ cino-g indent.txt /*cino-g*
cino-h indent.txt /*cino-h*
cino-i indent.txt /*cino-i*
cino-j indent.txt /*cino-j*
+cino-k indent.txt /*cino-k*
cino-l indent.txt /*cino-l*
cino-m indent.txt /*cino-m*
cino-n indent.txt /*cino-n*
@@ -5829,6 +5827,7 @@ g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
g:netrw_decompress pi_netrw.txt /*g:netrw_decompress*
g:netrw_dirhistmax pi_netrw.txt /*g:netrw_dirhistmax*
+g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
@@ -5836,6 +5835,7 @@ g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
g:netrw_ftp_cmd pi_netrw.txt /*g:netrw_ftp_cmd*
g:netrw_ftp_list_cmd pi_netrw.txt /*g:netrw_ftp_list_cmd*
+g:netrw_ftp_options pi_netrw.txt /*g:netrw_ftp_options*
g:netrw_ftp_sizelist_cmd pi_netrw.txt /*g:netrw_ftp_sizelist_cmd*
g:netrw_ftp_timelist_cmd pi_netrw.txt /*g:netrw_ftp_timelist_cmd*
g:netrw_ftpextracmd pi_netrw.txt /*g:netrw_ftpextracmd*
@@ -5850,10 +5850,10 @@ g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir*
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
g:netrw_liststyle pi_netrw.txt /*g:netrw_liststyle*
-g:netrw_local_mkdir pi_netrw.txt /*g:netrw_local_mkdir*
-g:netrw_local_rmdir pi_netrw.txt /*g:netrw_local_rmdir*
g:netrw_localcopycmd pi_netrw.txt /*g:netrw_localcopycmd*
+g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
+g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen*
g:netrw_menu pi_netrw.txt /*g:netrw_menu*
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
@@ -5902,6 +5902,7 @@ g:tar_readoptions pi_tar.txt /*g:tar_readoptions*
g:tar_secure pi_tar.txt /*g:tar_secure*
g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions*
g:tex_conceal syntax.txt /*g:tex_conceal*
+g:tex_isk syntax.txt /*g:tex_isk*
g:var eval.txt /*g:var*
g:vimball_home pi_vimball.txt /*g:vimball_home*
g:vimball_mkdir pi_vimball.txt /*g:vimball_mkdir*
@@ -6183,6 +6184,7 @@ hl-Cursor syntax.txt /*hl-Cursor*
hl-CursorColumn syntax.txt /*hl-CursorColumn*
hl-CursorIM syntax.txt /*hl-CursorIM*
hl-CursorLine syntax.txt /*hl-CursorLine*
+hl-CursorLineNr syntax.txt /*hl-CursorLineNr*
hl-DiffAdd syntax.txt /*hl-DiffAdd*
hl-DiffChange syntax.txt /*hl-DiffChange*
hl-DiffDelete syntax.txt /*hl-DiffDelete*
@@ -6559,6 +6561,9 @@ lpc.vim syntax.txt /*lpc.vim*
lua if_lua.txt /*lua*
lua-buffer if_lua.txt /*lua-buffer*
lua-commands if_lua.txt /*lua-commands*
+lua-dict if_lua.txt /*lua-dict*
+lua-list if_lua.txt /*lua-list*
+lua-luaeval if_lua.txt /*lua-luaeval*
lua-vim if_lua.txt /*lua-vim*
lua-window if_lua.txt /*lua-window*
lua.vim syntax.txt /*lua.vim*
@@ -6935,8 +6940,11 @@ netrw-updir pi_netrw.txt /*netrw-updir*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-userpass pi_netrw.txt /*netrw-userpass*
netrw-v pi_netrw.txt /*netrw-v*
+netrw-var pi_netrw.txt /*netrw-var*
netrw-variables pi_netrw.txt /*netrw-variables*
netrw-vexplore pi_netrw.txt /*netrw-vexplore*
+netrw-windows-netrc pi_netrw.txt /*netrw-windows-netrc*
+netrw-windows-s pi_netrw.txt /*netrw-windows-s*
netrw-write pi_netrw.txt /*netrw-write*
netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 1e4e57db5..b7170b3fc 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.3. Last change: 2012 Apr 05
+*todo.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -130,6 +130,8 @@ Patch to pass list to or(), and() and xor(). (Yasuhiro Matsumoto, 2012 Feb 8)
Patch to improve "it" and "at" text object matching. (Christian Brabandt, 2011
Nov 20)
+Patch to add ":py3do". (Lilydjwg, 2012 Apr 7)
+
`[ moves to character after insert, instead of the last inserted character.
(Yukihiro Nakadaira, 2011 Dec 9)
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 31a0e2544..b9f771d75 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 7.3. Last change: 2011 Aug 14
+*windows.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -174,7 +174,8 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
2. WinEnter for the new window
3. BufLeave for the current buffer
4. BufEnter for the new buffer
- This behaves like a ":split" first, and then a ":e" command.
+ This behaves like a ":split" first, and then an ":enew"
+ command.
:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew*
Like |:new|, but split vertically. If 'equalalways' is set
@@ -183,7 +184,8 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
:[N]new [++opt] [+cmd] {file}
:[N]sp[lit] [++opt] [+cmd] {file} *:split_f*
- Create a new window and start editing file {file} in it.
+ Create a new window and start editing file {file} in it. This
+ behaves like a ":split" first, and then an ":e" command.
If [+cmd] is given, execute the command when the file has been
loaded |+cmd|.
Also see |++opt|.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 2a2c0b76c..9eda33438 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2012 Apr 05
+" Last Change: 2012 Apr 13
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -17,7 +17,7 @@ augroup filetypedetect
" Ignored extensions
if exists("*fnameescape")
-au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.rpmsave,?\+.rpmnew
+au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew
\ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r"))
au BufNewFile,BufRead *~
\ let s:name = expand("<afile>") |
@@ -239,8 +239,8 @@ func! s:FTVB(alt)
endif
endfunc
-" Visual Basic Script (close to Visual Basic)
-au BufNewFile,BufRead *.vbs,*.dsm,*.ctl setf vb
+" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
+au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
" IBasic file (similar to QBasic)
au BufNewFile,BufRead *.iba,*.ibi setf ibasic
@@ -735,9 +735,11 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
" Git
-au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
+au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
-au BufNewFile,BufRead git-rebase-todo setf gitrebase
+au BufNewFile,BufRead *.git/modules/**/COMMIT_EDITMSG setf gitcommit
+au BufNewFile,BufRead *.git/modules/**/config setf gitconfig
+au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufNewFile,BufRead .msg.[0-9]*
\ if getline(1) =~ '^From.*# This line is ignored.$' |
\ setf gitsendemail |
diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim
index e043c7587..c9bcd4369 100644
--- a/runtime/ftplugin/git.vim
+++ b/runtime/ftplugin/git.vim
@@ -1,7 +1,6 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -10,7 +9,9 @@ endif
let b:did_ftplugin = 1
if !exists('b:git_dir')
- if expand('%:p') =~# '\.git\>'
+ if expand('%:p') =~# '[\/]\.git[\/]modules[\/]'
+ " Stay out of the way
+ elseif expand('%:p') =~# '\.git\>'
let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
elseif $GIT_DIR != ''
let b:git_dir = $GIT_DIR
diff --git a/runtime/ftplugin/gitcommit.vim b/runtime/ftplugin/gitcommit.vim
index 94d635c5d..86ee5222e 100644
--- a/runtime/ftplugin/gitcommit.vim
+++ b/runtime/ftplugin/gitcommit.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2010 May 21
+" Last Change: 2012 April 7
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -11,13 +11,14 @@ endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
+setlocal nomodeline
+
+let b:undo_ftplugin = 'setl modeline<'
+
if &textwidth == 0
" make sure that log messages play nice with git-log on standard terminals
setlocal textwidth=72
- if !exists("b:undo_ftplugin")
- let b:undo_ftplugin = ""
- endif
- let b:undo_ftplugin = b:undo_ftplugin . "|setl tw<"
+ let b:undo_ftplugin .= "|setl tw<"
endif
if exists("g:no_gitcommit_commands") || v:version < 700
@@ -28,8 +29,6 @@ if !exists("b:git_dir")
let b:git_dir = expand("%:p:h")
endif
-" Automatically diffing can be done with:
-" autocmd FileType gitcommit DiffGitCached | wincmd p
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
function! s:diffcomplete(A,L,P)
@@ -58,11 +57,11 @@ function! s:gitdiffcached(bang,gitdir,...)
else
let extra = "-p --stat=".&columns
endif
- call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
+ call system(git." diff --cached --no-color --no-ext-diff ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name)
wincmd P
let b:git_dir = a:gitdir
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
- nnoremap <silent> q :q<CR>
+ nnoremap <buffer> <silent> q :q<CR>
setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
endfunction
diff --git a/runtime/indent/gitconfig.vim b/runtime/indent/gitconfig.vim
index fa57e56ab..8eece5d30 100644
--- a/runtime/indent/gitconfig.vim
+++ b/runtime/indent/gitconfig.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2010 May 21
+" Last Change: 2012 April 7
if exists("b:did_indent")
finish
@@ -12,6 +12,8 @@ setlocal autoindent
setlocal indentexpr=GetGitconfigIndent()
setlocal indentkeys=o,O,*<Return>,0[,],0;,0#,=,!^F
+let b:undo_indent = 'setl ai< inde< indk<'
+
" Only define the function once.
if exists("*GetGitconfigIndent")
finish
diff --git a/runtime/syntax/asm.vim b/runtime/syntax/asm.vim
index 0ce8d2399..f208245ab 100644
--- a/runtime/syntax/asm.vim
+++ b/runtime/syntax/asm.vim
@@ -3,7 +3,7 @@
" Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
" Previous maintainer:
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
-" Last Change: 2012 Jan 5
+" Last Change: 2012 Apr 09
" Thanks to Ori Avtalion for feedback on the comment markers!
@@ -56,6 +56,11 @@ syn keyword asmTodo contained TODO
" GAS supports one type of multi line comments:
syn region asmComment start="/\*" end="\*/" contains=asmTodo
+" GAS (undocumentedly?) supports C++ style comments. Unlike in C/C++ however,
+" a backslash ending a C++ style comment does not extend the comment to the
+" next line (hence the syntax region does not define 'skip="\\$"')
+syn region asmComment start="//" end="$" keepend contains=asmTodo
+
" Line comment characters depend on the target architecture and command line
" options and some comments may double as logical line number directives or
" preprocessor commands. This situation is described at
diff --git a/runtime/syntax/django.vim b/runtime/syntax/django.vim
index 67c46b726..04abcc9c0 100644
--- a/runtime/syntax/django.vim
+++ b/runtime/syntax/django.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Django template
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
-" Last Change: 2010 May 19
+" Last Change: 2012 Apr 09
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -21,7 +21,7 @@ syn match djangoError "%}\|}}\|#}"
syn keyword djangoStatement contained autoescape csrf_token empty
" FIXME ==, !=, <, >, <=, and >= should be djangoStatements:
" syn keyword djangoStatement contained == != < > <= >=
-syn keyword djangoStatement contained and as block endblock by cycle debug else
+syn keyword djangoStatement contained and as block endblock by cycle debug else elif
syn keyword djangoStatement contained extends filter endfilter firstof for
syn keyword djangoStatement contained endfor if endif ifchanged endifchanged
syn keyword djangoStatement contained ifequal endifequal ifnotequal
@@ -45,7 +45,7 @@ syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust
syn keyword djangoFilter contained lower make_list phone2numeric pluralize
syn keyword djangoFilter contained pprint random removetags rjust slice slugify
syn keyword djangoFilter contained safe safeseq stringformat striptags
-syn keyword djangoFilter contained time timesince timeuntil title
+syn keyword djangoFilter contained time timesince timeuntil title truncatechars
syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode
syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno
diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim
index 07447ca5e..83cd4733f 100644
--- a/runtime/syntax/gitcommit.vim
+++ b/runtime/syntax/gitcommit.vim
@@ -2,7 +2,7 @@
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.git/COMMIT_EDITMSG
-" Last Change: 2010 May 21
+" Last Change: 2012 April 7
if exists("b:current_syntax")
finish
@@ -16,7 +16,7 @@ if has("spell")
endif
syn include @gitcommitDiff syntax/diff.vim
-syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^$\|^#\@=/ contains=@gitcommitDiff
+syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
@@ -26,7 +26,7 @@ syn match gitcommitComment "^#.*"
syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent
syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
-syn match gitcommitBranch "[^ \t']\+" contained
+syn match gitcommitBranch "[^ ']\+" contained
syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment
syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^# \)\@<=\%(Author\|Committer\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent
@@ -35,7 +35,7 @@ syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=g
syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
syn match gitcommitUntrackedFile "\t\@<=.*" contained
-syn region gitcommitDiscarded start=/^# Changed but not updated:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
+syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but not updated\):/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold
syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold
diff --git a/runtime/syntax/gitrebase.vim b/runtime/syntax/gitrebase.vim
index ba1745d01..084645630 100644
--- a/runtime/syntax/gitrebase.vim
+++ b/runtime/syntax/gitrebase.vim
@@ -2,7 +2,7 @@
" Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: git-rebase-todo
-" Last Change: 2010 May 21
+" Last Change: 2012 April 7
if exists("b:current_syntax")
finish
@@ -17,7 +17,9 @@ syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
+syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
+syn match gitrebaseCommand ".*" contained
syn match gitrebaseComment "^#.*" contains=gitrebaseHash
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
@@ -28,6 +30,7 @@ hi def link gitrebaseReword Number
hi def link gitrebaseEdit PreProc
hi def link gitrebaseSquash Type
hi def link gitrebaseFixup Special
+hi def link gitrebaseExec Function
hi def link gitrebaseSummary String
hi def link gitrebaseComment Comment
hi def link gitrebaseSquashError Error