vim insert VISUAL模式無法右鍵復制問題(轉)


轉自:https://blog.csdn.net/coder_oyang/article/details/89096219

 

 

vim中使用鼠標右鍵粘貼,失敗。vim的模式:

 

 

網上解法:

1. 普通模式下輸入“:set mouse-=a”,有效

2. .vimrc中添加:

if has('mouse')
set mouse-=a
endif
失效

查資料發現:vi的三種模式,命令模式,插入模式,可視模式。鼠標可以啟動於各種模式中:

The mouse can be enabled for different modes:
n Normal mode
v Visual mode
i Insert mode
c Command-line mode
h all previous modes when editing a help file
a all previous modes
r for |hit-enter| and |more-prompt| prompt
Normally you would enable the mouse in all four modes with:
:set mouse=a
When the mouse is not enabled, the GUI will still use the mouse for
modeless selection. This doesn't move the text cursor.
所以配置文件中,set moues=a啟動了所有模式,屏蔽了鼠標右鍵功能

但,我的 .vimrc文件並沒這配置,最終發現:

無需修改任何配置,鼠標選中,按y鍵 -- 復制, 然后按 鼠標中鍵 粘貼,支持跨文件復制粘貼
————————————————
版權聲明:本文為CSDN博主「coder_oyang」的原創文章,遵循CC 4.0 by-sa版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/coder_oyang/article/details/89096219


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM