aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-02-01 15:30:51 -0500
committerJames McCoy <jamessan@jamessan.com>2017-02-01 18:34:58 -0500
commita5b875fe8677addfef2f295872eefcf217285da3 (patch)
treec8eea48d73ab8f21e910c7441bd772c389403450 /runtime
parent4e47568f89c4b937077d017baddd79de012694d8 (diff)
downloadrneovim-a5b875fe8677addfef2f295872eefcf217285da3.tar.gz
rneovim-a5b875fe8677addfef2f295872eefcf217285da3.tar.bz2
rneovim-a5b875fe8677addfef2f295872eefcf217285da3.zip
vim-patch:e18dbe8
Updated runtime files. https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt12
-rw-r--r--runtime/doc/indent.txt2
-rw-r--r--runtime/doc/options.txt4
-rw-r--r--runtime/doc/quickfix.txt16
-rw-r--r--runtime/filetype.vim2
-rw-r--r--runtime/ftplugin/python.vim34
-rw-r--r--runtime/indent/sh.vim22
-rw-r--r--runtime/indent/vim.vim6
-rw-r--r--runtime/syntax/tex.vim1
9 files changed, 70 insertions, 29 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b288662306..edf06959a2 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -784,8 +784,16 @@ equal" and "is" can be used. This compares the key/values of the |Dictionary|
recursively. Ignoring case means case is ignored when comparing item values.
*E694*
-A |Funcref| can only be compared with a |Funcref| and only "equal" and "not
-equal" can be used. Case is never ignored.
+A |Funcref| can only be compared with a |Funcref| and only "equal", "not
+equal", "is" and "isnot" can be used. Case is never ignored. Whether
+arguments or a Dictionary are bound (with a partial) matters. The
+Dictionaries must also be equal (or the same, in case of "is") and the
+arguments must be equal (or the same).
+
+To compare Funcrefs to see if they refer to the same function, ignoring bound
+Dictionary and arguments, use |get()| to get the function name: >
+ if get(Part1, 'name') == get(Part2, 'name')
+ " Part1 and Part2 refer to the same function
When using "is" or "isnot" with a |List| or a |Dictionary| this checks if the
expressions are referring to the same |List| or |Dictionary| instance. A copy
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 6e96d9b816..496ccbc703 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -810,7 +810,7 @@ PHP indenting can be altered in several ways by modifying the values of some
global variables:
*php-comment* *PHP_autoformatcomment*
-To not enable auto-formating of comments by default (if you want to use your
+To not enable auto-formatting of comments by default (if you want to use your
own 'formatoptions'): >
:let g:PHP_autoformatcomment = 0
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 7bc6f25638..e4c5299305 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1238,8 +1238,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Only non-printable keys are allowed.
The key can be specified as a single character, but it is difficult to
type. The preferred way is to use the <> notation. Examples: >
- :set cedit=<C-Y>
- :set cedit=<Esc>
+ :exe "set cedit=\<C-Y>"
+ :exe "set cedit=\<Esc>"
< |Nvi| also has this option, but it only uses the first character.
See |cmdwin|.
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index e94723f337..0b7907e364 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -30,10 +30,14 @@ positions in files. For example, |:vimgrep| finds pattern matches. You can
use the positions in a script with the |getqflist()| function. Thus you can
do a lot more than the edit/compile/fix cycle!
-You should save your compiler's error messages to a file and start vim with
-"vim -q filename". An easy way to do this is with the |:make| command (see
-below). The 'errorformat' option should be set to match the error messages
-from your compiler (see |errorformat| below).
+If you have the error messages in a file you can start Vim with: >
+ vim -q filename
+
+From inside Vim an easy way to run a command and handle the output is with the
+|:make| command (see below).
+
+The 'errorformat' option should be set to match the error messages from your
+compiler (see |errorformat| below).
*location-list* *E776*
A location list is similar to a quickfix list and contains a list of positions
@@ -42,8 +46,8 @@ have a separate location list. A location list can be associated with only
one window. The location list is independent of the quickfix list.
When a window with a location list is split, the new window gets a copy of the
-location list. When there are no references to a location list, the location
-list is destroyed.
+location list. When there are no longer any references to a location list,
+the location list is destroyed.
The following quickfix commands can be used. The location list commands are
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 93886d5379..24587c56dc 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1015,7 +1015,7 @@ au BufNewFile,BufRead *.jgr setf jgraph
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
-au BufNewFile,BufRead *.json,*.jsonp setf json
+au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" Kixtart
au BufNewFile,BufRead *.kix setf kix
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 9e2c5a763e..df5dab8afc 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -2,7 +2,7 @@
" Language: python
" Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Fri, 10 June 2016
+" Last Change: Wed, 29 June 2016
" https://github.com/sullyj3/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -22,28 +22,38 @@ setlocal omnifunc=pythoncomplete#Complete
set wildignore+=*.pyc
-nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)\>')<cr>
-nnoremap <silent> <buffer> [[ :call <SID>Python_jump('?^\(class\\|def\)\>')<cr>
-nnoremap <silent> <buffer> ]m :call <SID>Python_jump('/^\s*\(class\\|def\)\>')<cr>
-nnoremap <silent> <buffer> [m :call <SID>Python_jump('?^\s*\(class\\|def\)\>')<cr>
+nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '\v%$\|^(class\|def)>', 'W')<cr>
+nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '\v^(class\|def)>', 'Wb')<cr>
+nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '\v%$\|^\s*(class\|def)>', 'W')<cr>
+nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '\v^\s*(class\|def)>', 'Wb')<cr>
+
+xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '\v%$\|^(class\|def)>', 'W')<cr>
+xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '\v^(class\|def)>', 'Wb')<cr>
+xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '\v%$\|^\s*(class\|def)>', 'W')<cr>
+xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '\v^\s*(class\|def)>', 'Wb')<cr>
if !exists('*<SID>Python_jump')
- fun! <SID>Python_jump(motion) range
+ fun! <SID>Python_jump(mode, motion, flags) range
+ if a:mode == 'x'
+ normal! gv
+ endif
+
+ normal! 0
+
let cnt = v:count1
- let save = @/ " save last search pattern
mark '
while cnt > 0
- silent! exe a:motion
- let cnt = cnt - 1
+ call search(a:motion, a:flags)
+ let cnt = cnt - 1
endwhile
- call histdel('/', -1)
- let @/ = save " restore last search pattern
+
+ normal! ^
endfun
endif
if has("browsefilter") && !exists("b:browsefilter")
let b:browsefilter = "Python Files (*.py)\t*.py\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "All Files (*.*)\t*.*\n"
endif
" As suggested by PEP8.
diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim
index d05bb3770f..aca110f504 100644
--- a/runtime/indent/sh.vim
+++ b/runtime/indent/sh.vim
@@ -3,9 +3,15 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2016-02-15
+" Latest Revision: 2016-06-27
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
+" Changelog:
+" 20160627: - detect heredocs correctly
+" 20160213: - detect function definition correctly
+" 20160202: - use shiftwidth() function
+" 20151215: - set b:undo_indent variable
+" 20150728: - add foreach detection for zsh
if exists("b:did_indent")
finish
@@ -102,6 +108,8 @@ function! GetShIndent()
endif
elseif s:is_case_break(line)
let ind -= s:indent_value('case-breaks')
+ elseif s:is_here_doc(line)
+ let ind = 0
endif
return ind
@@ -160,6 +168,14 @@ function! s:is_case_break(line)
return a:line =~ '^\s*;[;&]'
endfunction
+function! s:is_here_doc(line)
+ if a:line =~ '^\w\+$'
+ let here_pat = '<<-\?'. s:escape(a:line). '\$'
+ return search(here_pat, 'bnW') > 0
+ endif
+ return 0
+endfunction
+
function! s:is_case_ended(line)
return s:is_case_break(a:line) || a:line =~ ';[;&]\s*\%(#.*\)\=$'
endfunction
@@ -172,5 +188,9 @@ function! s:is_case_empty(line)
endif
endfunction
+function! s:escape(pattern)
+ return '\V'. escape(a:pattern, '\\')
+endfunction
+
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index 7ec7df849e..8ebfa12caf 100644
--- a/runtime/indent/vim.vim
+++ b/runtime/indent/vim.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Apr 19
+" Last Change: 2016 Jun 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -60,7 +60,7 @@ function GetVimIndentIntern()
else
let ind = ind + shiftwidth() * 3
endif
- elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+[eE][nN][dD]'
+ elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>'
let ind = ind + shiftwidth()
else
" A line starting with :au does not increment/decrement indent.
@@ -89,7 +89,7 @@ function GetVimIndentIntern()
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
" :endfun, :else and :augroup END.
- if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+[eE][nN][dD]\)'
+ if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
let ind = ind - shiftwidth()
endif
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 65574211c4..e560573e6e 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -92,7 +92,6 @@ if !exists("g:tex_subscripts")
else
let s:tex_subscripts= g:tex_subscripts
endif
-echomsg "s:tex_subscripts=".s:tex_subscripts
" Determine whether or not to use "*.sty" mode {{{1
" The user may override the normal determination by setting