summaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-07-19 14:04:47 +0200
committerBram Moolenaar <Bram@vim.org>2014-07-19 14:04:47 +0200
commit07d87790f1e733d69bd7910bf049adeeb6d0f338 (patch)
treecfafa9324d4664657695a094a68107ad5e6279e4 /runtime/syntax
parenta04854932ec96ab48498fd4a5e8b5f4fd4df14cf (diff)
downloadvim-07d87790f1e733d69bd7910bf049adeeb6d0f338.zip
Update runtime files. Make matchparen plugin backwards compatible.
Add json filetype.
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/debchangelog.vim4
-rw-r--r--runtime/syntax/debcontrol.vim19
-rw-r--r--runtime/syntax/debsources.vim4
-rw-r--r--runtime/syntax/json.vim16
-rw-r--r--runtime/syntax/python.vim4
5 files changed, 39 insertions, 8 deletions
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 4b3cbc7b3..6206fa388 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2014 Jan 20
+" Last Change: 2014 Jul 11
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
" Standard syntax initialization
@@ -19,7 +19,7 @@ syn case ignore
" Define some common expressions we can use later on
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
-syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(lucid|precise|quantal|saucy|trusty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index 2a14b67f0..5d9d45d02 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2013 Oct 28
+" Last Change: 2014 May 01
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
" Standard syntax initialization
@@ -13,6 +13,9 @@ elseif exists("b:current_syntax")
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
" Should match case except for the keys of each field
syn case match
@@ -23,8 +26,17 @@ syn match debcontrolElse "^.*$"
syn match debControlComma ", *"
syn match debControlSpace " "
+let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)'
+let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386'
+ \ . '\|ia64\|lpia\|m32r\|m68k\|mipsel\|mips\|powerpcspe\|powerpc\|ppc64el'
+ \ . '\|ppc64\|s390x\|s390\|sh3eb\|sh3\|sh4eb\|sh4\|sh\|sparc64\|sparc\|x32\)'
+let s:pairs = 'hurd-i386\|kfreebsd-i386\|kfreebsd-amd64\|knetbsd-i386\|kopensolaris-i386\|netbsd-alpha\|netbsd-i386'
+
" Define some common expressions we can use later on
-syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\|64\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\%(spe\)\=\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|x32\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)"
+exe 'syn match debcontrolArchitecture contained "\%(all\|'. s:kernels .'-any\|\%(any-\)\='. s:archs .'\|'. s:pairs .'\|any\)"'
+
+unlet s:kernels s:archs s:pairs
+
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
@@ -108,4 +120,7 @@ endif
let b:current_syntax = "debcontrol"
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
" vim: ts=8 sw=2
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index 0146d3d00..e877b06ae 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2014 Jan 20
+" Last Change: 2014 Jul 11
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
" Standard syntax initialization
@@ -23,7 +23,7 @@ syn match debsourcesComment /#.*/ contains=@Spell
" Match uri's
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
-syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|saucy\|trusty\)\([-[:alnum:]_./]*\)+
+syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|jessie\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|trusty\|utopic\)\([-[:alnum:]_./]*\)+
" Associate our matches and regions with pretty colours
hi def link debsourcesLine Error
diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim
new file mode 100644
index 000000000..f2d880b1d
--- /dev/null
+++ b/runtime/syntax/json.vim
@@ -0,0 +1,16 @@
+" Vim syntax file
+" Language: JSON
+" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
+" Last Change: 2014 Jul 16
+
+" For version 5.x: Clear all syntax items.
+" For version 6.x and later: Quit when a syntax file was already loaded.
+if exists('b:current_syntax')
+ finish
+endif
+
+" Use JavaScript syntax. JSON is a subset of JavaScript.
+runtime! syntax/javascript.vim
+unlet b:current_syntax
+
+let b:current_syntax = 'json'
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index 71b4405e9..a4ffcd424 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Neil Schemenauer <nas@python.ca>
-" Last Change: 2013 Feb 26
+" Last Change: 2014 Jul 16
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
" Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
@@ -113,7 +113,7 @@ syn match pythonEscape "\\\o\{1,3}" contained
syn match pythonEscape "\\x\x\{2}" contained
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
-syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
+syn match pythonEscape "\\N{.\{-}}" contained
syn match pythonEscape "\\$"
if exists("python_highlight_all")