aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/CMakeLists.txt14
-rw-r--r--runtime/autoload/man.vim18
-rw-r--r--runtime/autoload/provider/clipboard.vim6
-rw-r--r--runtime/doc/eval.txt21
-rw-r--r--runtime/doc/filetype.txt2
-rw-r--r--runtime/doc/helphelp.txt2
-rw-r--r--runtime/doc/indent.txt2
-rw-r--r--runtime/doc/map.txt3
-rw-r--r--runtime/doc/options.txt14
-rw-r--r--runtime/doc/quickfix.txt16
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/doc/starting.txt2
-rw-r--r--runtime/doc/usr_41.txt4
-rw-r--r--runtime/doc/various.txt9
-rw-r--r--runtime/doc/vim_diff.txt1
-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/keymap/vietnamese-telex_utf-8.vim196
-rw-r--r--runtime/keymap/vietnamese-vni_utf-8.vim196
-rw-r--r--runtime/nvim.desktop81
-rw-r--r--runtime/nvim.pngbin0 -> 6432 bytes
-rw-r--r--runtime/syntax/c.vim4
-rw-r--r--runtime/syntax/cpp.vim3
-rw-r--r--runtime/syntax/pf.vim118
-rw-r--r--runtime/syntax/rst.vim20
-rw-r--r--runtime/syntax/sh.vim69
-rw-r--r--runtime/syntax/tex.vim35
29 files changed, 744 insertions, 157 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index cced1a8d04..69498dc1a1 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -100,6 +100,20 @@ add_custom_target(
${GENERATED_PACKAGE_TAGS}
)
+# Optional targets for nvim.desktop file and icon.
+find_program(XDG_MENU_PRG xdg-desktop-menu)
+find_program(XDG_ICON_PRG xdg-icon-resource)
+if(XDG_MENU_PRG)
+ add_custom_target(desktop-file
+ COMMAND xdg-desktop-menu install --novendor ${PROJECT_SOURCE_DIR}/runtime/nvim.desktop)
+ # add_dependencies(runtime desktop-file)
+endif()
+if(XDG_ICON_PRG)
+ add_custom_target(desktop-icon
+ COMMAND xdg-icon-resource install --novendor --size 128 ${PROJECT_SOURCE_DIR}/runtime/nvim.png)
+ # add_dependencies(runtime desktop-icon)
+endif()
+
# CMake is painful here. It will create the destination using the user's
# current umask, and we don't want that. And we don't just want to install
# the target directory, as it will mess with existing permissions. So this
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index 251e6eee41..a6be00c0a9 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -39,7 +39,6 @@ function! man#open_page(count, count1, mods, ...) abort
let sect = string(a:count)
endif
let [sect, name, path] = s:verify_exists(sect, name)
- let page = s:get_page(path)
catch
call s:error(v:exception)
return
@@ -52,6 +51,15 @@ function! man#open_page(count, count1, mods, ...) abort
else
noautocmd execute 'silent' a:mods 'split' fnameescape(bufname)
endif
+
+ try
+ let page = s:get_page(path)
+ catch
+ close
+ call s:error(v:exception)
+ return
+ endtry
+
let b:man_sect = sect
call s:put_page(page)
endfunction
@@ -125,8 +133,8 @@ function! s:put_page(page) abort
setlocal noreadonly
silent keepjumps %delete _
silent put =a:page
- " Remove all backspaced characters.
- execute 'silent keeppatterns keepjumps %substitute,.\b,,e'.(&gdefault?'':'g')
+ " Remove all backspaced/escape characters.
+ execute 'silent keeppatterns keepjumps %substitute,.\b\|\e\[\d\+m,,e'.(&gdefault?'':'g')
while getline(1) =~# '^\s*$'
silent keepjumps 1delete _
endwhile
@@ -311,8 +319,8 @@ function! s:format_candidate(path, psect) abort
endfunction
function! man#init_pager() abort
- " Remove all backspaced characters.
- execute 'silent keeppatterns keepjumps %substitute,.\b,,e'.(&gdefault?'':'g')
+ " Remove all backspaced/escape characters.
+ execute 'silent keeppatterns keepjumps %substitute,.\b\|\e\[\d\+m,,e'.(&gdefault?'':'g')
if getline(1) =~# '^\s*$'
silent keepjumps 1delete _
else
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index 36232b99db..1bcc1dea74 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -78,6 +78,12 @@ function! provider#clipboard#Executable() abort
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
return 'doitclient'
+ elseif executable('win32yank')
+ let s:copy['+'] = 'win32yank -i --crlf'
+ let s:paste['+'] = 'win32yank -o --lf'
+ let s:copy['*'] = s:copy['+']
+ let s:paste['*'] = s:paste['+']
+ return 'win32yank'
endif
let s:err = 'clipboard: No clipboard tool available. See :help clipboard'
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 69c8d0285a..9aa60657e0 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
@@ -2109,7 +2117,7 @@ remote_peek({serverid} [, {retvar}])
remote_read({serverid}) String read reply string
remote_send({server}, {string} [, {idvar}])
String send key sequence
-remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
+remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
repeat({expr}, {count}) String repeat {expr} {count} times
@@ -2201,7 +2209,7 @@ synconcealed({lnum}, {col}) List info about concealing
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
system({cmd} [, {input}]) String output of shell command/filter {cmd}
systemlist({cmd} [, {input}]) List output of shell command/filter {cmd}
-tabpagebuflist([{arg}]) List list of buffer numbers in tab page
+tabpagebuflist([{arg}]) List list of buffer numbers in tab page
tabpagenr([{arg}]) Number number of current or last tab page
tabpagewinnr({tabarg}[, {arg}])
Number number of current window in tab page
@@ -3087,7 +3095,10 @@ execute({command} [, {silent}]) *execute()*
The default is 'silent'. Note that with "silent!", unlike
`:redir`, error messages are dropped.
- This function is not available in the |sandbox|.
+ To get a list of lines use |split()| on the result: >
+ split(execute('args'), "\n")
+
+< This function is not available in the |sandbox|.
Note: If nested, an outer execute() will not observe output of
the inner calls.
Note: Text attributes (highlights) are not captured.
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 336d9681ed..d15815191e 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 7.4. Last change: 2015 Dec 06
+*filetype.txt* For Vim version 7.4. Last change: 2016 Jun 20
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index ca341af200..ad1611133a 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -185,7 +185,7 @@ command: >
<
*:helpt* *:helptags*
- *E154* *E150* *E151* *E152* *E153* *E670*
+ *E154* *E150* *E151* *E152* *E153* *E670* *E856*
:helpt[ags] [++t] {dir}
Generate the help tags file(s) for directory {dir}.
When {dir} is ALL then all "doc" directories in
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/map.txt b/runtime/doc/map.txt
index 991ecf8fb2..53b152dc06 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 7.4. Last change: 2016 Jun 10
+*map.txt* For Vim version 7.4. Last change: 2016 Jul 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1268,6 +1268,7 @@ completion can be enabled:
-complete=mapping mapping name
-complete=menu menus
-complete=option options
+ -complete=packadd optional package |pack-add| names
-complete=shellcmd Shell command
-complete=sign |:sign| suboptions
-complete=syntax syntax file names |'syntax'|
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d332e0053a..97d56af369 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|.
@@ -5200,10 +5200,10 @@ A jump table for the options with a short description can be found at |Q_op|.
has been used since the last search command.
*shada-n*
n Name of the shada file. The name must immediately follow
- the 'n'. Must be the last one! If the "-i" argument was
- given when starting Vim, that file name overrides the one
- given here with 'shada'. Environment variables are expanded
- when opening the file, not when setting the option.
+ the 'n'. Must be at the end of the option! If the "-i"
+ argument was given when starting Vim, that file name overrides
+ the one given here with 'shada'. Environment variables are
+ expanded when opening the file, not when setting the option.
*shada-r*
r Removable media. The argument is a string (up to the next
','). This parameter can be given several times. Each
@@ -7074,7 +7074,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'writedelay'* *'wd'*
'writedelay' 'wd' number (default 0)
global
- The number of microseconds to wait for each character sent to the
+ The number of milliseconds to wait for each character sent to the
screen. When non-zero, characters are sent to the terminal one by
one. For debugging purposes.
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/doc/quickref.txt b/runtime/doc/quickref.txt
index 2b5ed33f06..a7644fab84 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -813,6 +813,7 @@ Short explanation of each option: *option-list*
'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
'printoptions' 'popt' controls the format of :hardcopy output
+'prompt' 'prompt' enable prompt in Ex mode
'pumheight' 'ph' maximum height of the popup menu
'pythondll' name of the Python 2 dynamic library
'pythonthreedll' name of the Python 3 dynamic library
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index b58b3c7853..9284aaea58 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 7.4. Last change: 2016 Jun 12
+*starting.txt* For Vim version 7.4. Last change: 2016 Jul 03
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index b0e5386224..191b0871f4 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -611,6 +611,7 @@ String manipulation: *string-functions*
byteidxcomp() like byteidx() but count composing characters
repeat() repeat a string multiple times
eval() evaluate a string expression
+ execute() execute an Ex command and get the output
List manipulation: *list-functions*
get() get an item without error for wrong index
@@ -944,12 +945,13 @@ Various: *various-functions*
shiftwidth() effective value of 'shiftwidth'
+ wordcount() get byte/word/char count of buffer
+
taglist() get list of matching tags
tagfiles() get a list of tags files
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
- wordcount() get byte/word/char count of buffer
==============================================================================
*41.7* Defining a function
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 3c1472446d..7d08a6f32a 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 7.4. Last change: 2016 Mar 20
+*various.txt* For Vim version 7.4. Last change: 2016 Jul 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -416,9 +416,12 @@ m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
shown on the screen. When [!] is included, an
existing file is overwritten. When [!] is omitted,
and {file} exists, this command fails.
+
Only one ":redir" can be active at a time. Calls to
":redir" will close any active redirection before
- starting redirection to the new target.
+ starting redirection to the new target. For recursive
+ use check out |execute()|.
+
To stop the messages and commands from being echoed to
the screen, put the commands in a function and call it
with ":silent call Function()".
@@ -456,6 +459,8 @@ m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
redirection starts, if the variable is removed or
locked or the variable type is changed, then further
command output messages will cause errors.
+ To get the output of one command the |execute()|
+ function can be used.
:redi[r] =>> {var} Append messages to an existing variable. Only string
variables can be used.
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index ae0bd5a867..20002c1118 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -47,7 +47,6 @@ these differences.
- 'langnoremap' is set by default
- 'laststatus' defaults to 2 (statusline is always shown)
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
-- 'mouse' defaults to "a"
- 'nocompatible' is always set
- 'nrformats' defaults to "bin,hex"
- 'sessionoptions' doesn't include "options"
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/keymap/vietnamese-telex_utf-8.vim b/runtime/keymap/vietnamese-telex_utf-8.vim
new file mode 100644
index 0000000000..f9fd055d14
--- /dev/null
+++ b/runtime/keymap/vietnamese-telex_utf-8.vim
@@ -0,0 +1,196 @@
+" Vim Keymap file for Vietnamese through Telex method
+" Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com>
+" Last Change: 2016-06-13
+
+scriptencoding utf-8
+
+let b:keymap_name = "vi"
+
+loadkeymap
+
+A\\ A
+AF À
+AS Á
+AR Ả
+AX Ã
+AJ Ạ
+
+AW Ă
+AW\\ Ă
+AWF Ằ
+AWS Ắ
+AWR Ẳ
+AWX Ẵ
+AWJ Ặ
+
+AA Â
+AA\\ Â
+AAF Ầ
+AAS Ấ
+AAR Ẩ
+AAX Ẫ
+AAJ Ậ
+
+D\\ D
+DD Đ
+
+E E
+E\\ E
+EF È
+ES É
+ER Ẻ
+EX Ẽ
+EJ Ẹ
+
+EE Ê
+EE\\ Ê
+EEF Ề
+EES Ế
+EER Ể
+EEX Ễ
+EEJ Ệ
+
+I\\ I
+IF Ì
+IS Í
+IR Ỉ
+IX Ĩ
+IJ Ị
+
+O\\ O
+OF Ò
+OS Ó
+OR Ỏ
+OX Õ
+OJ Ọ
+
+OO Ô
+OO\\ Ô
+OOF Ồ
+OOS Ố
+OOR Ổ
+OOX Ỗ
+OOJ Ộ
+
+OW Ơ
+OW\\ Ơ
+OWF Ờ
+OWS Ớ
+OWR Ở
+OWX Ỡ
+OWJ Ợ
+
+U\\ U
+UF Ù
+US Ú
+UR Ủ
+UX Ũ
+UJ Ụ
+
+UW Ư
+UW\\ Ư
+UWF Ừ
+UWS Ứ
+UWR Ử
+UWX Ữ
+UWJ Ự
+
+Y\\ Y
+YF Ỳ
+YS Ý
+YR Ỷ
+YX Ỹ
+YJ Ỵ
+
+a\\ a
+af à
+as á
+ar ả
+ax ã
+aj ạ
+
+aw ă
+aw\\ ă
+awf ằ
+aws ắ
+awr ẳ
+awx ẵ
+awj ặ
+
+aa â
+aa\\ â
+aaf ầ
+aas ấ
+aar ẩ
+aax ẫ
+aaj ậ
+
+d\\ d
+dd đ
+
+e\\ e
+ef è
+es é
+er ẻ
+ex ẽ
+ej ẹ
+
+ee ê
+ee\\ ê
+eef ề
+ees ế
+eer ể
+eex ễ
+eej ệ
+
+i\\ i
+if ì
+is í
+ir ỉ
+ix ĩ
+ij ị
+
+o\\ o
+of ò
+os ó
+or ỏ
+ox õ
+oj ọ
+
+oo ô
+oo\\ ô
+oof ồ
+oos ố
+oor ổ
+oox ỗ
+ooj ộ
+
+ow ơ
+ow\\ ơ
+owf ờ
+ows ớ
+owr ở
+owx ỡ
+owj ợ
+
+u\\ u
+uf ù
+us ú
+ur ủ
+ux ũ
+uj ụ
+
+uw ư
+uw\\ ư
+uwf ừ
+uws ứ
+uwr ử
+uwx ữ
+uwj ự
+
+y\\ y
+yf ỳ
+ys ý
+yr ỷ
+yx ỹ
+yj ỵ
diff --git a/runtime/keymap/vietnamese-vni_utf-8.vim b/runtime/keymap/vietnamese-vni_utf-8.vim
new file mode 100644
index 0000000000..c9312c6854
--- /dev/null
+++ b/runtime/keymap/vietnamese-vni_utf-8.vim
@@ -0,0 +1,196 @@
+" Vim Keymap file for Vietnamese through VNI method
+" Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com>
+" Last Change: 2016-06-13
+
+scriptencoding utf-8
+
+let b:keymap_name = "vi"
+
+loadkeymap
+
+A\\ A
+A1 Á
+A2 À
+A3 Ả
+A4 Ã
+A5 Ạ
+
+A8 Ă
+A8\\ Ă
+A81 Ắ
+A82 Ằ
+A83 Ẳ
+A84 Ẵ
+A85 Ặ
+
+A6 Â
+A6\\ Â
+A61 Ấ
+A62 Ầ
+A63 Ẩ
+A64 Ẫ
+A65 Ậ
+
+D D
+D\\ D
+D9 Đ
+
+E\\ E
+E1 É
+E2 È
+E3 Ẻ
+E4 Ẽ
+E5 Ẹ
+
+E6 Ê
+E6\\ Ê
+E61 Ế
+E62 Ề
+E63 Ể
+E64 Ễ
+E65 Ệ
+
+I\\ I
+I1 Í
+I2 Ì
+I3 Ỉ
+I4 Ĩ
+I5 Ị
+
+O\\ O
+O1 Ó
+O2 Ò
+O3 Ỏ
+O4 Õ
+O5 Ọ
+
+O6 Ô
+O6\\ Ô
+O61 Ố
+O62 Ồ
+O63 Ổ
+O64 Ỗ
+O65 Ộ
+
+O7 Ơ
+O7\\ Ơ
+O71 Ớ
+O72 Ờ
+O73 Ở
+O74 Ỡ
+O75 Ợ
+
+U\\ U
+U1 Ú
+U2 Ù
+U3 Ủ
+U4 Ũ
+U5 Ụ
+
+U7 Ư
+U7\\ Ư
+U71 Ứ
+U72 Ừ
+U73 Ử
+U74 Ữ
+U75 Ự
+
+Y\\ Y
+Y1 Ý
+Y2 Ỳ
+Y3 Ỷ
+Y4 Ỹ
+Y5 Ỵ
+
+a\\ a
+a1 á
+a2 à
+a3 ả
+a4 ã
+a5 ạ
+
+a8 ă
+a8\\ ă
+a81 ắ
+a82 ằ
+a83 ẳ
+a84 ẵ
+a85 ặ
+
+a6 â
+a6\\ â
+a61 ấ
+a62 ầ
+a63 ẩ
+a64 ẫ
+a65 ậ
+
+d\\ d
+d9 đ
+
+e\\ e
+e1 é
+e2 è
+e3 ẻ
+e4 ẽ
+e5 ẹ
+
+e6 ê
+e6\\ ê
+e61 ế
+e62 ề
+e63 ể
+e64 ễ
+e65 ệ
+
+i\\ i
+i1 í
+i2 ì
+i3 ỉ
+i4 ĩ
+i5 ị
+
+o\\ o
+o1 ó
+o2 ò
+o3 ỏ
+o4 õ
+o5 ọ
+
+o6 ô
+o6\\ ô
+o61 ố
+o62 ồ
+o63 ổ
+o64 ỗ
+o65 ộ
+
+o7 ơ
+o7\\ ơ
+o71 ớ
+o72 ờ
+o73 ở
+o74 ỡ
+o75 ợ
+
+u\\ u
+u1 ú
+u2 ù
+u3 ủ
+u4 ũ
+u5 ụ
+
+u7 ư
+u7\\ ư
+u71 ứ
+u72 ừ
+u73 ử
+u74 ữ
+u75 ự
+
+y\\ y
+y1 ý
+y2 ỳ
+y3 ỷ
+y4 ỹ
+y5 ỵ
diff --git a/runtime/nvim.desktop b/runtime/nvim.desktop
new file mode 100644
index 0000000000..be6a2eda82
--- /dev/null
+++ b/runtime/nvim.desktop
@@ -0,0 +1,81 @@
+[Desktop Entry]
+Name=Neovim
+GenericName=Text Editor
+GenericName[de]=Texteditor
+Comment=Edit text files
+Comment[af]=Redigeer tekslêers
+Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
+Comment[ar]=حرّر ملفات نصية
+Comment[az]=Mətn fayllarını redaktə edin
+Comment[be]=Рэдагаваньне тэкставых файлаў
+Comment[bg]=Редактиране на текстови файлове
+Comment[bn]=টেক্স্ট ফাইল এডিট করুন
+Comment[bs]=Izmijeni tekstualne datoteke
+Comment[ca]=Edita fitxers de text
+Comment[cs]=Úprava textových souborů
+Comment[cy]=Golygu ffeiliau testun
+Comment[da]=Redigér tekstfiler
+Comment[de]=Textdateien bearbeiten
+Comment[el]=Επεξεργασία αρχείων κειμένου
+Comment[en_CA]=Edit text files
+Comment[en_GB]=Edit text files
+Comment[es]=Edita archivos de texto
+Comment[et]=Redigeeri tekstifaile
+Comment[eu]=Editatu testu-fitxategiak
+Comment[fa]=ویرایش پرونده‌های متنی
+Comment[fi]=Muokkaa tekstitiedostoja
+Comment[fr]=Édite des fichiers texte
+Comment[ga]=Eagar comhad Téacs
+Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
+Comment[he]=ערוך קבצי טקסט
+Comment[hi]=पाठ फ़ाइलें संपादित करें
+Comment[hr]=Uređivanje tekstualne datoteke
+Comment[hu]=Szövegfájlok szerkesztése
+Comment[id]=Edit file teks
+Comment[it]=Modifica file di testo
+Comment[ja]=テキストファイルを編集します
+Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
+Comment[ko]=텍스트 파일을 편집합니다
+Comment[lt]=Redaguoti tekstines bylas
+Comment[lv]=Rediģēt teksta failus
+Comment[mk]=Уреди текстуални фајлови
+Comment[ml]=വാചക രചനകള് തിരുത്തുക
+Comment[mn]=Текст файл боловсруулах
+Comment[mr]=गद्य फाइल संपादित करा
+Comment[ms]=Edit fail teks
+Comment[nb]=Rediger tekstfiler
+Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
+Comment[nl]=Tekstbestanden bewerken
+Comment[nn]=Rediger tekstfiler
+Comment[no]=Rediger tekstfiler
+Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
+Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
+Comment[pl]=Edytor plików tekstowych
+Comment[pt]=Editar ficheiros de texto
+Comment[pt_BR]=Edite arquivos de texto
+Comment[ro]=Editare fişiere text
+Comment[ru]=Редактор текстовых файлов
+Comment[sk]=Úprava textových súborov
+Comment[sl]=Urejanje datotek z besedili
+Comment[sq]=Përpuno files teksti
+Comment[sr]=Измени текстуалне датотеке
+Comment[sr@Latn]=Izmeni tekstualne datoteke
+Comment[sv]=Redigera textfiler
+Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
+Comment[th]=แก้ไขแฟ้มข้อความ
+Comment[tk]=Metin faýllary editle
+Comment[tr]=Metin dosyalarını düzenle
+Comment[uk]=Редактор текстових файлів
+Comment[vi]=Soạn thảo tập tin văn bản
+Comment[wa]=Asspougnî des fitchîs tecses
+Comment[zh_CN]=编辑文本文件
+Comment[zh_TW]=編輯文字檔
+TryExec=nvim
+Exec=nvim %F
+Terminal=true
+Type=Application
+Keywords=Text;editor;
+Icon=nvim
+Categories=Utility;TextEditor;
+StartupNotify=false
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
diff --git a/runtime/nvim.png b/runtime/nvim.png
new file mode 100644
index 0000000000..dbc65ef363
--- /dev/null
+++ b/runtime/nvim.png
Binary files differ
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 3fe3256059..57d99ab1e9 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Apr 10
+" Last Change: 2016 Jul 07
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -295,7 +295,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
if !exists("c_no_c99")
- syn keyword cConstant __func__
+ syn keyword cConstant __func__ __VA_ARGS__
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim
index c7a68388be..fefd0ff7b0 100644
--- a/runtime/syntax/cpp.vim
+++ b/runtime/syntax/cpp.vim
@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
-" Last Change: 2015 Nov 10
+" Last Change: 2016 Jul 07
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -80,6 +80,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppConstant Constant
HiLink cppRawStringDelimiter Delimiter
HiLink cppRawString String
+ HiLink cppNumber Number
delcommand HiLink
endif
diff --git a/runtime/syntax/pf.vim b/runtime/syntax/pf.vim
index 1a8f34bbba..81add10e7e 100644
--- a/runtime/syntax/pf.vim
+++ b/runtime/syntax/pf.vim
@@ -2,30 +2,22 @@
" Language: OpenBSD packet filter configuration (pf.conf)
" Original Author: Camiel Dobbelaar <cd@sentia.nl>
" Maintainer: Lauri Tirkkonen <lotheac@iki.fi>
-" Last Change: 2013 Apr 02
+" Last Change: 2016 Jul 06
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
finish
endif
setlocal foldmethod=syntax
+syn iskeyword @,48-57,_,-,+
syn sync fromstart
syn cluster pfNotLS contains=pfTodo,pfVarAssign
-syn keyword pfCmd altq anchor antispoof binat nat pass
-syn keyword pfCmd queue rdr scrub table set
-syn keyword pfService auth bgp domain finger ftp http https ident
-syn keyword pfService imap irc isakmp kerberos mail nameserver nfs
-syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp
-syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet
-syn keyword pfService tftp www
+syn keyword pfCmd anchor antispoof block include match pass queue
+syn keyword pfCmd queue set table
+syn match pfCmd /^\s*load\sanchor\>/
syn keyword pfTodo TODO XXX contained
syn keyword pfWildAddr all any
-syn match pfCmd /block\s/
syn match pfComment /#.*$/ contains=pfTodo
syn match pfCont /\\$/
syn match pfErrClose /}/
@@ -34,43 +26,81 @@ syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/
syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/
syn match pfNetmask /\/\d\+/
syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/
-syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/
+syn match pfTable /<\s*[a-zA-Z0-9_:][a-zA-Z0-9_:.-]*\s*>/
syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/
syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1
syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold
syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold
syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold
syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS
-syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS
-syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS
+syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
+syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
-" Define the default highlighting.
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_c_syn_inits")
- if version < 508
- let did_c_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
+syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor
+syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep
+syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors
+syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver
+syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver
+syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls
+syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo
+syn keyword pfService at-nbp at-rtmp at-zis auth authentication
+syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc
+syn keyword pfService bootps canna cddb cddbp chargen chat cmd
+syn keyword pfService cmip-agent cmip-man comsat conference
+syn keyword pfService conserver courier csnet-ns cso-ns cvspserver
+syn keyword pfService daap datametrics daytime dhcpd-sync
+syn keyword pfService dhcpv6-client dhcpv6-server discard domain
+syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc
+syn keyword pfService exec finger ftp ftp-data git gopher hostname
+syn keyword pfService hostnames hprop http https hunt hylafax iapp
+syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock
+syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc
+syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos
+syn keyword pfService kerberos-adm kerberos-iv kerberos-sec
+syn keyword pfService kerberos_master kf kip klogin kpasswd kpop
+syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx
+syn keyword pfService l2tp ldap ldaps ldp link login mail mdns
+syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s
+syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm
+syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs
+syn keyword pfService netstat netwall newdate nextstep nfs nfsd
+syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet
+syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw
+syn keyword pfService pop3s poppassd portmap postgresql postoffice
+syn keyword pfService pptp presence printer prospero prospero-np
+syn keyword pfService puppet pwdgen qotd quote radacct radius
+syn keyword pfService radius-acct rdp readnews remotefs resource rfb
+syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp
+syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp
+syn keyword pfService sa-msg-port sane-port sftp shell sieve silc
+syn keyword pfService sink sip smtp smtps smux snmp snmp-trap
+syn keyword pfService snmptrap snpp socks source spamd spamd-cfg
+syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission
+syn keyword pfService sunrpc supdup supfiledbg supfilesrv support
+syn keyword pfService svn svrloc swat syslog syslog-tls systat
+syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo
+syn keyword pfService tftp time timed timeserver timserver tsap
+syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp
+syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan
+syn keyword pfService wais webster who whod whois www x400 x400-snd
+syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server
+syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra
+syn keyword pfService zebrasrv
- HiLink pfCmd Statement
- HiLink pfComment Comment
- HiLink pfCont Statement
- HiLink pfErrClose Error
- HiLink pfIPv4 Type
- HiLink pfIPv6 Type
- HiLink pfNetmask Constant
- HiLink pfNum Constant
- HiLink pfService Constant
- HiLink pfTable Identifier
- HiLink pfTodo Todo
- HiLink pfVar Identifier
- HiLink pfVarAssign Identifier
- HiLink pfWildAddr Type
-
- delcommand HiLink
-endif
+hi def link pfCmd Statement
+hi def link pfComment Comment
+hi def link pfCont Statement
+hi def link pfErrClose Error
+hi def link pfIPv4 Type
+hi def link pfIPv6 Type
+hi def link pfNetmask Constant
+hi def link pfNum Constant
+hi def link pfService Constant
+hi def link pfString String
+hi def link pfTable Identifier
+hi def link pfTodo Todo
+hi def link pfVar Identifier
+hi def link pfVarAssign Identifier
+hi def link pfWildAddr Type
let b:current_syntax = "pf"
diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index b3c89f8352..ef07b22676 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -2,7 +2,7 @@
" Language: reStructuredText documentation format
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2016-01-05
+" Latest Revision: 2016-06-17
if exists("b:current_syntax")
finish
@@ -137,7 +137,7 @@ syn match rstStandaloneHyperlink contains=@NoSpell
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
syn region rstCodeBlock contained matchgroup=rstDirective
- \ start=+\%(sourcecode\|code\%(-block\)\=\)::\_s*\n\ze\z(\s\+\)+
+ \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+
\ skip=+^$+
\ end=+^\z1\@!+
\ contains=@NoSpell
@@ -153,10 +153,11 @@ for code in g:rst_syntax_code_list
" guard against setting 'isk' option which might cause problems (issue #108)
let prior_isk = &l:iskeyword
exe 'syn include @rst'.code.' syntax/'.code.'.vim'
- exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
- \.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# '
- \.'skip=#^$# '
- \.'end=#^\z1\@!# contains=@NoSpell,@rst'.code
+ exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold'
+ \.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#'
+ \.' skip=#^$#'
+ \.' end=#^\z1\@!#'
+ \.' contains=@NoSpell,@rst'.code
exe 'syn cluster rstDirectives add=rstDirective'.code
" reset 'isk' setting, if it has been changed
if &l:iskeyword !=# prior_isk
@@ -185,10 +186,11 @@ hi def link rstHyperlinkTarget String
hi def link rstExDirective String
hi def link rstSubstitutionDefinition rstDirective
hi def link rstDelimiter Delimiter
-" TODO: I dunno...
-hi def rstEmphasis term=italic cterm=italic gui=italic
+hi def link rstEmphasis Underlined
hi def link rstStrongEmphasis Special
-"term=bold cterm=bold gui=bold
+" TODO Append these atttributes somehow
+"hi def rstEmphasis term=italic cterm=italic gui=italic
+"hi def rstStrongEmphasis term=bold cterm=bold gui=bold
hi def link rstInterpretedTextOrHyperlinkReference Identifier
hi def link rstInlineLiteral String
hi def link rstSubstitutionReference PreProc
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index c51bd9aa45..711971ea4a 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,15 +2,15 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: May 02, 2016
-" Version: 151
+" Last Change: Jun 10, 2016
+" Version: 152
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
" For version 5.x: Clear all syntax items {{{1
" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
+if v:version < 600
syntax clear
elseif exists("b:current_syntax")
finish
@@ -173,7 +173,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
" Touch: {{{1
" =====
- syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd
+ syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd
syn match shTouchCmd '\<touch\>' contained
endif
@@ -333,9 +333,10 @@ endif
"================================
syn match shNumber "\<\d\+\>#\="
syn match shNumber "-\=\.\=\d\+\>#\="
-syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
+syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
if exists("b:is_bash")
- syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
+ syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
+ syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
endif
if exists("b:is_bash")
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
@@ -346,11 +347,13 @@ elseif !exists("g:sh_no_error")
endif
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
-syn match shStringSpecial "[^[:print:] \t]" contained
-syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
-syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
+syn match shStringSpecial "[^[:print:] \t]" contained
+syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
+syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
-syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
+syn match shMoreSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
+syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
+syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
" Comments: {{{1
"==========
@@ -363,31 +366,21 @@ syn match shQuickComment contained "#.*$"
" Here Documents: {{{1
" =========================================
-if version < 600
- syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
- syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
- syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\**EOF\**" matchgroup=shHereDoc03 end="^EOF$" contains=@shDblQuoteList
- syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\**EOF\**" matchgroup=shHereDoc04 end="^\s*EOF$" contains=@shDblQuoteList
- syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*\**\.\**" matchgroup=shHereDoc05 end="^\.$" contains=@shDblQuoteList
- syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\**\.\**" matchgroup=shHereDoc06 end="^\s*\.$" contains=@shDblQuoteList
-
-else
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc09 end="^\s*\z1\s*$" contains=@shDblQuoteList
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc11 end="^\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc13 end="^\z1\s*$" contains=@shDblQuoteList
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc14 end="^\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc17 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc18 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc18 end="^\s*\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc19 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc19 end="^\s*\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc20 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc20 end="^\z1\s*$"
- ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc21 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc21 end="^\s*\z1\s*$"
-endif
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
" Here Strings: {{{1
" =============
@@ -702,12 +695,6 @@ hi def link shHereDoc12 shRedir
hi def link shHereDoc13 shRedir
hi def link shHereDoc14 shRedir
hi def link shHereDoc15 shRedir
-hi def link shHereDoc16 shRedir
-hi def link shHereDoc17 shRedir
-hi def link shHereDoc18 shRedir
-hi def link shHereDoc19 shRedir
-hi def link shHereDoc20 shRedir
-hi def link shHereDoc21 shRedir
" Delete shell folding commands {{{1
" =============================
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 9d91402bc8..e560573e6e 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change: May 02, 2016
-" Version: 95
+" Last Change: Jun 17, 2016
+" Version: 97
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -83,12 +83,12 @@ else
let s:tex_conceal= g:tex_conceal
endif
if !exists("g:tex_superscripts")
- let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
+ let s:tex_superscripts= '[0-9a-zA-W.,:;+-<>/()=]'
else
let s:tex_superscripts= g:tex_superscripts
endif
if !exists("g:tex_subscripts")
- let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
+ let s:tex_subscripts= '[0-9aehijklmnoprstuvx,+-/().]'
else
let s:tex_subscripts= g:tex_subscripts
endif
@@ -206,16 +206,16 @@ endif
" Try to flag {} and () mismatches: {{{1
if s:tex_fast =~# 'm'
if !s:tex_no_error
- syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
- syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
+ syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
+ syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
else
- syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
- syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
+ syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
+ syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
endif
if !s:tex_nospell
- syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
+ syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
else
- syn region texParen start="(" end=")" transparent contains=@texMatchGroup
+ syn region texParen start="(" end=")" transparent contains=@texMatchGroup
endif
endif
if !s:tex_no_error
@@ -266,7 +266,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
if s:tex_fast =~# 'm'
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
- syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
+ syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell
endif
" \documentclass, \documentstyle, \usepackage: {{{1
@@ -1136,9 +1136,21 @@ if has("conceal") && &enc == 'utf-8'
call s:SuperSub('texSubscript','_','9','₉')
call s:SuperSub('texSubscript','_','a','ₐ')
call s:SuperSub('texSubscript','_','e','ₑ')
+ call s:SuperSub('texSubscript','_','h','ₕ')
call s:SuperSub('texSubscript','_','i','ᵢ')
+ call s:SuperSub('texSubscript','_','j','ⱼ')
+ call s:SuperSub('texSubscript','_','k','ₖ')
+ call s:SuperSub('texSubscript','_','l','ₗ')
+ call s:SuperSub('texSubscript','_','m','ₘ')
+ call s:SuperSub('texSubscript','_','n','ₙ')
call s:SuperSub('texSubscript','_','o','ₒ')
+ call s:SuperSub('texSubscript','_','p','ₚ')
+ call s:SuperSub('texSubscript','_','r','ᵣ')
+ call s:SuperSub('texSubscript','_','s','ₛ')
+ call s:SuperSub('texSubscript','_','t','ₜ')
call s:SuperSub('texSubscript','_','u','ᵤ')
+ call s:SuperSub('texSubscript','_','v','ᵥ')
+ call s:SuperSub('texSubscript','_','x','ₓ')
call s:SuperSub('texSubscript','_',',','︐')
call s:SuperSub('texSubscript','_','+','₊')
call s:SuperSub('texSubscript','_','-','₋')
@@ -1154,6 +1166,7 @@ if has("conceal") && &enc == 'utf-8'
call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ')
call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ')
call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ')
+
delfun s:SuperSub
endif