Map Alt Combinations in Vim Rxvt

vim mingw rxvt alt meta
[size=large]
[b]1. gVim won't have this issue, because gVim always handles 'Alt' byitself.[/b][/size]
[size=large]
[b]2. Check vim help, a lot of useful information:[/b][/size]
:h :map-alt-keys

[size=large][b]3. Basically if Alt combination do not work in your vim, it is because the 'meta8' -- the 8th bit of the input character code. [/b][/size]
By default vim need it to identify whether you have pressed 'Alt'. But in some terminal or by your settings, rxvt, console or terminal don't set the meta8 when you press 'Alt', instead, they use a Escape sequence. i.e. 'Alt-a' will be translated to '^[a'.

[size=large][b]4. Set up rxvt environment to use the 'meta8' apply one of the following:[/b][/size]
[*]a. start rxvt with '--meta8' option
[*]b. add a line 'Rxvt.meta8:True' in your .Xdefaults
[*]c. add following lines to your .inputrc: (*** not recommend ***)
 set meta-flag on
set input-meta on
set output-meta on
set convert-meta on

[*]d. use map Escape sequence to use Alt combination, see "Get Alt key to work in terminal" and 'How to Map Alt Key' in reference section

[b]***[/b] changing the behavior of your bash environment may affect or bring conflict to other programs in the environment

[size=large][b]5. Notes:[/b][/size]
[url=http://tech.groups.yahoo.com/group/vim/message/87494]Watch out your 'encoding' options[/url]

[size=large][b]Reference:[/b][/size]
[url=https://bbs.archlinux.org/viewtopic.php?id=115374]Using alt key in console vim[/url]
[url=http://vim.1045645.n5.nabble.com/How-to-Map-Alt-Key-td3324666.html]How to Map Alt Key[/url]
[url=http://vim.wikia.com/wiki/Get_Alt_key_to_work_in_terminal]Get Alt key to work in terminal[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值