简体   繁体   English

为什么当我按下输入我的vim(gvim)在正常模式下显示^ M?

[英]why when i press enter my vim(gvim) show ^M in normal mode?

there is a strange Phenomenon of my vim(gvim). 我的vim(gvim)有一个奇怪的现象。
just as i said in title, when i press enter, it'll show ^M at lower right. 就像我在标题中说的那样,当我按下回车键时,它会在右下方显示^ M. and disappear after about 1sec, then it'll act as it should be. 并在大约1秒后消失,然后它将按照应有的方式行动。 as if it's the first charactor of some "multi-charactor" command. 好像它是某个“多字符”命令的第一个字符。

here are some lines in my vimrc. 这是我的vimrc中的一些行。
au FileType * nnoremap <buffer> <CR> <C-]>
let mapleader = "\\<space>"
set encoding=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set fileencodings=utf-8,ucs-bom,chinese
set ffs=unix,dos,mac

can someone tell me how to fix it? 有谁能告诉我如何解决它?

thanks for Pinpin. 感谢Pinpin。 but my problem occurs in normal mode. 但我的问题发生在正常模式。

thanks for any help :) 谢谢你的帮助 :)

For internal reasons , <CM> is the same as <CR> (or <Enter> ). 由于内部原因<CM><CR> (或<Enter> )相同。 The reason that Vim briefly displays the key in the bottom right corner is that it is waiting for further keys (and you have :set showcmd ), because you have a mapping that begins with Enter . Vim在右下角短暂显示密钥的原因是它正在等待更多密钥(并且你有:set showcmd ),因为你有一个以Enter开头的映射

:nmap <CR>

(or :nmap <Cm> ) will list it. (或:nmap <Cm> )将列出它。 To avoid the delay, you need to get rid of it / choose another key for it. 为了避免延迟,你需要摆脱它/为它选择另一个键。

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

相关问题 Vim:为什么不“:正常! 我“进入插入模式? - Vim: why doesn't “:normal! i” enter insert mode? vim:打字时打开的标签栏窗口<Enter>在正常模式 - vim: Tagbar windows opened when typing <Enter> in normal mode Vim UltiSnips插件重新映射 <CR> (Enter键)处于插入模式,即使我不在摘要中 - Vim UltiSnips plugin remaps <CR> (Enter key) in insert mode even when I'm not in a snippet 为什么gvim和普通终端之间的vim配色方案会有所不同? - Why vim color schemes differs between gvim and a normal terminal? 如果我处于插入模式或正常模式,如何在vim中更改光标样式? - How can I change the cursor style in vim depending if I'm in insert mode or normal mode? 在正常模式下按“ o”或“ O”时自动插入注释 - Auto insert comments when I press “o” or “O" in normal mode 在 VIM 正常模式状态行中显示按下的键 - Show pressed keys in VIM normal mode statusline 使用vim / gvim的matlab单元模式 - matlab cell mode with vim/gvim 在VIm / gvim的正常模式下使用宏内容时的操作差异(删除特定列) - Difference in operation while using Macrocontent in Normal Mode in VIm/gvim (Delete a Specific Column) 有时在使用Surround.vim时,我被要求按Enter继续。 有没有办法绕过这个? - Sometimes when using Surround.vim I am asked to press ENTER to continue. Is there a way to bypass this?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM