Hi,
There are many hyper text viewers that can jump to a link with Enter key.
E.g.: GNU info, lynx, w3m and many Web browser, etc.
However, the Vim help cannot jump with Enter key.
The following patch enables tag jump with Enter key on Vim help:
--- a/runtime/ftplugin/help.vim
+++ b/runtime/ftplugin/help.vim
@@ -12,11 +12,18 @@ let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = "setl fo< tw< cole< cocu< keywordprg<"
+ \ . "| silent! nunmap <buffer> <Enter>"
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help
if has("conceal")
setlocal cole=2 cocu=nc
endif
+if !exists("no_plugin_maps") && !exists("no_help_maps")
+ if &buftype ==# 'help'
+ nnoremap <silent><buffer> <Enter> <C-]>
+ endif
+endif
+
let &cpo = s:cpo_save
unlet s:cpo_save
I think this is mostly useful for newbies, but this might deprive them of a
chance of knowing Ctrl-].
What do you think, is this useful or doing too much and just meddling?
Regards,
Ken Takata
--
--
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.