changeset 11160:d0a20101ecb2

Update runtime files. commit https://github.com/vim/vim/commit/036986f1507d223549d110af300144468bd3a1f7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 16 17:41:02 2017 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Thu, 16 Mar 2017 17:45:05 +0100
parents c13ab9398ce9
children 404e98047f0b
files runtime/doc/editing.txt runtime/doc/eval.txt runtime/doc/if_pyth.txt runtime/doc/map.txt runtime/doc/motion.txt runtime/doc/options.txt runtime/doc/pattern.txt runtime/doc/quickfix.txt runtime/doc/tags runtime/doc/todo.txt runtime/doc/usr_02.txt runtime/doc/usr_41.txt runtime/doc/version8.txt runtime/filetype.vim runtime/ftplugin/hamster.vim runtime/ftplugin/sql.vim runtime/ftplugin/tmux.vim runtime/indent/dtd.vim runtime/indent/eiffel.vim runtime/indent/eterm.vim runtime/indent/framescript.vim runtime/indent/java.vim runtime/indent/ld.vim runtime/indent/make.vim runtime/indent/readline.vim runtime/indent/sas.vim runtime/indent/scala.vim runtime/indent/tcl.vim runtime/indent/tcsh.vim runtime/indent/treetop.vim runtime/indent/xf86conf.vim runtime/indent/xinetd.vim runtime/syntax/erlang.vim runtime/syntax/scala.vim runtime/syntax/tmux.vim
diffstat 35 files changed, 485 insertions(+), 235 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -276,7 +276,7 @@ 2. Editing a file					*edit-a-file*
 
 							*:vie* *:view*
 :vie[w][!] [++opt] [+cmd] file
-			When used in Ex mode: Leave |Ex mode|, go back to
+			When used in Ex mode: Leave |Ex-mode|, go back to
 			Normal mode.  Otherwise same as |:edit|, but set
 			'readonly' option for this buffer.  {not in Vi}
 
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 8.0.  Last change: 2017 Mar 04
+*eval.txt*	For Vim version 8.0.  Last change: 2017 Mar 09
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -1904,6 +1904,8 @@ v:termresponse	The escape sequence retur
 
 					*v:testing* *testing-variable*
 v:testing	Must be set before using `test_garbagecollect_now()`.
+		Also, when set certain error messages won't be shown for 2
+		seconds. (e.g. "'dictionary' option is empty") 
 
 				*v:this_session* *this_session-variable*
 v:this_session	Full filename of the last loaded or saved session file.  See
@@ -7797,14 +7799,6 @@ test_autochdir()					*test_autochdir()*
 		Set a flag to enable the effect of 'autochdir' before Vim
 		startup has finished.
 
-						*test_disable_char_avail()*
-test_disable_char_avail({expr})
-		When {expr} is 1 the internal char_avail() function will
-		return |FALSE|.  When {expr} is 0 the char_avail() function will
-		function normally.
-		Only use this for a test where typeahead causes the test not
-		to work.  E.g., to trigger the CursorMovedI autocommand event.
-
 test_garbagecollect_now()			 *test_garbagecollect_now()*
 		Like garbagecollect(), but executed right away.  This must
 		only be called directly to avoid any structure to exist
@@ -7840,6 +7834,18 @@ test_null_partial()					*test_null_parti
 test_null_string()					*test_null_string()*
 		Return a String that is null. Only useful for testing.
 
+test_override({name}, {val})				*test_override()*
+		Overrides certain parts of Vims internal processing to be able
+		to run tests. Only to be used for testing Vim!
+		The override is enabled when {val} is non-zero and removed
+		when {val} is zero.
+		Current supported values for name are: 
+
+		name	     effect when {val} is non-zero ~
+		redraw       disable the redrawing() function
+		char_avail   disable the char_avail() function
+		ALL	     clear all overrides ({val} is not used)
+
 test_settime({expr})					*test_settime()*
 		Set the time Vim uses internally.  Currently only used for
 		timestamps in the history, as they are used in viminfo, and
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -1,4 +1,4 @@
-*if_pyth.txt*   For Vim version 8.0.  Last change: 2017 Feb 18
+*if_pyth.txt*   For Vim version 8.0.  Last change: 2017 Mar 09
 
 
 		  VIM REFERENCE MANUAL    by Paul Moore
@@ -17,6 +17,7 @@ 8. pyeval(), py3eval() Vim functions		|p
 9. Dynamic loading				|python-dynamic|
 10. Python 3					|python3|
 11. Python X					|python_x|
+12. Building with Python support		|python-building|
 
 {Vi does not have any of these commands}
 
@@ -880,4 +881,26 @@ If a user prefers Python 2 and want to f
 	endif
 
 ==============================================================================
+12. Building with Python support			*python-building*
+
+A few hints for building with Python 2 or 3 support.
+
+UNIX
+
+See src/Makefile for how to enable including the Python interface.
+
+On Ubuntu you will want to install these packages for Python 2:
+	python
+	python-dev
+For Python 3:
+	python3
+	pytyon3-dev
+For Python 3.6:
+	python3.6
+	pytyon3.6-dev
+
+If you have more than one version of Python 3, you need to link python3 to the
+one you prefer, before running configure.
+
+==============================================================================
  vim:tw=78:ts=8:ft=help:norl:
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt*       For Vim version 8.0.  Last change: 2016 Oct 15
+*map.txt*       For Vim version 8.0.  Last change: 2017 Mar 10
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -584,7 +584,8 @@ Upper and lowercase differences are igno
 
 							*map-comments*
 It is not possible to put a comment after these commands, because the '"'
-character is considered to be part of the {lhs} or {rhs}.
+character is considered to be part of the {lhs} or {rhs}. However, one can
+use |", since this starts a new, empty command with a comment.
 
 							*map_bar* *map-bar*
 Since the '|' character is used to separate a map command from the next
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -1,4 +1,4 @@
-*motion.txt*    For Vim version 8.0.  Last change: 2016 Nov 24
+*motion.txt*    For Vim version 8.0.  Last change: 2017 Mar 12
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -193,7 +193,7 @@ 0			To the first character of the line. 
 
 							*$* *<End>* *<kEnd>*
 $  or <End>		To the end of the line.  When a count is given also go
-			[count - 1] lines downward |inclusive|.
+			[count - 1] lines downward. |inclusive| motion.
 			In Visual mode the cursor goes to just after the last
 			character in the line.
 			When 'virtualedit' is active, "$" may move the cursor
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 8.0.  Last change: 2017 Mar 05
+*options.txt*	For Vim version 8.0.  Last change: 2017 Mar 09
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -727,6 +727,7 @@ A jump table for the options with a shor
 	which can be easier to read at certain sizes on certain displays.
 	Setting this option can sometimes cause problems if 'guifont' is set
 	to its default (empty string).
+	NOTE: This option is reset when 'compatible' is set.
 
 			*'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
 'autochdir' 'acd'	boolean (default off)
@@ -760,6 +761,7 @@ A jump table for the options with a shor
 	- Disable the use of 'keymap' (without changing its value).
 	Note that 'arabicshape' and 'delcombine' are not reset (it is a global
 	option).
+	NOTE: This option is reset when 'compatible' is set.
 	Also see |arabic.txt|.
 
 					*'arabicshape'* *'arshape'*
@@ -781,6 +783,7 @@ A jump table for the options with a shor
 	form.
 	Arabic is a complex language which requires other settings, for
 	further details see |arabic.txt|.
+	NOTE: This option is set when 'compatible' is set.
 
 			*'autoindent'* *'ai'* *'noautoindent'* *'noai'*
 'autoindent' 'ai'	boolean	(default off)
@@ -993,6 +996,9 @@ A jump table for the options with a shor
 	the system may refuse to do this.  In that case the "auto" value will
 	again not rename the file.
 
