[英]How to bind to multiple keymaps with one line?
I'm trying to remap/bind G
in tig to match vim's functionality (move to last line) in all of tig's keymaps. 我试图重新映射/绑定
G
在TIG配合VIM的功能在所有TIG的键盘映射表(移动到最后一行)。
I read the tigrc manpage, here's all that's mentioned about binding to keymaps 我阅读了tigrc手册页,这里有关于绑定到keymaps的所有内容
Keymaps
Valid keymaps are: main, diff, log, help, pager, status, stage,
tree, blob, blame, refs, stash, grep and generic. Use generic to
set key mapping in all keymaps. Use search to define keys for
navigating search results during search.
here's what currently works, but not optimal or preferable: 这是目前的工作,但不是最佳或更好的:
bind main G move-last-line
bind help G move-last-line
bind grep G move-last-line
here's what I expected would work: bind generic G move-last-line
or bind main,help,grep G move-last-line
这是我期望的工作:
bind generic G move-last-line
或bind main,help,grep G move-last-line
PS: I feel questions of this type are more appropriate for unix stack exchange, but there's no tag for tig there yet , and there are similar questions to it on SO. PS:我觉得这种类型的问题更适合unix堆栈交换,但是还没有tig的标签 ,并且在SO上也存在类似的问题。
As you mentioned, bind generic G move-last-line
is enough. 正如你所提到的,
bind generic G move-last-line
就足够了。 It works for me. 这个对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.