Christian wrote:
> On Do, 30 Mär 2017, Bram Moolenaar wrote:
>
> > Pity "z" is a command in less, thus we can't use "zR". I doubt it's
> > used much. Would it be too weird to skip the map for "z" if there are
> > folds in the file?
>
> I wouldn't worry at all and simply use the Vim z maps.
How about this: if 'foldmethod' is "manual" then there should not be any
folds, thus we can keep the map for "z". Otherwise the map for "z" gets
in the way of zR and friends.
--- ../git/vim80/runtime/macros/less.vim 2015-11-19 20:37:20.529665888
+0100
+++ runtime/macros/less.vim 2017-03-31 20:47:07.474192656 +0200
@@ -81,6 +81,10 @@
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 <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("$")
--
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
- Einstein
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.