+	NOTE: This option is set to the Vi default value when 'compatible' is
+	set and to the Vim default value when 'compatible' is reset.
+
 						*'backupdir'* *'bdir'*
 'backupdir' 'bdir'	string	(default for Amiga: ".,t:",
 				 for MS-DOS and Win32: ".,$TEMP,c:/tmp,c:/temp"
@@ -1139,6 +1145,7 @@ A jump table for the options with a shor
 <	When they are supported "\n" characters will start a new line.  If the
 	expression evaluates to a |List| this is equal to using each List item
 	as a string and putting "\n" in between them.
+	NOTE: This option is set to "" when 'compatible' is set.
 
 						*'belloff'* *'bo'*
 'belloff' 'bo'		string	(default "")
@@ -1176,8 +1183,8 @@ A jump table for the options with a shor
 	wildmode    More matches in |cmdline-completion| available
 		    (depends on the 'wildmode' setting).
 
-	This is most useful, to fine tune when in insert mode the bell should
-	be rung. For normal mode and ex commands, the bell is often rung to
+	This is most useful to fine tune when in Insert mode the bell should
+	be rung. For Normal mode and Ex commands, the bell is often rung to
 	indicate that an error occurred. It can be silenced by adding the
 	"error" keyword.
 
@@ -1259,6 +1266,7 @@ A jump table for the options with a shor
 	Every wrapped line will continue visually indented (same amount of
 	space as the beginning of that line), thus preserving horizontal blocks
 	of text.
+	NOTE: This option is reset when 'compatible' is set.
 
 						*'breakindentopt'* *'briopt'*
 'breakindentopt' 'briopt' string (default empty)
@@ -1435,6 +1443,8 @@ A jump table for the options with a shor
 		:exe "set cedit=\<Esc>"
 <	|Nvi| also has this option, but it only uses the first character.
 	See |cmdwin|.
+	NOTE: This option is set to the Vim default value when 'compatible'
+	is reset.
 
 				*'charconvert'* *'ccv'* *E202* *E214* *E513*
 'charconvert' 'ccv'	string (default "")
@@ -1743,7 +1753,7 @@ A jump table for the options with a shor
 	   set to its Vim default when 'compatible' is unset.
 	The {effect} column summarises the change when 'compatible' is set.
 
-	option		? set value	effect
+	option		? set value	effect ~
 
 	'allowrevins'	+ off		no CTRL-_ command
 	'antialias'	+ off		don't use antialiased fonts
@@ -1763,7 +1773,7 @@ A jump table for the options with a shor
 	'cscopepathcomp'+ 0		don't show directories in tags list
 	'cscoperelative'+ off		
 	'cscopetag'	+ off		don't use cscope for ":tag"
-	'cscopetagorder'  0		see |cscopetagorder|
+	'cscopetagorder'+ 0		see |cscopetagorder|
 	'cscopeverbose'	+ off		see |cscopeverbose|
 	'delcombine'	+ off		unicode: delete whole char combination
 	'digraph'	+ off		no digraphs
@@ -1813,7 +1823,7 @@ A jump table for the options with a shor
 	'tildeop'	+ off		tilde is not an operator
 	'ttimeout'	+ off		no terminal timeout
 	'undofile'	+ off		don't use an undo file
-	'viminfo'       - {unchanged}	{set vim default only on resetting 'cp'}
+	'viminfo'       - {unchanged}	{set Vim default only on resetting 'cp'}
 	'virtualedit'	+ ""		cursor can only be placed on characters
 	'whichwrap'	& ""		left-right movements don't wrap
 	'wildchar'	& CTRL-E	only when the current value is <Tab>
@@ -1993,7 +2003,7 @@ A jump table for the options with a shor
 	existing line.  'expandtab' has no effect on these characters, a Tab
 	remains a Tab.  If the new indent is greater than on the existing
 	line, the remaining space is filled in the normal manner.
-	NOTE: 'copyindent' is reset when 'compatible' is set.
+	NOTE: This option is reset when 'compatible' is set.
 	Also see 'preserveindent'.
 
 						*'cpoptions'* *'cpo'* *cpo*
@@ -2354,6 +2364,7 @@ A jump table for the options with a shor
 			{not in Vi}
 	Determines how many components of the path to show in a list of tags.
 	See |cscopepathcomp|.
+	NOTE: This option is set to 0 when 'compatible' is set.
 
 						*'cscopeprg'* *'csprg'*
 'cscopeprg' 'csprg'	string	(default "cscope")
@@ -2383,6 +2394,7 @@ A jump table for the options with a shor
 	In the absence of a prefix (-P) for cscope. setting this option enables
 	to use the basename of cscope.out path as the prefix.
 	See |cscoperelative|.
+	NOTE: This option is reset when 'compatible' is set.
 
 				*'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'*
 'cscopetag' 'cst'	boolean (default off)
@@ -2502,6 +2514,7 @@ A jump table for the options with a shor
 	This is useful for Arabic, Hebrew and many other languages where one
 	may have combining characters overtop of base characters, and want
 	to remove only the combining ones.
+	NOTE: This option is reset when 'compatible' is set.
 
 						*'dictionary'* *'dict'*
 'dictionary' 'dict'	string	(default "")
@@ -3422,6 +3435,7 @@ A jump table for the options with a shor
 	The expression will be evaluated in the |sandbox| when set from a
 	modeline, see |sandbox-option|.  That stops the option from working,
 	since changing the buffer text is not allowed.
+	NOTE: This option is set to "" when 'compatible' is set.
 
 					*'formatoptions'* *'fo'*
 'formatoptions' 'fo'	string (Vim default: "tcq", Vi default: "vt")
@@ -4081,31 +4095,6 @@ A jump table for the options with a shor
 	define one.  The default uses a different group for each occasion.
 	See |highlight-default| for the default highlight groups.
 
-				 *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
-'hlsearch' 'hls'	boolean	(default off)
-			global
-			{not in Vi}
-			{not available when compiled without the
-			|+extra_search| feature}
-	When there is a previous search pattern, highlight all its matches.
-	The type of highlighting used can be set with the 'l' occasion in the
-	'highlight' option.  This uses the "Search" highlight group by
-	default.  Note that only the matching text is highlighted, any offsets
-	are not applied.
-	See also: 'incsearch' and |:match|.
-	When you get bored looking at the highlighted matches, you can turn it
-	off with |:nohlsearch|.  This does not change the option value, as
-	soon as you use a search command, the highlighting comes back.
-	'redrawtime' specifies the maximum time spent on finding matches.
-	When the search pattern can match an end-of-line, Vim will try to
-	highlight all of the matched text.  However, this depends on where the
-	search starts.  This will be the first line in the window or the first
-	line below a closed fold.  A match in a previous line which is not
-	drawn may not continue in a newly drawn line.
-	You can specify whether the highlight status is restored on startup
-	with the 'h' flag in 'viminfo' |viminfo-h|.
-	NOTE: This option is reset when 'compatible' is set.
-
 						*'history'* *'hi'*
 'history' 'hi'		number	(Vim default: 50, Vi default: 0,
 						 set to 200 in |defaults.vim|)
@@ -4140,6 +4129,31 @@ A jump table for the options with a shor
 	See |rileft.txt|.
 	NOTE: This option is reset when 'compatible' is set.
 
+				 *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
+'hlsearch' 'hls'	boolean	(default off)
+			global
+			{not in Vi}
+			{not available when compiled without the
+			|+extra_search| feature}
+	When there is a previous search pattern, highlight all its matches.
+	The type of highlighting used can be set with the 'l' occasion in the
+	'highlight' option.  This uses the "Search" highlight group by
+	default.  Note that only the matching text is highlighted, any offsets
+	are not applied.
+	See also: 'incsearch' and |:match|.
+	When you get bored looking at the highlighted matches, you can turn it
+	off with |:nohlsearch|.  This does not change the option value, as
+	soon as you use a search command, the highlighting comes back.
+	'redrawtime' specifies the maximum time spent on finding matches.
+	When the search pattern can match an end-of-line, Vim will try to
+	highlight all of the matched text.  However, this depends on where the
+	search starts.  This will be the first line in the window or the first
+	line below a closed fold.  A match in a previous line which is not
+	drawn may not continue in a newly drawn line.
+	You can specify whether the highlight status is restored on startup
+	with the 'h' flag in 'viminfo' |viminfo-h|.
+	NOTE: This option is reset when 'compatible' is set.
+
 						*'icon'* *'noicon'*
 'icon'			boolean	(default off, on when title can be restored)
 			global
@@ -4419,7 +4433,7 @@ A jump table for the options with a shor
 <	Error messages will be suppressed, unless the 'debug' option contains
 	"msg".
 	See |indent-expression|.
-	NOTE: This option is made empty when 'compatible' is set.
+	NOTE: This option is set to "" when 'compatible' is set.
 
 	The expression will be evaluated in the |sandbox| when set from a
 	modeline, see |sandbox-option|.
@@ -5410,6 +5424,8 @@ A jump table for the options with a shor
 			feature}
 	The number of milliseconds between polls for MzScheme threads.
 	Negative or zero value means no thread scheduling.
