如何将非ASCII字符粘贴到vim中?
问题描述:
我的终端模拟器配置为Unicode字符编码,我的.vimrc包含行
My terminal emulator is configured for Unicode character encoding and my .vimrc contains the line
set encoding=utf-8
但是当我尝试把café一词粘贴到vim中时,它显示为café。
but when I try pasting the word "café" into vim, it comes out as "café".
我可以通过键入Ctrl-vu,然后输入4个字符的代码点(00e9)在vim中创建一个é,但我想要将其粘贴in。
I can make an "é" in vim by typing Ctrl-vu followed by the 4-character code point (00e9) but I'd like the ability to paste it in.
答
解决方法是取消选中Terminal.app的高级选项卡中的Escape non-ASCII input设置。
The solution was to uncheck the "Escape non-ASCII input" checkbox in the Advanced tab of the Terminal.app settings.