屏幕命令禁用控制键ctrl-a以便在vim中使用它? [英] Screen command disable the control key ctrl-a to use it in vim?

查看:149
本文介绍了屏幕命令禁用控制键ctrl-a以便在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 ?

推荐答案

screen中,您可以通过Ctrl-Aa(cp.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