summaryrefslogtreecommitdiff
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
parenta04854932ec96ab48498fd4a5e8b5f4fd4df14cf (diff)
downloadvim-git-07d87790f1e733d69bd7910bf049adeeb6d0f338.tar.gz
Update runtime files. Make matchparen plugin backwards compatible.
Add json filetype.
-rw-r--r--runtime/doc/editing.txt7
-rw-r--r--runtime/doc/eval.txt4
-rw-r--r--runtime/doc/todo.txt46
-rw-r--r--runtime/filetype.vim7
-rw-r--r--runtime/ftplugin/json.vim17
-rw-r--r--runtime/indent/json.vim13
-rw-r--r--runtime/plugin/matchparen.vim16
-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
12 files changed, 133 insertions, 24 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 9b465e846..0b5f69a7b 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.4. Last change: 2014 May 02
+*editing.txt* For Vim version 7.4. Last change: 2014 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1362,6 +1362,11 @@ cannot be read without the right key.
{only available when compiled with the |+cryptv| feature} *E833*
The text in the swap file and the undo file is also encrypted. *E843*
+However, this is done block-by-block and may reduce the time needed to crack a
+password. You can disable the swap file, but then a crash will cause you to
+lose your work. The undo file can be disabled without much disadvantage. >
+ :set noundofile
+ :noswapfile edit secrets
Note: The text in memory is not encrypted. A system administrator may be able
to see your text while you are editing it. When filtering text with
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index d75799ab5..cbd995da3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2014 Jul 06
+*eval.txt* For Vim version 7.4. Last change: 2014 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6512,7 +6512,7 @@ winsaveview() Returns a |Dictionary| that contains information to restore
buffer and you want to go back to the original view.
This does not save fold information. Use the 'foldenable'
option to temporarily switch off folding, so that folds are
- not opened when moving around.
+ not opened when moving around. This may have side effects.
The return value includes:
lnum cursor line number
col cursor column (Note: the first column
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index fc954cff0..77d5a63f6 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.4. Last change: 2014 Jul 10
+*todo.txt* For Vim version 7.4. Last change: 2014 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,7 +34,7 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Forfeit test_listlbr when encoding is not utf8? (Danek Duvall)
+Completion menu: remove redraw (Hirohito Higashi)
Regexp problems:
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
@@ -49,12 +49,41 @@ Regexp problems:
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
-Patch to set y_width when getting the register from the clipboard.
-(Yukihiro Nakadaira, 2014 Jul 10)
+Crash when splitting the window when the size is tiny.
+(Yukihiro Nakadaira, 2014 Jul 15-16)
+
+Another problem with splitting window. (Yukihiro Nakadaira, 2014 Jul 17)
+Patch Jul 17.
+
+Using freed memory when jumping from a quickfix list. (lcd47, 2014 Jul 17)
+
+Patch to fix valgrind error. (Dominique Pelle, 2014 Jul 9)
+
+Vroom filetype support. (David Barnett, 2014 Jul 10)
+
+u_undo error. Reproduce with description from Ayberk Ozgur, 2014 Jul 17.
+
+Updated Django files. (Dave Hodder, 2014 Jul 13)
+
+Title of quickfist list is not kept for setqflist(list 'r').
+(Lcd, 2014 Jul 17) With test Jul 18.
+
+Patch to fix noremap flags not cleared after typing Esc. (Jacob Niehus, 2014
+Jul 9)
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
+DiffChange highlighting doesn't combine with 'cursurline'. (Benjamin Fritz)
+Patch by Christian (2014 Jul 12)
+
+BufWinLeave autocommand executed in the wrong buffer? (Davit Samvelyan, 2014
+Jul 14)
+
+When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard
+after the last delete? (Praful, 2014 May 28)
+Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25.
+
Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31)
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
@@ -93,6 +122,8 @@ Phpcomplete.vim update. (Complex, 2014 Jan 15)
PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
+Patch for matchparen. (James McCoy, 2014 Jul 11)
+
Spell files use a latin single quote. Unicode also has another single quote:
0x2019. (Ron Aaron, 2014 Apr 4)
New OpenOffice spell files support this with ICONV. But they are not
@@ -128,10 +159,6 @@ from?
Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman,
2014 Jun 8)
-When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard
-after the last delete? (Praful, 2014 May 28)
-Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25.
-
Include a plugin manager with Vim? Neobundle seems to be the best currently.
Long message about this from ZyX, 2014 Mar 23. And following replies.
Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
@@ -493,6 +520,9 @@ Aug 16)
When there are no command line arguments ":next" and ":argu" give E163, which
is confusing. Should say "the argument list is empty".
+xterm supports escape sequences to mark a paste operation. Need to be
+enabled. (Bruno Sutic, 2014 Jul 11) How to know the terminal supports this?
+
URXVT:
- will get stuck if byte sequence does not contain the expected semicolon.
- Use urxvt mouse support also in xterm. Explanations:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 677e9bbdb..b9f8b9079 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: 2014 Jul 09
+" Last Change: 2014 Jul 16
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -989,7 +989,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
au BufNewFile,BufRead *.jj,*.jjt setf javacc
" JavaScript, ECMAScript
-au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json setf javascript
+au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
" Java Server Pages
au BufNewFile,BufRead *.jsp setf jsp
@@ -1007,6 +1007,9 @@ au BufNewFile,BufRead *.jgr setf jgraph
" Jovial
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
+" JSON
+au BufNewFile,BufRead *.json setf json
+
" Kixtart
au BufNewFile,BufRead *.kix setf kix
diff --git a/runtime/ftplugin/json.vim b/runtime/ftplugin/json.vim
new file mode 100644
index 000000000..c79b13fc6
--- /dev/null
+++ b/runtime/ftplugin/json.vim
@@ -0,0 +1,17 @@
+" Vim filetype plugin
+" Language: JSON
+" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
+" Last Change: 2014 Jul 16
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = 'setlocal formatoptions< comments< commentstring<'
+
+setlocal formatoptions-=t
+
+" JSON has no comments.
+setlocal comments=
+setlocal commentstring=
diff --git a/runtime/indent/json.vim b/runtime/indent/json.vim
new file mode 100644
index 000000000..d50112b93
--- /dev/null
+++ b/runtime/indent/json.vim
@@ -0,0 +1,13 @@
+" Vim indent file
+" Language: JSON
+" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
+" Last Change: 2014 Jul 16
+
+if exists('b:did_indent')
+ finish
+endif
+
+" JSON is a subset of JavaScript. JavaScript indenting should work fine.
+runtime! indent/javascript.vim
+
+let b:did_indent = 1
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 23c79382f..817ce62b2 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2014 Jul 09
+" Last Change: 2014 Jul 19
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -88,7 +88,13 @@ function! s:Highlight_Matching_Pair()
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
- let save_cursor = getcurpos()
+ let has_getcurpos = exists("*getcurpos")
+ if has_getcurpos
+ " getcurpos() is more efficient but doesn't exist before 7.4.313.
+ let save_cursor = getcurpos()
+ else
+ let save_cursor = winsaveview()
+ endif
call cursor(c_lnum, c_col - before)
endif
@@ -148,7 +154,11 @@ function! s:Highlight_Matching_Pair()
endtry
if before > 0
- call setpos('.', save_cursor)
+ if has_getcurpos
+ call setpos('.', save_cursor)
+ else
+ call winrestview(save_cursor)
+ endif
endif
" If a match is found setup match highlighting.
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")