简体   繁体   English

Vma在Emacs

[英]Vim in Emacs

The question does not refer to some Vim-mode in Emacs, but to Vim inside Emacs. 问题不是指Emacs中的某些Vim模式,而是指Emacs中的Vim。 I am not waging any Editor-war. 我不是在进行任何编辑战争。 I just want to use Vim in Emacs. 我只想在Emacs中使用Vim。

http://dl.getdropbox.com/u/175588/emacs.png http://dl.getdropbox.com/u/175588/emacs.png

You can get to Vim in Emacs with commands "Mx term" and "vim". 您可以使用命令“Mx term”和“vim”访问Emacs中的Vim。

When I am using the Vim-Emacs, the typing is awkward. 当我使用Vim-Emacs时,打字很尴尬。 There are odd signs, such as "4m", "4mm" and "^?^?". 有奇怪的迹象,例如“4m”,“4mm”和“^?^?”。 The backspace and the x-button in insert mode do not work. 插入模式下的退格键和x按钮不起作用。 The odd signs emerge when I press the latter keys. 当我按下后面的键时会出现奇怪的迹象。 So 所以

How can I get Vim properly working in Emacs? 如何让Vim在Emacs中正常工作?

[Updated Information] [更新信息]

The malfunctioning Vim-Emacs is at least in the following OSs: 发生故障的Vim-Emacs至少在以下操作系统中:

  • Mac OS 10.5.6 Mac OS 10.5.6

What you're seeing is that the terminal setting $TERM in your shell/Vim session doesn't match what the EMACS terminal is doing. 您所看到的是,您的shell / Vim会话中的终端设置$ TERM与EMACS终端正在进行的操作不匹配。 Mine works fine, with the exception that the delete key is mapped to DEL, 0x127, while Vim wants ^H, 0x8. 我的工作正常,但删除键映射到DEL,0x127,而Vim想要^ H,0x8。 Mine shows the $TERM setting to be "eterm-color". Mine将$ TERM设置显示为“eterm-color”。

Check what you have as $TERM 检查你有什么$ TERM

$ echo $TERM $ echo $ TERM

and check the Vim docs for how to fix the backspace issue. 并检查Vim文档以了解如何解决退格问题。

For backspace, 对于退格,

stty crt erase <CTRL-V><BACKSPACE>

Worked for me. 为我工作。

As for the rest, I don't know. 至于其余的,我不知道。 Suppose it is something the shell outputs that the terminal doesn't handle. 假设它是终端无法处理的shell输出。 (Never used emacs 'term' before... prefer iTerm or Terminal.app for shell-related stuff. emacs 'term' has been called an "imperfect terminal emulator") (从未使用过emacs'term'之前...更喜欢iTerm或Terminal.app用于shell相关的东西.emacs''term'被称为“不完美的终端模拟器”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM