为什么要 <C-PageUp>和 <C-PageDown>不在vim中工作? [英] Why do <C-PageUp> and <C-PageDown> not work in vim?

查看:18
本文介绍了为什么要 <C-PageUp>和 <C-PageDown>不在vim中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 上安装了 Vim 7.2.在 GVim 中,<C-PageUp><C-PageDown> 默认用于标签之间的导航.但是,它不适用于 Vim.

I have Vim 7.2 installed on Windows. In GVim, the <C-PageUp> and <C-PageDown> work for navigation between tabs by default. However, it doesn't work for Vim.

我什至在 _vimrc 中添加了以下行,但它仍然不起作用.

I have even added the below lines in _vimrc, but it still does not work.

map <C-PageUp> :tabp<CR>
map <C-PageDown> :tabn<CR>

但是,地图和作品.

map <C-left> :tabp<CR>
map <C-right> :tabn<CR>

有人知道为什么吗?

推荐答案

你描述的问题一般是由于vim的终端设置不知道给定键的正确字符序列(在控制台上,所有击键都变成一个序列个字符).这也可能是由于您的控制台没有为您尝试按下的键发送不同的字符序列.

The problem you describe is generally caused by vim's terminal settings not knowing the correct character sequence for a given key (on a console, all keystrokes are turned into a sequence of characters). It can also be caused by your console not sending a distinct character sequence for the key you're trying to press.

如果是前一个问题,做这样的事情可以解决它:

If it's the former problem, doing something like this can work around it:

:map <CTRL-V><CTRL-PAGEUP> :tabp<CR>

其中 <CTRL-V><CTRL-PAGEUP> 字面上是那些键,而不是小于,C,T,R,...等等".

Where <CTRL-V> and <CTRL-PAGEUP> are literally those keys, not "less than, C, T, R, ... etc.".

如果是后一个问题,那么您需要调整终端程序的设置或获取不同的终端程序.(我不确定 Windows 上实际存在哪些选项.)

If it's the latter problem then you need to either adjust the settings of your terminal program or get a different terminal program. (I'm not sure which of these options actually exist on Windows.)

这篇关于为什么要 &lt;C-PageUp&gt;和 &lt;C-PageDown&gt;不在vim中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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