Update runtime files.
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 4b47a39..8434aae 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -602,7 +602,7 @@
 The :Man command allows you to turn Vim into a manpager (that syntax highlights
 manpages and follows linked manpages on hitting CTRL-]).
 
-Works on:
+Tested on:
 
   - Linux
   - Mac OS
@@ -617,25 +617,36 @@
   - BeOS
   - OS/2
 
-For bash,zsh,ksh or dash by adding to the config file (.bashrc,.zshrc, ...)
+If man sets the $MAN_PN environment variable, like man-db, the most common
+implementation on Linux, then the "env MAN_PN=1 " part below should NOT be
+set, that is, the "env MAN_PN=1" should be omitted! Otherwise, the Vim 
+manpager does not correctly recognize manpages whose title contains a capital 
+letter. See the discussion on
+
+  https://groups.google.com/forum/#!topic/vim_dev/pWZmt_7GkxI
+
+For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...)
 
 	export MANPAGER="env MAN_PN=1 vim -M +MANPAGER -"
 
+For (t)csh, add to the config file
+
+	setenv MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
+
+For fish, add to the config file
+
+	set -x MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
+
 On OpenBSD:
 
         export MANPAGER="env MAN_PN=1 vim -M +MANPAGER"
 
-For (t)csh by adding to the config file
+If you experience still issues on manpages whose titles do not contain capital
+letters, then try adding MANPATH=${MANPATH} after MAN_PN=1. If your manpages do
+not show up localized, then try adding, LANGUAGE=${LANG} after MAN_PN=1. See
 
-	setenv MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
+  https://github.com/vim/vim/issues/1002
 
-For fish by adding to the config file
-
-	set -x MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
-
-If man sets the $MAN_PN environment variable, like man-db, the most common
-implementation on Linux and Mac OS, then the "env MAN_PN=1 " part above is
-superfluous.
 
 PDF							*ft-pdf-plugin*
 
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 8f96e41..a870a50 100644
--- 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 Mar 09
+*if_pyth.txt*   For Vim version 8.0.  Last change: 2017 Nov 09
 
 
 		  VIM REFERENCE MANUAL    by Paul Moore
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 33dfea0..b9e82d7 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 8.0.  Last change: 2017 Nov 02
+*options.txt*	For Vim version 8.0.  Last change: 2017 Nov 11
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -5336,7 +5336,7 @@
 	sysmouse and Linux console with gpm).  For using the mouse in the
 	GUI, see |gui-mouse|.
 	The mouse can be enabled for different modes:
-		n	Normal mode
+		n	Normal mode and Terminal modes
 		v	Visual mode
 		i	Insert mode
 		c	Command-line mode
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index f59c9fa..26d2fa2 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt*  For Vim version 8.0.  Last change: 2017 Oct 24
+*starting.txt*  For Vim version 8.0.  Last change: 2017 Nov 11
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1418,7 +1418,7 @@
 5. The scroll position and the cursor position in the file.  Doesn't work very
    well when there are closed folds.
 6. The local current directory, if it is different from the global current
-   directory.
+   directory and 'viewoptions' contains "curdir".
 
 Note that Views and Sessions are not perfect:
 - They don't restore everything.  For example, defined functions, autocommands
@@ -1530,7 +1530,7 @@
   you have worked with.
 - If you want to share the viminfo file with other users (e.g. when you "su"
   to another user), you can make the file writable for the group or everybody.
