linux vi粘贴 mouse,解决xshell无法在vim中复制粘贴

ssh xshell 连接在vim中无法用 ctrl+insert 复制黏贴

修改.vimrc

set mouse=c

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 mouse=a启动了所有模式,这样就屏蔽了鼠标右健功能.

vimrc的存放位置:

系统 vimrc 文件: “$VIM/vimrc”

用户 vimrc 文件: “$HOME/.vimrc”

用户 exrc 文件: “$HOME/.exrc”

系统 gvimrc 文件: “$VIM/gvimrc”

用户 gvimrc 文件: “$HOME/.gvimrc”

系统菜单文件: “$VIMRUNTIME/menu.vim”

$VIM 预设值: “/usr/share/vim”

因为/etc/vimrc和~/.vimrc都要被读取,只是~/.vimrc的优先级高。如果~/下没有.vimrc 直接新建一个就好。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值