diff runtime/macros/less.vim @ 11347:4aae8146c21f

Update runtime files. commit https://github.com/vim/vim/commit/cd5c8f82507822467232ab71e1ebbaae19595916 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 9 20:11:58 2017 +0200 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Sun, 09 Apr 2017 20:15:03 +0200
parents 8896150aba23
children 74e3316c1d5a
line wrap: on
line diff
--- a/runtime/macros/less.vim
+++ b/runtime/macros/less.vim
@@ -1,6 +1,6 @@
 " Vim script to work like "less"
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2015 Nov 15
+" Last Change:	2017 Mar 31
 
 " Avoid loading this file twice, allow the user to define his own script.
 if exists("loaded_less")
@@ -81,6 +81,10 @@ fun! s:Help()
   echo "\n"
   echo "/pattern  Search for pattern        ?pattern  Search backward for pattern"
   echo "n         next pattern match        N         Previous pattern match"
+  if &foldmethod != "manual"
+  echo "\n"
+    echo "zR        open all folds            zm        increase fold level"
+  endif
   echo "\n"
   echo ":n<Enter> Next file                 :p<Enter> Previous file"
   echo "\n"
@@ -96,7 +100,11 @@ map <C-F> <Space>
 map <PageDown> <Space>
 map <kPageDown> <Space>
 map <S-Down> <Space>
-map z <Space>
+" If 'foldmethod' was changed keep the "z" commands, e.g. "zR" to open all
+" folds.
+if &foldmethod == "manual"
+  map z <Space>
+endif
 map <Esc><Space> <Space>
 fun! s:NextPage()
   if line(".") == line("$")