-  Vim will preserve this when writing new viminfo files.  Be careful, don't
+  Vim will preserve this when replacing the viminfo file.  Be careful, don't
   allow just anybody to read and write your viminfo file!
 - Vim will not overwrite a viminfo file that is not writable by the current
   "real" user.  This helps for when you did "su" to become root, but your
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 9eeb953..5019bcd 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -307,6 +307,7 @@
 'go-g'	options.txt	/*'go-g'*
 'go-h'	options.txt	/*'go-h'*
 'go-i'	options.txt	/*'go-i'*
+'go-k'	options.txt	/*'go-k'*
 'go-l'	options.txt	/*'go-l'*
 'go-m'	options.txt	/*'go-m'*
 'go-p'	options.txt	/*'go-p'*
@@ -8890,16 +8891,29 @@
 termcap-cursor-shape	term.txt	/*termcap-cursor-shape*
 termcap-options	term.txt	/*termcap-options*
 termcap-title	term.txt	/*termcap-title*
+termdebug-commands	terminal.txt	/*termdebug-commands*
+termdebug-communication	terminal.txt	/*termdebug-communication*
+termdebug-customizing	terminal.txt	/*termdebug-customizing*
+termdebug-example	terminal.txt	/*termdebug-example*
+termdebug-starting	terminal.txt	/*termdebug-starting*
+termdebug-stepping	terminal.txt	/*termdebug-stepping*
+termdebug-variables	terminal.txt	/*termdebug-variables*
 terminal	terminal.txt	/*terminal*
 terminal-colors	os_unix.txt	/*terminal-colors*
+terminal-cursor-style	terminal.txt	/*terminal-cursor-style*
 terminal-debug	terminal.txt	/*terminal-debug*
 terminal-functions	usr_41.txt	/*terminal-functions*
 terminal-info	term.txt	/*terminal-info*
 terminal-key-codes	term.txt	/*terminal-key-codes*
+terminal-ms-windows	terminal.txt	/*terminal-ms-windows*
 terminal-options	term.txt	/*terminal-options*
 terminal-output-codes	term.txt	/*terminal-output-codes*
+terminal-resizing	terminal.txt	/*terminal-resizing*
+terminal-size-color	terminal.txt	/*terminal-size-color*
+terminal-special-keys	terminal.txt	/*terminal-special-keys*
 terminal-testing	terminal.txt	/*terminal-testing*
 terminal-typing	terminal.txt	/*terminal-typing*
+terminal-unix	terminal.txt	/*terminal-unix*
 terminal-use	terminal.txt	/*terminal-use*
 terminal.txt	terminal.txt	/*terminal.txt*
 terminfo	term.txt	/*terminfo*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index be68015..54899fc 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt*	For Vim version 8.0.  Last change: 2017 Oct 29
+*terminal.txt*	For Vim version 8.0.  Last change: 2017 Nov 09
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -14,9 +14,25 @@
 If the result is "1" you have it.
 
 
-1. Basic use			|terminal-use|
-2. Remote testing		|terminal-testing|
-3. Debugging			|terminal-debug|
+1. Basic use		|terminal-use|
+      Typing			|terminal-typing|
+      Size and color		|terminal-size-color|
+      Syntax			|:terminal|
+      Resizing			|terminal-resizing|
+      Terminal Modes		|Terminal-mode|
+      Cursor style		|terminal-cursor-style|
+      Special keys		|terminal-special-keys|
+      Unix			|terminal-unix|
+      MS-Windows		|terminal-ms-windows|
+2. Remote testing	|terminal-testing|
+3. Debugging		|terminal-debug|
+      Starting			|termdebug-starting|
+      Example session		|termdebug-example|
+      Stepping through code	|termdebug-stepping|
+      Inspecting variables	|termdebug-variables|
+      Other commands		|termdebug-commands|
+      Communication		|termdebug-communication|
+      Customizing		|termdebug-customizing|
 
 {Vi does not have any of these commands}
 {only available when compiled with the |+terminal| feature}
@@ -92,7 +108,7 @@
 
 
 Size and color ~
-
+							*terminal-size-color*
 See option 'termsize' for controlling the size of the terminal window.
 (TODO: scrolling when the terminal is larger than the window)
 
@@ -201,7 +217,7 @@
 
 
 Resizing ~
-
+							*terminal-resizing*
 The size of the terminal can be in one of three modes:
 
 1. The 'termsize' option is empty: The terminal size follows the window size.
@@ -251,7 +267,7 @@
 
 
 Cursor style ~
-
+							*terminal-cursor-style*
 By default the cursor in the terminal window uses a not blinking block.  The
 normal xterm escape sequences can be used to change the blinking state and the
 shape.  Once focus leaves the terminal window Vim will restore the original
@@ -263,8 +279,21 @@
 blinking will also be inverted.
 
 
-Unix ~
+Special keys ~
+							*terminal-special-keys*
+Since the terminal emulator simulates an xterm, only escape sequences that
+both Vim and xterm recognize will be available in the terminal window.  If you
+want to pass on other escape sequences to the job running in the terminal you
+need to set up forwarding.  Example: >
+	tmap <expr> <Esc>]b SendToTerm("\<Esc>]b")
+ 	func SendToTerm(what)
+ 	  call term_sendkeys('', a:what)
+ 	  return ''
+ 	endfunc
 
+
+Unix ~
+							*terminal-unix*
 On Unix a pty is used to make it possible to run all kinds of commands.  You
 can even run Vim in the terminal!  That's used for debugging, see below.
 
@@ -287,7 +316,7 @@
 
 
 MS-Windows ~
-
+							*terminal-ms-windows*
 On MS-Windows winpty is used to make it possible to run all kind of commands.
 Obviously, they must be commands that run in a terminal, not open their own
 window.
@@ -330,7 +359,7 @@
 
 
 Starting ~
-
+							*termdebug-starting*
 Load the plugin with this command: >
 	packadd termdebug
 <							*:Termdebug*
@@ -360,7 +389,7 @@
 
 
 Example session ~
-
+							*termdebug-example*
 Start in the Vim "src" directory and build Vim: >
 	% make
 Start Vim: >
@@ -416,7 +445,7 @@
 
 
 Stepping through code ~
-
+							*termdebug-stepping*
 Put focus on the gdb window to type commands there.  Some common ones are:
 - CTRL-C    interrupt the program
 - next      execute the current line and stop at the next line
@@ -445,7 +474,7 @@
 
 
 Inspecting variables ~
-
+							*termdebug-variables*
  :Evaluate	    evaluate the expression under the cursor
  K		    same
  :Evaluate {expr}   evaluate {expr}
@@ -455,20 +484,20 @@
 
 
 Other commands ~
-
+							*termdebug-commands*
  :Gdb	       jump to the gdb window
  :Program      jump to the window with the running program
 
 
 Communication ~
-
+						*termdebug-communication*
 There is another, hidden, buffer, which is used for Vim to communicate with
 gdb.  The buffer name is "gdb communication".  Do not delete this buffer, it
 will break the debugger.
 
 
 Customizing ~
-
+							*termdebug-customizing*
 To change the name of the gdb command, set the "termdebugger" variable before
 invoking `:Termdebug`: >
 	let termdebugger = "mygdb"
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index f16eb4d..44d002b 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.0.  Last change: 2017 Nov 05
+*todo.txt*      For Vim version 8.0.  Last change: 2017 Nov 11
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -35,6 +35,10 @@
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
+Permission of viminfo tempfile can be wrong. (Simon Ruderich)
+Always use 600 ?  Also avoids groups problem.
+patch from Simon Ruderich, Nov 8
+
 No maintainer for Vietnamese translations.
 No maintainer for Simplified Chinese translations.
 
@@ -132,8 +136,8 @@
 Include a few color schemes, based on popularity:
 http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search
 http://vimawesome.com/?q=tag:color-scheme
-Use names that indicate their appearnce (Christian Brabandt, 2017 Aug 3)
-- monokai - Xia Crusoe (2017 Aug 4)
+Use names that indicate their apperance (Christian Brabandt, 2017 Aug 3)
+- monokai - Xia Crusoe (2017 Aug 4) 
 - seoul256 - Christian Brabandt (2017 Aug 3)
 - gruvbox -  Christian Brabandt (2017 Aug 3)
 - janah - Marco Hinz (2017 Aug 4)
@@ -141,7 +145,8 @@
 Suggested by Hiroki Kokubun:
 - [Iceberg](https://github.com/cocopon/iceberg.vim) (my one)
 - [hybrid](https://github.com/w0ng/vim-hybrid)
-Include solarized color scheme?
+Include solarized color scheme?, it does not support termguicolors.
+-> Make check for colorscheme that it's sane.
 
 Compiler warnings (geeknik, 2017 Oct 26):
 - signed integer overflow in do_sub() (#2249)
@@ -178,9 +183,6 @@
 When a timer is running and typing CTRL-R on the command line, it is not
 redrawn properly. (xtal8, 2017 Oct 23, #2241)
 
-Patch for manpager plugin. (Lcd, 2017 Oct 12)
-Asked maintainer.
-
 Universal solution to detect if t_RS is working, using cursor position.
 Koichi Iwamoto, #2126
 
@@ -216,15 +218,7 @@
 line breaks. (Ken Takata, 2017 Aug 22)
 
 Patch for 24 bit color support in MS-Windows console, using vcon. (Nobuhiro
-Takasaki, 2017 Oct 1, #2060).  Should not set 'tgc' automatically.
-
-Patch to change GUI behavior: instead of changing the window size change the
-lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
-#703)
-
-Patch to skip globpath() for color schemes, keymaps and compiler settings.
-So that loading menus is faster. (Ken Takata, 2017 Oct 23)
-Update to expand the menus in a CursorHold autocmd. (2017 Oct 25)
+Takasaki, 2017 Oct 1, #2060).  Ready to include now?
 
 Memory leaks in test_channel? (or is it because of fork())
 Memory leak in test_arabic.
@@ -296,6 +290,9 @@
 Python: After "import vim" error messages only show the first line of the
 stack trace. (Yggdroot, 2017 Jul 28, #1887)
 
+Patch to add "module" to quickfix entries. (Marcin Szamotulski, Coot, 2017 Jun
+8, #1757)
+
 When checking if a bufref is valid, also check the buffer number, to catch the
 case of :bwipe followed by :new.
 
@@ -499,8 +496,6 @@
 (Ozaki Kiichi, 2016 Nov 25)
 Does this also fix #1408 ?
 
-Patch to add "module" to quickfix entries. (Coot, 2017 Jun 8, #1757)
-
 'cursorline' and match interfere. (Ozaki Kiichi, 2017 Jun 23, #1792)
 
 Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
@@ -5206,7 +5201,7 @@
 -   Add an option to create a swap file only when making the first change to
     the buffer.  (Liang)  Or only when the buffer is not read-only.
 -   Add option to set "umask" for backup files and swap files (Antwerpen).
-    'backupumask' and 'swapumask'?  Or 'umaskback' and 'umaskswap'?
+    'backupumask' and 'swapumask'?  Or 'umaskbackup' and 'umaskswap'?
 -   When editing a readonly file, don't use a swap file but read parts from the
     original file.  Also do this when the file is huge (>'maxmem').  We do
     need to load the file once to count the number of lines?  Perhaps keep a