GVIM的Ctrl+V粘贴/Visual块模式冲突

来自http://tunps.com/gvim-ctrl-v-confliction

在Windows平台的GVIM中,Ctrl+V是无法实现进入Visual块模式的,因为Ctrl+V也有粘贴的作用。Vim的帮助里面已经有解释:

						*CTRL-V* *blockwise-visual*
CTRL-V			start Visual mode blockwise.  Note: Under Windows
			CTRL-V could be mapped to paste text, it doesn't work
			to start Visual mode then, see |CTRL-V-alternative|.

然后转到CTRL-V-alternative

						*CTRL-V-alternative* *CTRL-Q*
Since CTRL-V is used to paste, you can't use it to start a blockwise Visual
selection.  You can use CTRL-Q instead.  You can also use CTRL-Q in Insert
mode and Command-line mode to get the old meaning of CTRL-V.  But CTRL-Q
doesn't work for terminals when it's used for control flow.

如果非要使用Ctrl+V,可以将的map删除掉:

修改 vim/vim73/mswin.vim, 修改如下:

" CTRL-V and SHIFT-Insert are Paste
map "+gP

改成(把 map 刪掉就對了).

" CTRL-V and SHIFT-Insert are Paste
"map "+gP

就可以用 Ctrl + v 了.(来源)

 

About tunpishuang

just 4 fun·····
This entry was posted in 未分类 and tagged . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>