+	NOTE: This option is set to the Vim default value when 'compatible'
+	is reset.
 
 							*'nrformats'* *'nf'*
 'nrformats' 'nf'	string	(default "bin,octal,hex",
@@ -5475,7 +5491,8 @@ A jump table for the options with a shor
 	is set. Thus with the Vim default of 4 there is room for a line number
 	up to 999. When the buffer has 1000 lines five columns will be used.
 	The minimum value is 1, the maximum value is 10.
-	NOTE: 'numberwidth' is reset to 8 when 'compatible' is set.
+	NOTE: This option is set to the Vi default value when 'compatible' is
+	set and to the Vim default value when 'compatible' is reset.
 
 						*'omnifunc'* *'ofu'*
 'omnifunc' 'ofu'	string	(default: empty)
@@ -5715,7 +5732,7 @@ A jump table for the options with a shor
 	a Tab.
 	NOTE: When using ">>" multiple times the resulting indent is a mix of
 	tabs and spaces.  You might not like this.
-	NOTE: 'preserveindent' is reset when 'compatible' is set.
+	NOTE: This option is reset when 'compatible' is set.
 	Also see 'copyindent'.
 	Use |:retab| to clean up white space.
 
@@ -6453,9 +6470,6 @@ A jump table for the options with a shor
 	"-f" is not inside the quotes, because it is not part of the command
 	name.  And Vim automagically recognizes the backslashes that are path
 	separators.
-	For Dos 32 bits (DJGPP), you can set the $DJSYSFLAGS environment
-	variable to change the way external commands are executed.  See the
-	libc.inf file of DJGPP.
 	Under MS-Windows, when the executable ends in ".com" it must be
 	included.  Thus setting the shell to "command.com" or "4dos.com"
 	works, but "command" and "4dos" do not work for all commands (e.g.,
@@ -6595,6 +6609,8 @@ A jump table for the options with a shor
 	'shelltemp' is off.
 	The `system()` function does not respect this option and always uses
 	temp files.
+	NOTE: This option is set to the Vim default value when 'compatible'
+	is reset.
 
 						*'shelltype'* *'st'*
 'shelltype' 'st'	number	(default 0)
@@ -6911,7 +6927,7 @@ A jump table for the options with a shor
 	mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
 	When using the ">>" command, lines starting with '#' are not shifted
 	right.
-	NOTE: 'smartindent' is reset when 'compatible' is set.
+	NOTE: This option is reset when 'compatible' is set.
 	This option is reset when 'paste' is set and restored when 'paste' is
 	reset.
 
@@ -7566,6 +7582,8 @@ A jump table for the options with a shor
 	   ignore	Ignore case
 	   match	Match case
 	   smart	Ignore case unless an upper case letter is used
+	NOTE: This option is set to the Vi default value when 'compatible' is
+	set and to the Vim default value when 'compatible' is reset.
 
 						*'taglength'* *'tl'*
 'taglength' 'tl'	number	(default 0)
@@ -7712,6 +7730,7 @@ A jump table for the options with a shor
 	compatible terminal.
 	If setting this option does not work (produces a colorless UI)
 	reading |xterm-true-color| might help.
+	NOTE: This option is reset when 'compatible' is set.
 
 						*'terse'* *'noterse'*
 'terse'			boolean	(default off)
@@ -8122,6 +8141,7 @@ A jump table for the options with a shor
 	The undo file is not read when 'undoreload' causes the buffer from
 	before a reload to be saved for undo.
 	When 'undofile' is turned off the undo file is NOT deleted.
+	NOTE: This option is reset when 'compatible' is set.
 
 						*'undolevels'* *'ul'*
 'undolevels' 'ul'	number	(default 100, 1000 for Unix, VMS,
@@ -8377,6 +8397,8 @@ A jump table for the options with a shor
 
 	This option cannot be set from a |modeline| or in the |sandbox|, for
 	security reasons.
+	NOTE: This option is set to the Vim default value when 'compatible'
+	is reset.
 
 					    *'virtualedit'* *'ve'*
 'virtualedit' 've'	string	(default "")
@@ -8405,6 +8427,7 @@ A jump table for the options with a shor
 	The `g$` command will move to the end of the screen line.
 	It doesn't make sense to combine "all" with "onemore", but you will
 	not get a warning for it.
+	NOTE: This option is set to "" when 'compatible' is set.
 
 			*'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
 'visualbell' 'vb'	boolean	(default off)
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -872,8 +872,8 @@ An ordinary atom can be:
 	inside the Visual area put it at the start and just before the end of
 	the pattern, e.g.: >
 		/\%Vfoo.*ba\%Vr
-<	This works if "foo bar" (or more) was Visually selected. This: >
-		/\%Vfoo.*ba\%Vr
+<	This also works if only "foo bar" was Visually selected. This: >
+		/\%Vfoo.*bar\%V
 <	would match "foo bar" if the Visual selection continues after the "r".
 	Only works for the current buffer.
 
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1,4 +1,4 @@
-*quickfix.txt*  For Vim version 8.0.  Last change: 2016 Nov 04
+*quickfix.txt*  For Vim version 8.0.  Last change: 2017 Mar 06
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -45,10 +45,13 @@ The 'errorformat' option should be set t
 compiler (see |errorformat| below).
 
 						*location-list* *E776*
-A location list is similar to a quickfix list and contains a list of positions
-in files.  A location list is associated with a window and each window can
-have a separate location list.  A location list can be associated with only
-one window.  The location list is independent of the quickfix list.
+A location list is a window-local quickfix list. You get one after commands
+like `:lvimgrep`, `:lgrep`, `:lhelpgrep`, `:lmake`, etc., which create a
+location list instead of a quickfix list as the corresponding `:vimgrep`,
+`:grep`, `:helpgrep`, `:make` do.
+A location list is associated with a window and each window can 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 longer any references to a location list,
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -427,6 +427,7 @@
 'macatsui'	options.txt	/*'macatsui'*
 'magic'	options.txt	/*'magic'*
 'makeef'	options.txt	/*'makeef'*
+'makeencoding'	options.txt	/*'makeencoding'*
 'makeprg'	options.txt	/*'makeprg'*
 'mat'	options.txt	/*'mat'*
 'matchpairs'	options.txt	/*'matchpairs'*
@@ -439,6 +440,7 @@
 'maxmemtot'	options.txt	/*'maxmemtot'*
 'mco'	options.txt	/*'mco'*
 'mef'	options.txt	/*'mef'*
+'menc'	options.txt	/*'menc'*
 'menuitems'	options.txt	/*'menuitems'*
 'mesg'	vi_diff.txt	/*'mesg'*
 'mfd'	options.txt	/*'mfd'*
@@ -5348,6 +5350,7 @@ cino-:	indent.txt	/*cino-:*
 cino-=	indent.txt	/*cino-=*
 cino->	indent.txt	/*cino->*
 cino-C	indent.txt	/*cino-C*
+cino-E	indent.txt	/*cino-E*
 cino-J	indent.txt	/*cino-J*
 cino-L	indent.txt	/*cino-L*
 cino-M	indent.txt	/*cino-M*
@@ -7887,6 +7890,7 @@ python-bindeval	if_pyth.txt	/*python-bin
 python-bindeval-objects	if_pyth.txt	/*python-bindeval-objects*
 python-buffer	if_pyth.txt	/*python-buffer*
 python-buffers	if_pyth.txt	/*python-buffers*
+python-building	if_pyth.txt	/*python-building*
 python-chdir	if_pyth.txt	/*python-chdir*
 python-command	if_pyth.txt	/*python-command*
 python-commands	if_pyth.txt	/*python-commands*
@@ -8744,7 +8748,6 @@ termresponse-variable	eval.txt	/*termres
 test-functions	usr_41.txt	/*test-functions*
 test_alloc_fail()	eval.txt	/*test_alloc_fail()*
 test_autochdir()	eval.txt	/*test_autochdir()*
-test_disable_char_avail()	eval.txt	/*test_disable_char_avail()*
 test_garbagecollect_now()	eval.txt	/*test_garbagecollect_now()*
 test_ignore_error()	eval.txt	/*test_ignore_error()*
 test_null_channel()	eval.txt	/*test_null_channel()*
@@ -8753,6 +8756,7 @@ test_null_job()	eval.txt	/*test_null_job
 test_null_list()	eval.txt	/*test_null_list()*
 test_null_partial()	eval.txt	/*test_null_partial()*
 test_null_string()	eval.txt	/*test_null_string()*
+test_override()	eval.txt	/*test_override()*
 test_settime()	eval.txt	/*test_settime()*
 testing	eval.txt	/*testing*
 testing-variable	eval.txt	/*testing-variable*
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.0.  Last change: 2017 Mar 05
+*todo.txt*      For Vim version 8.0.  Last change: 2017 Mar 16
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -35,6 +35,12 @@ entered there will not be repeated below
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
+Using "g<" after ":for x in [1,2,3]|echom x|endfor" looks wrong. (Marcin
+Szamotulski, 2017 Mar 12)
+Also, using Ctrl-C clears the last part.
+
+Test 45 fails on MS-Windows only before resetting 'sw'. Why?
+
 +channel:
 - Try out background make plugin: 
   https://github.com/AndrewVos/vim-make-background
@@ -110,6 +116,14 @@ manager.  Problem with Motif?
 
 Memory leak in test97?  The string is actually freed.  Weird.
 
+Include rust files.  Got all permissions?
+
+dict_add_list and dict_add_dict may free item when failing. (2017 Mar 12,
+Nikolai Pavlov, #1555)
+
+Patch to add buffer name argument to taglist().
+Ordering of tags in result of taglist call. (Duncan McDougall, #1194)
+
 Add a toolbar in the terminal.  Can be global, above all windows, or specific
 for one window.
 Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
@@ -121,18 +135,23 @@ What if there is an invalid character?
 
 Json string with trailing \u should be an error. (Lcd)
 
+On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
+lines: :g/^/normal yyp   On Unix it works OK.  (Bryce Orgill, 2016 Nov 5)
+Another example 2017 Mar 10.
+
 Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9)
 
 When session file has name in argument list but the buffer was deleted, the
 buffer is not deleted when using the session file. (#1393)
 Should add the buffer in hidden state.
 
-When "gf" excludes following ":99", jump to line 99.
-Also when editing a file foo.txt:99 ?
-
 When an item in the quickfix list has a file name that does not exist, behave
 like the item was not a match for :cnext.
 
+Patch to test regexp classes. (Dominique, 2017 Mar 13, #1560)
+Do we need to adjust the implementation?
+Make different classes that depend on the system and that don't.
+
 Wrong diff highlighting with three files. (2016 Oct 20, #1186)
 Also get E749 on exit.
 Another example in #1309
@@ -146,19 +165,11 @@ already typed. (Dominique, 2017 Jan 26)
 When deleting a mark or register, leave a tombstone, so that it's also deleted
 when writing viminfo (and the delete was the most recent action). #1339
 
-Patch to add 'makeencoding', useful when the system encoding differs from
-Vim's 'encoding' setting. (Ken Takata, 2017 Jan 31)
-
-Patch to adjust marks when adding a new line to the end of buffer in diff
-mode. (James McCoy, 2016 Dec 14, #1329)
-
 Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
 #1330)
 
 Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
 
-Patch to fix that test87 fails on Arch Linux. (Jesin, 2017 Feb 10)
-
 Completion for :!cmd shows each match twice. #1435
 
 GTK: When adding a timer from 'balloonexpr' it won't fire, because
@@ -176,14 +187,18 @@ 8   "stl" and "stlnc" in 'fillchars' don
 Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca
 Fuentes, 2017 Feb 12, #1470)
 
+Check for errors E704 and E705 only does VAR_FUNC, should also do VAR_PARTIAL.
+(Nikolai Pavlov, 2017 Mar 13, #1557)
+Make a function to check for function-like type?
+
 Screen updated delayed when using CTRL-O u in Insert mode.
 (Barlik, #1191)  Perhaps because status message?
 
-Patch to add buffer name argument to taglist().
-Ordering of tags in result of taglist call. (Duncan McDougall, #1194)
-
-Patch to fix that b_ind_has_comment is not correctly reset. (Christian
-Brabandt, 2017 Feb 14, closes #1475)
+Implement optional arguments for functions.
+    func Foo(start, count = 1 all = 1)
+    call Foo(12)
+    call Foo(12, all = 0)
+    call Foo(12, 15, 0)
 
 writefile() does not abort as soon as an error is found. (Nikolai Pavlov,
 2017 Feb 14, #1476)
@@ -237,9 +252,6 @@ Useful to restore it.  Is there another 
 "ci[" does not look for next [ like ci" does look for next ".
 (J.F. 2017 Jan 7)
 
-On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
-lines: :g/^/normal yyp   On Unix it works OK.  (Bryce Orgill, 2016 Nov 5)
-
 Patch for wrong cursor position on wrapped line, involving breakindent.
 (Ozaki Kiichi, 2016 Nov 25)
 Does this also fix #1408 ?
@@ -261,9 +273,6 @@ Patch to make it possible to extend a li
 
 Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
 
-Patch to add new regexp classes :ident:, :keyword:, :fname:.
-(ichizok, 2016 Jan 12, #1373)
-
 Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
 
 Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
@@ -1061,6 +1070,9 @@ 2012 Aug 4)
 Patch to improve equivalence classes in regexp patterns.
 (Christian Brabandt, 2013 Jan 16, update Jan 17)
 
+Patch to add new regexp classes :ident:, :keyword:, :fname:.
+(ichizok, 2016 Jan 12, #1373)
+
 Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
 But use Gnome instead of GTK?
 
--- a/runtime/doc/usr_02.txt
+++ b/runtime/doc/usr_02.txt
@@ -1,4 +1,4 @@
-*usr_02.txt*	For Vim version 8.0.  Last change: 2016 Jan 16
+*usr_02.txt*	For Vim version 8.0.  Last change: 2017 Mar 14
 
 		     VIM USER MANUAL - by Bram Moolenaar
 
@@ -554,7 +554,7 @@ 7) Command line editing and arguments st
 8) Ex-commands always start with ":", so to go to the :s command help: >
 	:help :s
 
-9) Commands specifically for debugging start with ">".  To go to to the help
+9) Commands specifically for debugging start with ">".  To go to the help
    for the "cont" debug command: >
 	:help >cont
 
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt*	For Vim version 8.0.  Last change: 2017 Mar 01
+*usr_41.txt*	For Vim version 8.0.  Last change: 2017 Mar 09
 
 		     VIM USER MANUAL - by Bram Moolenaar
 
@@ -922,8 +922,8 @@ Testing:				    *test-functions*
 	assert_fails()		assert that a function call fails
 	test_alloc_fail()	make memory allocation fail
 	test_autochdir()	enable 'autochdir' during startup
-	test_disable_char_avail()	test without typeahead
-	test_garbagecollect_now()	free memory right now
+	test_override()		test with Vim internal overrides
+	test_garbagecollect_now()   free memory right now
 	test_ignore_error()	ignore a specific error message
 	test_null_channel()	return a null Channel
 	test_null_dict()	return a null Dict
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -1,4 +1,4 @@
-*version8.txt*  For Vim version 8.0.  Last change: 2017 Feb 24
+*version8.txt*  For Vim version 8.0.  Last change: 2017 Mar 16
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -296,7 +296,7 @@ New and extended functions: ~
 |systemlist()|		get the result of a shell command as a list
 |test_alloc_fail()|	make memory allocation fail
 |test_autochdir()|	test 'autochdir' functionality
-|test_disable_char_avail()| test without typeahead
+test_disable_char_avail() test without typeahead (removed later)
 |test_garbagecollect_now()| free memory right now
 |test_null_channel()|	return a null Channel
 |test_null_dict()|	return a null Dict
@@ -426,7 +426,7 @@ When no vimrc file is found, the |defaul
 useful default values for new users.  That includes setting 'nocompatible'.
 Thus Vim no longer starts up in Vi compatible mode.  If you do want that,
 either create a .vimrc file that does "set compatible" or start Vim with
-"Vim -C".
+"vim -C".
 
 
 Support removed ~
@@ -1866,7 +1866,7 @@ Files:	    runtime/doc/eval.txt, src/eva
 	    src/testdir/test60.ok
 
 Patch 7.4.237 (after 7.4.236)
-Problem:    When some patches was not included has("patch-7.4.123") may return
+Problem:    When some patches were not included has("patch-7.4.123") may return
 	    true falsely.
 Solution:   Check for the specific patch number.
 Files:	    runtime/doc/eval.txt, src/eval.c
--- 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:	2017 Mar 04
+" Last Change:	2017 Mar 13
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -1366,6 +1366,9 @@ endfunc
 " Not Quite C
 au BufNewFile,BufRead *.nqc			setf nqc
 
+" NSE - Nmap Script Engine - uses Lua syntax
+au BufNewFile,BufRead *.nse			setf lua
+
 " NSIS
 au BufNewFile,BufRead *.nsi,*.nsh		setf nsis
 
@@ -2281,7 +2284,7 @@ au BufNewFile,BufRead .tidyrc,tidyrc		se
 au BufNewFile,BufRead *.tf,.tfrc,tfrc		setf tf
 
 " tmux configuration
-au BufNewFile,BufRead tmux*.conf		setf tmux
+au BufNewFile,BufRead {.,}tmux*.conf		setf tmux
 
 " TPP - Text Presentation Program
 au BufNewFile,BufReadPost *.tpp			setf tpp
--- a/runtime/ftplugin/hamster.vim
+++ b/runtime/ftplugin/hamster.vim
@@ -1,8 +1,8 @@
 " Vim filetype plugin
 " Language:    Hamster Script
 " Version:     2.0.6.0
-" Maintainer:  David Fishburn <fishburn@ianywhere.com>
-" Last Change: Wed Nov 08 2006 12:03:09 PM
+" Maintainer:  David Fishburn <dfishburn dot vim at gmail dot com>
+" Last Change: 2017 Mar 07
 
 " Only do this when not done yet for this buffer
 if exists("b:did_ftplugin")
@@ -13,6 +13,7 @@ endif
 let b:did_ftplugin = 1
 
 let s:cpo_save = &cpo
+set cpo&vim
 set cpo-=C
 
 let b:undo_ftplugin = "setl fo< com< tw< commentstring<"
--- a/runtime/ftplugin/sql.vim
+++ b/runtime/ftplugin/sql.vim
@@ -1,8 +1,8 @@
 " SQL filetype plugin file
 " Language:    SQL (Common for Oracle, Microsoft SQL Server, Sybase)
-" Version:     11.0
+" Version:     12.0
 " Maintainer:  David Fishburn <dfishburn dot vim at gmail dot com>
-" Last Change: 2013 May 13
+" Last Change: 2017 Mar 07
 " Download:    http://vim.sourceforge.net/script.php?script_id=454
 
 " For more details please use:
@@ -36,6 +36,14 @@
 "
 " History
 "
+" Version 12.0 (April 2013)
+"
+" NF: Added support for "BEGIN TRY ... END TRY ... BEGIN CATCH ... END CATCH
+" BF: This plugin is designed to be used with other plugins to enable the 
+"     SQL completion with Perl, Python, Java, ...  The loading mechanism 
+"     was not checking if the SQL objects were created, which can lead to 
+"     the plugin not loading the SQL support.
+"
 " Version 11.0 (May 2013)
 "
 " NF: Updated to use SyntaxComplete's new regex support for syntax groups.
@@ -80,15 +88,17 @@
 
 
 " Only do this when not done yet for this buffer
-if exists("b:did_ftplugin")
-  finish
+" This ftplugin can be used with other ftplugins.  So ensure loading
+" happens if all elements of this plugin have not yet loaded.
+if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
+    finish
 endif
 
 let s:save_cpo = &cpo
 set cpo&vim
 
 " Disable autowrapping for code, but enable for comments
-" t	Auto-wrap text using textwidth
+" t     Auto-wrap text using textwidth
 " c     Auto-wrap comments using textwidth, inserting the current comment
 "       leader automatically.
 setlocal formatoptions-=t
@@ -171,6 +181,9 @@ if !exists("*SQL_SetType")
         if exists("b:current_syntax")
             " echomsg 'SQLSetType - clearing syntax'
             syntax clear
+            if exists("b:current_syntax")
+                unlet b:current_syntax
+            endif
         endif
         if exists("b:did_indent")
             " echomsg 'SQLSetType - clearing indent'
@@ -187,7 +200,7 @@ if !exists("*SQL_SetType")
         " Do not specify a buffer local variable if it is
         " the default value
         if new_sql_type == 'sql'
-          let new_sql_type = 'sqloracle'
+            let new_sql_type = 'sqloracle'
         endif
         let b:sql_type_override = new_sql_type
 
@@ -234,25 +247,26 @@ if exists("b:sql_type_override")
     " echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim'
     if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != ''
         exec 'runtime ftplugin/'.b:sql_type_override.'.vim'
-    " else
-    "     echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
+        " else
+        "     echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
     endif
 elseif exists("g:sql_type_default")
     " echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim'
     if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != ''
         exec 'runtime ftplugin/'.g:sql_type_default.'.vim'
-    " else
-    "     echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
+        " else
+        "     echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
     endif
 endif
 
 " If the above runtime command succeeded, do not load the default settings
-if exists("b:did_ftplugin")
-  finish
+" as they should have already been loaded from a previous run.
+if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
+    finish
 endif
 
 let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" .
-		    \ " | unlet! b:browsefilter b:match_words"
+            \ " | unlet! b:browsefilter b:match_words"
 
 " Don't load another plugin for this buffer
 let b:did_ftplugin     = 1
@@ -261,7 +275,7 @@ let b:current_ftplugin = 'sql'
 " Win32 can filter files in the browse dialog
 if has("gui_win32") && !exists("b:browsefilter")
     let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" .
-	  \ "All Files (*.*)\t*.*\n"
+                \ "All Files (*.*)\t*.*\n"
 endif
 
 " Some standard expressions for use with the matchit strings
@@ -312,14 +326,24 @@ if !exists("b:match_words")
     " WHEN column_not_found THEN
     " WHEN OTHERS THEN
     "
+    " begin try
+    " end try
+    " begin catch
+    " end catch
+    "
     " create[ or replace] procedure|function|event
-                " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
+    " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
 
     " For ColdFusion support
     setlocal matchpairs+=<:>
     let b:match_words = &matchpairs .
-		\ ',\<begin\>:\<end\>\W*$,'.
-		\
+                \ ',\%(\<begin\)\%(\s\+\%(try\|catch\)\>\)\@!:\<end\>\W*$,'.
+                \
+                \ '\<begin\s\+try\>:'.
+                \ '\<end\s\+try\>:'.
+                \ '\<begin\s\+catch\>:'.
+                \ '\<end\s\+catch\>,'.
+                \
                 \ s:notend . '\<if\>:'.
                 \ '\<elsif\>\|\<elseif\>\|\<else\>:'.
                 \ '\<end\s\+if\>,'.
@@ -339,14 +363,14 @@ if !exists("b:match_words")
                 \ '\%(\<create\s\+' . s:or_replace . '\)\?'.
                 \ '\%(function\|procedure\|event\):'.
                 \ '\<returns\?\>'
-                " \ '\<begin\>\|\<returns\?\>:'.
-                " \ '\<end\>\(;\)\?\s*$'
-                " \ '\<exception\>:'.s:when_no_matched_or_others.
-                " \ ':\<when\s\+others\>,'.
-		"
-                " \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'.
-                " \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'.
-                " \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' .
+    " \ '\<begin\>\|\<returns\?\>:'.
+    " \ '\<end\>\(;\)\?\s*$'
+    " \ '\<exception\>:'.s:when_no_matched_or_others.
+    " \ ':\<when\s\+others\>,'.
+    "
+    " \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'.
+    " \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'.
+    " \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' .
 endif
 
 " Define how to find the macro definition of a variable using the various
--- a/runtime/ftplugin/tmux.vim
+++ b/runtime/ftplugin/tmux.vim
@@ -1,7 +1,8 @@
 " Vim filetype plugin file
-" Language:	Tmux config
-" Maintainer:	Eric Pruitt <eric.pruitt@gmail.com>
-" Last Change:  2017 Mar 04
+" Language: 	tmux(1) configuration file
+" URL: 		https://github.com/ericpruitt/tmux.vim/
+" Maintainer: 	Eric Pruitt <eric.pruitt@gmail.com>
+" Last Changed: 2017 Mar 10
 
 if exists("b:did_ftplugin")
   finish
--- a/runtime/indent/dtd.vim
+++ b/runtime/indent/dtd.vim
@@ -84,7 +84,7 @@ function GetDTDIndent()
 
   let [declaration, end] = s:lex1(line, col)
   if declaration == ""
-    return indent + &sw
+    return indent + shiftwidth()
   elseif declaration == '--'
     " We’re looking at a comment.  Now, simply determine if the comment is
     " terminated or not.  If it isn’t, let Vim take care of that using
@@ -100,7 +100,7 @@ function GetDTDIndent()
     " Check for element name.  If none exists, indent one level.
     let [name, end] = s:lex(line, end)
     if name == ""
-      return indent + &sw
+      return indent + shiftwidth()
     endif
 
     " Check for token following element name.  This can be a specification of
@@ -113,7 +113,7 @@ function GetDTDIndent()
       let n += 1
     endwhile
     if token == ""
-      return indent + &sw
+      return indent + shiftwidth()
     endif
 
     " Next comes the content model.  If the token we’ve found isn’t a
@@ -148,7 +148,7 @@ function GetDTDIndent()
           return indent
         endif
         " TODO: Should use s:lex here on getline(v:lnum) and check for >.
-        return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + &sw)
+        return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + shiftwidth())
       endif
 
       " If we’ve seen an addition or exception already and this is of the same
@@ -167,7 +167,7 @@ function GetDTDIndent()
     " Check for element name.  If none exists, indent one level.
     let [name, end] = s:lex(line, end)
     if name == ""
-      return indent + &sw
+      return indent + shiftwidth()
     endif
 
     " Check for any number of attributes.
@@ -180,7 +180,7 @@ function GetDTDIndent()
       let [name, end] = s:lex(line, end)
       if name == ""
         " TODO: Should use s:lex here on getline(v:lnum) and check for >.
-        return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw)
+        return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth())
       elseif name == ">"
         return indent
       endif
@@ -194,14 +194,14 @@ function GetDTDIndent()
       " (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)?
       let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)')
       if value == ""
-        return indent + &sw * 2
+        return indent + shiftwidth() * 2
       elseif value == 'NOTATION'
         " If this is a enumerated value based on notations, read another token
         " for the actual value.  If it doesn’t exist, indent three levels.
         " TODO: If validating according to above, value must be equal to '('.
         let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)')
         if value == ""
-          return indent + &sw * 3
+          return indent + shiftwidth() * 3
         endif
       endif
 
@@ -216,13 +216,13 @@ function GetDTDIndent()
       " two levels.
       let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|#\(REQUIRED\|IMPLIED\|FIXED\)\)')
       if default == ""
-        return indent + &sw * 2
+        return indent + shiftwidth() * 2
       elseif default == '#FIXED'
         " We need to look for the fixed value.  If non exists, indent three
         " levels.
         let [default, end] = s:lex(line, end, '^"\_[^"]*"')
         if default == ""
-          return indent + &sw * 3
+          return indent + shiftwidth() * 3
         endif
       endif
     endwhile
@@ -233,11 +233,11 @@ function GetDTDIndent()
     " again, if none exists, indent one level.
     let [name, end] = s:lex(line, end)
     if name == ""
-      return indent + &sw
+      return indent + shiftwidth()
     elseif name == '%'
       let [name, end] = s:lex(line, end)
       if name == ""
-        return indent + &sw
+        return indent + shiftwidth()
       endif
     endif
 
@@ -256,27 +256,27 @@ function GetDTDIndent()
     " we’re now done with this entity.
     let [value, end] = s:lex(line, end)
     if value == ""
-      return indent + &sw
+      return indent + shiftwidth()
     elseif value == 'SYSTEM' || value == 'PUBLIC'
       let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)')
       if quoted_string == ""
-        return indent + &sw * 2
+        return indent + shiftwidth() * 2
       endif
 
       if value == 'PUBLIC'
         let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)')
         if quoted_string == ""
-          return indent + &sw * 2
+          return indent + shiftwidth() * 2
         endif
       endif
 
       let [ndata, end] = s:lex(line, end)
       if ndata == ""
-        return indent + &sw
+        return indent + shiftwidth()
       endif
 
       let [name, end] = s:lex(line, end)
-      return name == "" ? (indent + &sw * 2) : indent
+      return name == "" ? (indent + shiftwidth() * 2) : indent
     else
       return indent
     endif
@@ -284,24 +284,24 @@ function GetDTDIndent()
     " Check for notation name.  If none exists, indent one level.
     let [name, end] = s:lex(line, end)
     if name == ""
-      return indent + &sw
+      return indent + shiftwidth()
     endif
 
     " Now check for the external ID.  If none exists, indent one level.
     let [id, end] = s:lex(line, end)
     if id == ""
-      return indent + &sw
+      return indent + shiftwidth()
     elseif id == 'SYSTEM' || id == 'PUBLIC'
       let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)')
       if quoted_string == ""
-        return indent + &sw * 2
+        return indent + shiftwidth() * 2
       endif
 
       if id == 'PUBLIC'
         let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)')
         if quoted_string == ""
           " TODO: Should use s:lex here on getline(v:lnum) and check for >.
-          return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw * 2)
+          return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth() * 2)
         elseif quoted_string == '>'
           return indent
         endif
--- a/runtime/indent/eiffel.vim
+++ b/runtime/indent/eiffel.vim
@@ -2,9 +2,10 @@
 " Language:	Eiffel
 " Maintainer:	Jocelyn Fiat <jfiat@eiffel.com>
 " Previous-Maintainer:	David Clarke <gadicath@dishevelled.net>
+" Contributions from: Takuya Fujiwara
 " Contributions from: Thilo Six
-" $Date: 2004/12/09 21:33:52 $
-" $Revision: 1.3 $
+" $Date: 2017/03/08 06:00:00 $
+" $Revision: 1.4 $
 " URL: https://github.com/eiffelhub/vim-eiffel
 
 " Only load this indent file when no other was loaded.
@@ -28,7 +29,7 @@ let b:undo_indent = "setl smartindent< i
 " Define some stuff
 " keywords grouped by indenting
 let s:trust_user_indent = '\(+\)\(\s*\(--\).*\)\=$'
-let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>'
+let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|across\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>'
 let s:outdent = '^\s*\(else\|invariant\|variant\|do\|require\|until\|loop\|local\)\>'
 let s:no_indent = '^\s*\(class\|feature\|creation\|inherit\)\>'
 let s:single_dent = '^[^-]\+[[:alnum:]]\+ is\(\s*\(--\).*\)\=$'
@@ -63,23 +64,23 @@ function GetEiffelIndent()
   " Add a 'shiftwidth' after lines that start with an indent word
   let ind = indent(lnum)
   if getline(lnum) =~ s:relative_indent
-    let ind = ind + &sw
+    let ind = ind + shiftwidth()
   endif
 
   " Indent to single indent
   if getline(v:lnum) =~ s:single_dent && getline(v:lnum) !~ s:relative_indent
 	   \ && getline(v:lnum) !~ '\s*\<\(and\|or\|implies\)\>'
-     let ind = &sw
+     let ind = shiftwidth()
   endif
 
   " Indent to double indent
   if getline(v:lnum) =~ s:inheritance_dent
-     let ind = 2 * &sw
+     let ind = 2 * shiftwidth()
   endif
 
   " Indent line after the first line of the function definition
   if getline(lnum) =~ s:single_dent
-     let ind = ind + &sw
+     let ind = ind + shiftwidth()
   endif
 
   " The following should always be at the start of a line, no indenting
@@ -91,17 +92,17 @@ function GetEiffelIndent()
   " or first thing after the 'do'
   if getline(v:lnum) =~ s:outdent && getline(v:lnum - 1) !~ s:single_dent
 	\ && getline(v:lnum - 1) !~ '^\s*do\>'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
   endif
 
   " Subtract a shiftwidth for end statements
   if getline(v:lnum) =~ '^\s*end\>'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
   endif
 
   " set indent of zero end statements that are at an indent of 3, this should
   " only ever be the class's end.
-  if getline(v:lnum) =~ '^\s*end\>' && ind == &sw
+  if getline(v:lnum) =~ '^\s*end\>' && ind == shiftwidth()
     let ind = 0
   endif
 
--- a/runtime/indent/eterm.vim
+++ b/runtime/indent/eterm.vim
@@ -25,11 +25,11 @@ function GetEtermIndent()
   let ind = indent(lnum)
 
   if getline(lnum) =~ '^\s*begin\>'
-    let ind = ind + &sw
+    let ind = ind + shiftwidth()
   endif
 
   if getline(v:lnum) =~ '^\s*end\>'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
   endif
 
   return ind
--- a/runtime/indent/framescript.vim
+++ b/runtime/indent/framescript.vim
@@ -30,11 +30,11 @@ function GetFrameScriptIndent()
   let ind = indent(lnum)
 
   if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)'
-    let ind = ind + &sw
+    let ind = ind + shiftwidth()
   endif
 
   if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
   endif
 
   return ind
--- a/runtime/indent/java.vim
+++ b/runtime/indent/java.vim
@@ -1,12 +1,14 @@
 " Vim indent file
 " Language:	Java
 " Previous Maintainer: Toby Allsopp <toby.allsopp@peace.com>
-" Current Maintainer: Hong Xu <xuhdev@gmail.com>
-" Last Change:	2012 May 18
-" Version: 1.0
+" Current Maintainer: Hong Xu <hong@topbug.net>
+" Homepage: http://www.vim.org/scripts/script.php?script_id=3899
+"           https://github.com/xuhdev/indent-java.vim
+" Last Change:	2016 Mar 7
+" Version: 1.1
 " License: Same as Vim.
-" Copyright (c) 2012 Hong Xu
-" Before 2012, this file is maintained by Toby Allsopp.
+" Copyright (c) 2012-2016 Hong Xu
+" Before 2012, this file was maintained by Toby Allsopp.
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -29,6 +31,7 @@ let b:undo_indent = "set cin< cino< inde
 if exists("*GetJavaIndent")
   finish
 endif
+
 let s:keepcpo= &cpo
 set cpo&vim
 
@@ -70,7 +73,7 @@ function GetJavaIndent()
 
   " If the previous line starts with '@', we should have the same indent as
   " the previous one
-  if getline(lnum) =~ '^\s*@\S\+\s*$'
+  if getline(lnum) =~ '^\s*@.*$'
     return indent(lnum)
   endif
 
@@ -85,9 +88,9 @@ function GetJavaIndent()
 
   " Try to align "throws" lines for methods and "extends" and "implements" for
   " classes.
-  if getline(v:lnum) =~ '^\s*\(extends\|implements\)\>'
-        \ && getline(lnum) !~ '^\s*\(extends\|implements\)\>'
-    let theIndent = theIndent + &sw
+  if getline(v:lnum) =~ '^\s*\(throws\|extends\|implements\)\>'
+        \ && getline(lnum) !~ '^\s*\(throws\|extends\|implements\)\>'
+    let theIndent = theIndent + shiftwidth()
   endif
 
   " correct for continuation lines of "throws", "implements" and "extends"
@@ -96,27 +99,27 @@ function GetJavaIndent()
   if strlen(cont_kw) > 0
     let amount = strlen(cont_kw) + 1
     if getline(lnum) !~ ',\s*$'
-      let theIndent = theIndent - (amount + &sw)
+      let theIndent = theIndent - (amount + shiftwidth())
       if theIndent < 0
         let theIndent = 0
       endif
     elseif prev == lnum
       let theIndent = theIndent + amount
       if cont_kw ==# 'throws'
-        let theIndent = theIndent + &sw
+        let theIndent = theIndent + shiftwidth()
       endif
     endif
   elseif getline(prev) =~ '^\s*\(throws\|implements\|extends\)\>'
         \ && (getline(prev) =~ '{\s*$'
         \  || getline(v:lnum) =~ '^\s*{\s*$')
-    let theIndent = theIndent - &sw
+    let theIndent = theIndent - shiftwidth()
   endif
 
   " When the line starts with a }, try aligning it with the matching {,
   " skipping over "throws", "extends" and "implements" clauses.
   if getline(v:lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$'
     call cursor(v:lnum, 1)
-    silent normal %
+    silent normal! %
     let lnum = line('.')
     if lnum < v:lnum
       while lnum > 1
--- a/runtime/indent/ld.vim
+++ b/runtime/indent/ld.vim
@@ -65,7 +65,7 @@ function GetLDIndent()
   if line =~ '^\s*\*'
     return cindent(v:lnum)
   elseif line =~ '^\s*}'
-    return indent(v:lnum) - &sw
+    return indent(v:lnum) - shiftwidth()
   endif
 
   let pnum = s:prevnonblanknoncomment(v:lnum - 1)
@@ -73,11 +73,11 @@ function GetLDIndent()
     return 0
   endif
 
-  let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw
+  let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
 
   let pline = getline(pnum)
   if pline =~ '}\s*$'
-    let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw
+    let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
   endif
 
   return ind
--- a/runtime/indent/make.vim
+++ b/runtime/indent/make.vim
@@ -48,14 +48,14 @@ function GetMakeIndent()
     if prev_prev_line =~ s:continuation_rx
       return indent(prev_lnum)
     elseif prev_line =~ s:rule_rx
-      return &sw
+      return shiftwidth()
     elseif prev_line =~ s:assignment_rx
       call cursor(prev_lnum, 1)
       if search(s:assignment_rx, 'W') != 0
         return virtcol('.') - 1
       else
         " TODO: ?
-        return &sw
+        return shiftwidth()
       endif
     else
       " TODO: OK, this might be a continued shell command, so perhaps indent
@@ -66,7 +66,7 @@ function GetMakeIndent()
       "    return indent(prev_lnum) + 2
       "  endif
       "endif
-      return indent(prev_lnum) + &sw
+      return indent(prev_lnum) + shiftwidth()
     endif
   elseif prev_prev_line =~ s:continuation_rx
     let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line)
@@ -102,13 +102,13 @@ function GetMakeIndent()
       return &ts
     endif
   elseif prev_line =~ s:conditional_directive_rx
-    return &sw
+    return shiftwidth()
   else
     let line = getline(v:lnum)
     if line =~ s:just_inserted_rule_rx
       return 0
     elseif line =~ s:end_conditional_directive_rx
-      return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - &sw
+      return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth()
     else
       return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1)
     endif
--- a/runtime/indent/readline.vim
+++ b/runtime/indent/readline.vim
@@ -25,11 +25,11 @@ function GetReadlineIndent()
   let ind = indent(lnum)
 
   if getline(lnum) =~ '^\s*$\(if\|else\)\>'
-    let ind = ind + &sw
+    let ind = ind + shiftwidth()
   endif
 
   if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
   endif
 
   return ind
new file mode 100644
--- /dev/null
+++ b/runtime/indent/sas.vim
@@ -0,0 +1,138 @@
+" Vim indent file
+" Language:     SAS
+" Maintainer:   Zhen-Huan Hu <wildkeny@gmail.com>
+" Version:      3.0.1
+" Last Change:  Mar 13, 2017
+
+if exists("b:did_indent")
+  finish
+endif
+let b:did_indent = 1
+
+setlocal indentexpr=GetSASIndent()
+setlocal indentkeys+=;,=~data,=~proc,=~macro
+
+if exists("*GetSASIndent")
+  finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Regex that captures the start of a data/proc section
+let s:section_str = '\v%(^|;)\s*%(data|proc)>'
+" Regex that captures the end of a run-processing section
+let s:section_run = '\v%(^|;)\s*run\s*;'
+" Regex that captures the end of a data/proc section
+let s:section_end = '\v%(^|;)\s*%(quit|enddata)\s*;'
+
+" Regex that captures the start of a control block (anything inside a section)
+let s:block_str = '\v<%(do>%([^;]+<%(to|over)>[^;]+)=|%(define|layout|method|select)>[^;]+|begingraph)\s*;'
+" Regex that captures the end of a control block (anything inside a section)
+let s:block_end = '\v<%(end|endlayout|endgraph)\s*;'
+
+" Regex that captures the start of a macro
+let s:macro_str = '\v%(^|;)\s*\%macro>'
+" Regex that captures the end of a macro
+let s:macro_end = '\v%(^|;)\s*\%mend\s*;'
+
+" Regex that defines the end of the program
+let s:program_end = '\v%(^|;)\s*endsas\s*;'
+
+" List of procs supporting run-processing
+let s:run_processing_procs = [
+      \ 'catalog', 'chart', 'datasets', 'document', 'ds2', 'plot', 'sql',
+      \ 'gareabar', 'gbarline', 'gchart', 'gkpi', 'gmap', 'gplot', 'gradar', 'greplay', 'gslide', 'gtile',
+      \ 'anova', 'arima', 'catmod', 'factex', 'glm', 'model', 'optex', 'plan', 'reg',
+      \ 'iml',
+      \ ]
+
+" Find the line number of previous keyword defined by the regex
+function! s:PrevMatch(lnum, regex)
+  let prev_lnum = prevnonblank(a:lnum - 1)
+  while prev_lnum > 0
+    let prev_line = getline(prev_lnum)
+    if prev_line =~ a:regex
+      break
+    else
+      let prev_lnum = prevnonblank(prev_lnum - 1)
+    endif
+  endwhile
+  return prev_lnum
+endfunction
+
+" Main function
+function! GetSASIndent()
+  let prev_lnum = prevnonblank(v:lnum - 1)
+  if prev_lnum ==# 0
+    " Leave the indentation of the first line unchanged
+    return indent(1)
+  else
+    let prev_line = getline(prev_lnum)
+    " Previous non-blank line contains the start of a macro/section/block
+    " while not the end of a macro/section/block (at the same line)
+    if (prev_line =~ s:section_str && prev_line !~ s:section_run && prev_line !~ s:section_end) ||
+          \ (prev_line =~ s:block_str && prev_line !~ s:block_end) ||
+          \ (prev_line =~ s:macro_str && prev_line !~ s:macro_end)
+      let ind = indent(prev_lnum) + &sts
+    elseif prev_line =~ s:section_run && prev_line !~ s:section_end
+      let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str)
+      let prev_section_end_lnum = max([
+            \ s:PrevMatch(v:lnum, s:section_end),
+            \ s:PrevMatch(v:lnum, s:macro_end  ),
+            \ s:PrevMatch(v:lnum, s:program_end)])
+      " Check if the section supports run-processing
+      if prev_section_end_lnum < prev_section_str_lnum &&
+            \ getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' .
+            \ join(s:run_processing_procs, '|') . ')>'
+        let ind = indent(prev_lnum) + &sts
+      else
+        let ind = indent(prev_lnum)
+      endif
+    else
+      let ind = indent(prev_lnum)
+    endif
+  endif
+  " Re-adjustments based on the inputs of the current line
+  let curr_line = getline(v:lnum)
+  if curr_line =~ s:program_end
+    " End of the program
+    " Same indentation as the first non-blank line
+    return indent(nextnonblank(1))
+  elseif curr_line =~ s:macro_end
+    " Current line is the end of a macro
+    " Match the indentation of the start of the macro
+    return indent(s:PrevMatch(v:lnum, s:macro_str))
+  elseif curr_line =~ s:block_end && curr_line !~ s:block_str
+    " Re-adjust if current line is the end of a block
+    " while not the beginning of a block (at the same line)
+    " Returning the indent of previous block start directly
+    " would not work due to nesting
+    let ind = ind - &sts
+  elseif curr_line =~ s:section_str || curr_line =~ s:section_run || curr_line =~ s:section_end
+    " Re-adjust if current line is the start/end of a section
+    " since the end of a section could be inexplicit
+    let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str)
+    " Check if the previous section supports run-processing
+    if getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' .
+          \ join(s:run_processing_procs, '|') . ')>'
+      let prev_section_end_lnum = max([
+            \ s:PrevMatch(v:lnum, s:section_end),
+            \ s:PrevMatch(v:lnum, s:macro_end  ),
+            \ s:PrevMatch(v:lnum, s:program_end)])
+    else
+      let prev_section_end_lnum = max([
+            \ s:PrevMatch(v:lnum, s:section_end),
+            \ s:PrevMatch(v:lnum, s:section_run),
+            \ s:PrevMatch(v:lnum, s:macro_end  ),
+            \ s:PrevMatch(v:lnum, s:program_end)])
+    endif
+    if prev_section_end_lnum < prev_section_str_lnum
+      let ind = ind - &sts
+    endif
+  endif
+  return ind
+endfunction
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
--- a/runtime/indent/scala.vim
+++ b/runtime/indent/scala.vim
@@ -412,24 +412,24 @@ function! GetScalaIndent()
     if prevline =~ '^\s*\.'
       return ind
     else
-      return ind + &shiftwidth
+      return ind + shiftwidth()
     endif
   endif
 
   " Indent html literals
   if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$'
     call scala#ConditionalConfirm("3")
-    return ind + &shiftwidth
+    return ind + shiftwidth()
   endif
 
   " assumes curly braces around try-block
   if curline =~ '^\s*}\s*\<catch\>'
-    return ind - &shiftwidth
+    return ind - shiftwidth()
   elseif curline =~ '^\s*\<catch\>'
     return ind
   endif
 
-  " Add a 'shiftwidth' after lines that start a block
+  " Add a shiftwidth()' after lines that start a block
   " If 'if', 'for' or 'while' end with ), this is a one-line block
   " If 'val', 'var', 'def' end with =, this is a one-line block
   if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1)
@@ -438,7 +438,7 @@ function! GetScalaIndent()
         \ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$'
         \ || prevline =~ '=\s*$'
     call scala#ConditionalConfirm("4")
-    let ind = ind + &shiftwidth
+    let ind = ind + shiftwidth()
   elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>'
     return ind
   endif
@@ -447,7 +447,7 @@ function! GetScalaIndent()
   let bracketCount = scala#CountBrackets(prevline, '{', '}')
   if bracketCount > 0 || prevline =~ '.*{\s*$'
     call scala#ConditionalConfirm("5b")
-    let ind = ind + &shiftwidth
+    let ind = ind + shiftwidth()
   elseif bracketCount < 0
     call scala#ConditionalConfirm("6b")
     " if the closing brace actually completes the braces entirely, then we
@@ -475,7 +475,7 @@ function! GetScalaIndent()
     let bracketCount = scala#CountBrackets(prevline, '(', ')')
     if bracketCount > 0 || prevline =~ '.*(\s*$'
       call scala#ConditionalConfirm("5a")
-      let ind = ind + &shiftwidth
+      let ind = ind + shiftwidth()
     elseif bracketCount < 0
       call scala#ConditionalConfirm("6a")
       " if the closing brace actually completes the braces entirely, then we
@@ -497,7 +497,7 @@ function! GetScalaIndent()
       else
         " This is the only part that's different from from the '{', '}' one below
         " Yup... some refactoring is necessary at some point.
-        let ind = ind + (bracketCount * &shiftwidth)
+        let ind = ind + (bracketCount * shiftwidth())
         let lineCompletedBrackets = 1
       endif
     endif
@@ -506,10 +506,10 @@ function! GetScalaIndent()
   if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' &&
    \ ! scala#LineIsCompleteIf(prevline) &&
    \ prevline !~ '^.*}\s*$'
-    let ind = ind - &shiftwidth
+    let ind = ind - shiftwidth()
   endif
 
-  " Subtract a 'shiftwidth' on '}' or html
+  " Subtract a shiftwidth()' on '}' or html
   let curCurlyCount = scala#CountCurlies(curline)
   if curCurlyCount < 0
     call scala#ConditionalConfirm("14a")
@@ -517,7 +517,7 @@ function! GetScalaIndent()
     return indent(matchline)
   elseif curline =~ '^\s*</[a-zA-Z][^>]*>'
     call scala#ConditionalConfirm("14c")
-    return ind - &shiftwidth
+    return ind - shiftwidth()
   endif
 
   let prevParenCount = scala#CountParens(prevline)
@@ -529,7 +529,7 @@ function! GetScalaIndent()
   let prevCurlyCount = scala#CountCurlies(prevline)
   if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>'
     call scala#ConditionalConfirm("16")
-    let ind = ind + &shiftwidth
+    let ind = ind + shiftwidth()
   endif
 
   if ind == originalIndentValue && curline =~ '^\s*\<case\>'
@@ -555,7 +555,7 @@ function! GetScalaIndent()
   if scala#LineIsAClosingXML(prevline)
     if scala#LineCompletesXML(prevlnum, prevline)
       call scala#ConditionalConfirm("20a")
-      return ind - &shiftwidth
+      return ind - shiftwidth()
     else
       call scala#ConditionalConfirm("20b")
       return ind
@@ -566,7 +566,7 @@ function! GetScalaIndent()
     "let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline)
     "if indentMultiplier != 0
     "  call scala#ConditionalConfirm("19a")
-    "  let ind = ind - (indentMultiplier * &shiftwidth)
+    "  let ind = ind - (indentMultiplier * shiftwidth())
     let defValrLine = scala#Test(prevlnum, prevline, '{', '}')
     if defValrLine != -1
       call scala#ConditionalConfirm("21a")
@@ -575,10 +575,10 @@ function! GetScalaIndent()
       call scala#ConditionalConfirm("21b")
       if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$'
         call scala#ConditionalConfirm("21c")
-        let ind = ind - &shiftwidth
+        let ind = ind - shiftwidth()
       elseif scala#LineCompletesIfElse(prevlnum, prevline)
         call scala#ConditionalConfirm("21d")
-        let ind = ind - &shiftwidth
+        let ind = ind - shiftwidth()
       elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$'
         " Handles situations that look like this:
         "
@@ -592,7 +592,7 @@ function! GetScalaIndent()
         "     10
         "   ).somethingHere()
         call scala#ConditionalConfirm("21e")
-        let ind = ind - &shiftwidth
+        let ind = ind - shiftwidth()
       endif
     endif
   endif
--- a/runtime/indent/tcl.vim
+++ b/runtime/indent/tcl.vim
@@ -56,7 +56,7 @@ function GetTclIndent()
   if line =~ '^\s*\*'
     return cindent(v:lnum)
   elseif line =~ '^\s*}'
-    return indent(v:lnum) - &sw
+    return indent(v:lnum) - shiftwidth()
   endif
 
   let pnum = s:prevnonblanknoncomment(v:lnum - 1)
@@ -64,11 +64,11 @@ function GetTclIndent()
     return 0
   endif
 
-  let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw
+  let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
 
   let pline = getline(pnum)
   if pline =~ '}\s*$'
-    let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw
+    let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
   endif
 
   return ind
--- a/runtime/indent/tcsh.vim
+++ b/runtime/indent/tcsh.vim
@@ -32,17 +32,17 @@ function TcshGetIndent()
     let ind = indent(lnum)
     let line = getline(lnum)
     if line =~ '\v^\s*%(while|foreach)>|^\s*%(case\s.*:|default:|else)\s*$|%(<then|\\)$'
-	let ind = ind + &sw
+	let ind = ind + shiftwidth()
     endif
 
     if line =~ '\v^\s*breaksw>'
-	let ind = ind - &sw
+	let ind = ind - shiftwidth()
     endif
 
     " Subtract indent if current line has on end, endif, case commands
     let line = getline(v:lnum)
     if line =~ '\v^\s*%(else|end|endif)\s*$'
-	let ind = ind - &sw
+	let ind = ind - shiftwidth()
     endif
 
     return ind
--- a/runtime/indent/treetop.vim
+++ b/runtime/indent/treetop.vim
@@ -26,12 +26,12 @@ function GetTreetopIndent()
   let line = getline(pnum)
 
   if line =~ '^\s*\%(grammar\|module\|rule\)\>'
-    let ind += &sw
+    let ind += shiftwidth()
   endif
 
   let line = getline(v:lnum)
   if line =~ '^\s*end\>'
-    let ind -= &sw
+    let ind -= shiftwidth()
   end
 
   retur ind
--- a/runtime/indent/xf86conf.vim
+++ b/runtime/indent/xf86conf.vim
@@ -26,11 +26,11 @@ function GetXF86ConfIndent()
   let ind = indent(lnum)
 
   if getline(lnum) =~? '^\s*\(Sub\)\=Section\>'
-    let ind = ind + &sw
+    let ind = ind + shiftwidth()
   endif
 
   if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>'
-    let ind = ind - &sw
+    let ind = ind - shiftwidth()
   endif
 
   return ind
--- a/runtime/indent/xinetd.vim
+++ b/runtime/indent/xinetd.vim
@@ -47,8 +47,8 @@ function GetXinetdIndent()
     return 0
   endif
 
-  return indent(pnum) + s:count_braces(pnum, 1) * &sw
-        \ - s:count_braces(v:lnum, 0) * &sw
+  return indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
+        \ - s:count_braces(v:lnum, 0) * shiftwidth()
 endfunction
 
 let &cpo = s:keepcpo
--- a/runtime/syntax/erlang.vim
+++ b/runtime/syntax/erlang.vim
@@ -1,9 +1,10 @@
 " Vim syntax file
 " Language:     Erlang (http://www.erlang.org)
 " Maintainer:   Csaba Hoch <csaba.hoch@gmail.com>
-" Last Update:  2013-Jul-25
+" Contributor:  Adam Rutkowski <hq@mtod.org>
+" Last Update:  2017-Mar-05
 " License:      Vim license
-" URL:          https://github.com/hcs42/vim-erlang
+" URL:          https://github.com/vim-erlang/vim-erlang-runtime
 
 " Acknowledgements: This script was originally created by Kresimir Marzic [1].
 " The script was then revamped by Csaba Hoch [2]. During the revamp, the new
@@ -46,7 +47,6 @@ syn match erlangComment           '%.*$'
 syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
 syn match erlangCommentAnnotation /`[^']*'/ contained
 syn keyword erlangTodo            TODO FIXME XXX contained
-syn match erlangShebang           '^#!.*'
 
 " Numbers (minimum base is 2, maximum is 36.)
 syn match erlangNumberInteger '\<\d\+\>'
@@ -56,12 +56,12 @@ syn match erlangNumberFloat   '\<\d\+\.\
 " Strings, atoms, characters
 syn region erlangString            start=/"/ end=/"/ contains=erlangStringModifier
 syn region erlangQuotedAtom        start=/'/ end=/'/ contains=erlangQuotedAtomModifier
-syn match erlangStringModifier     '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
-syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
+syn match erlangStringModifier     '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\|\~\%([ni~]\|\%(-\=\d\+\|\*\)\=\.\=\%(\*\|\d\+\)\=\%(\..\)\=[tl]*[cfegswpWPBX#bx+]\)' contained
+syn match erlangQuotedAtomModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
 syn match erlangModifier           '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
 
 " Operators, separators
-syn match erlangOperator   '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
+syn match erlangOperator   '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|=>\|:=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
 syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
 syn match erlangBracket    '{\|}\|\[\|]\||\|||'
 syn match erlangPipe       '|'
@@ -72,14 +72,19 @@ syn match erlangAtom           '\<\l[[:a
 syn keyword erlangBoolean      true false contained
 syn match erlangLocalFuncCall  '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
 syn match erlangLocalFuncRef   '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@='
-syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment
-syn match erlangGlobalFuncRef  '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment
+syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment,erlangVariable
+syn match erlangGlobalFuncRef  '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment,erlangVariable
 
-" Variables, macros, records
+" Variables, macros, records, maps
 syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
 syn match erlangMacro    '??\=[[:alnum:]_@]\+'
 syn match erlangMacro    '\%(-define(\)\@<=[[:alnum:]_@]\+'
+syn match erlangMap      '#'
 syn match erlangRecord   '#\s*\l[[:alnum:]_@]*'
+syn region erlangQuotedRecord        start=/#\s*'/ end=/'/ contains=erlangQuotedAtomModifier
+
+" Shebang (this line has to be after the ErlangMap)
+syn match erlangShebang  '^#!.*'
 
 " Bitstrings
 syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment
@@ -94,7 +99,7 @@ syn match erlangPreCondit '^\s*-\%(\s\|\
 syn match erlangType      '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
 
 " Keywords
-syn keyword erlangKeyword after begin case catch cond end fun if let of query
+syn keyword erlangKeyword after begin case catch cond end fun if let of
 syn keyword erlangKeyword receive when try
 
 " Build-in-functions (BIFs)
@@ -142,7 +147,6 @@ let b:erlang_syntax_synced = 1
 let s:old_style = (exists("g:erlang_old_style_highlight") &&
                   \g:erlang_old_style_highlight == 1)
 
-" Only when an item doesn't have highlighting yet
 
 " Comments
 hi def link erlangComment Comment
@@ -188,6 +192,8 @@ hi def link erlangGlobalFuncRef Function
 hi def link erlangVariable Normal
 hi def link erlangMacro Normal
 hi def link erlangRecord Normal
+hi def link erlangQuotedRecord Normal
+hi def link erlangMap Normal
 else
 hi def link erlangAtom String
 hi def link erlangLocalFuncCall Normal
@@ -197,6 +203,8 @@ hi def link erlangGlobalFuncRef Normal
 hi def link erlangVariable Identifier
 hi def link erlangMacro Macro
 hi def link erlangRecord Structure
+hi def link erlangQuotedRecord Structure
+hi def link erlangMap Structure
 endif
 
 " Bitstrings
--- a/runtime/syntax/scala.vim
+++ b/runtime/syntax/scala.vim
@@ -71,6 +71,8 @@ hi link scalaUnicodeChar Special
 
 syn match scalaOperator "||"
 syn match scalaOperator "&&"
+syn match scalaOperator "|"
+syn match scalaOperator "&"
 hi link scalaOperator Special
 
 syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList
@@ -142,7 +144,7 @@ hi link scalaString String
 hi link scalaStringEmbeddedQuote String
 
 syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
-syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
+syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\ze\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
 hi link scalaIString String
 hi link scalaTripleIString String
 
--- a/runtime/syntax/tmux.vim
+++ b/runtime/syntax/tmux.vim
@@ -4,18 +4,16 @@
 " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
 " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
 
-if version < 600
-    syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
     finish
-else
-    let b:current_syntax = "tmux"
 endif
 
-" this file uses line continuations
-let s:cpo_sav = &cpo
+" Explicitly change compatiblity options to Vim's defaults because this file
+" uses line continuations.
+let s:original_cpo = &cpo
 set cpo&vim
 
+let b:current_syntax = "tmux"
 setlocal iskeyword+=-
 syntax case match
 
@@ -62,7 +60,6 @@ for s:i in range(0, 255)
     exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display"
 \     " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
 endfor
-unlet s:bg s:i
 
 syn keyword tmuxOptions
 \ buffer-limit command-alias default-terminal escape-time exit-unattached
@@ -123,5 +120,5 @@ syn keyword tmuxCommands
 \ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for
 \ wait
 
-let &cpo = s:cpo_sav
-unlet! s:cpo_sav
+let &cpo = s:original_cpo
+unlet! s:original_cpo s:bg s:i