屏幕命令禁用控制键ctrl-a以便在vim中使用它? [英] Screen command disable the control key ctrl-a to use it in vim?
问题描述
有时我会使用screen linux命令打开vim,但是由于ctrl-a被视为控制键,因此我无法在编辑器中使用相同的组合来增加数字.
I sometimes open vim with screen linux command but since ctrl-a is considered as control key I cannot increment numbers using the same combination inside the editor.
我不想完整地重新映射ctrl-a,但是有一种方法可以禁用它,以便我可以在vim中使用它?
I don't want to remap entirly ctrl-a but is there a way to disable it so I can use it in vim ?
推荐答案
In screen
, you can pass on the prefix key via Ctrl-A
followed by a
(cp. here). In tmux
, this would be Ctrl-b
Ctrl-b
. Either can be adapted in the tool's configuration file.
或者,您可以在Vim内部重新映射增量,例如通过将以下内容放入您的~/.vimrc
:
Alternatively, you could remap the increment inside Vim, e.g. by putting the following into your ~/.vimrc
:
noremap <C-q> <C-a>
这篇关于屏幕命令禁用控制键ctrl-a以便在vim中使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!