如何解决debian的vim无法使用鼠标右键复制粘贴问题

1、查看是否有文件/etc/vim/vimrc.local,如果有请先备份。

2、打开文件/etc/vim/vimrc.local,比如如下命令行使用debian自带的nano打开该文件

nano /etc/vim/vimrc.local

3、将以下内容全部复制,并替换掉原来文件内的内容(如果有内容的话)

" This file loads the default vim options at the beginning and prevents
" that they are being loaded again later. All other options that will be set,
" are added, or overwrite the default settings. Add as many options as you
" whish at the end of this file.

" Load the defaults
source $VIMRUNTIME/defaults.vim

" Prevent the defaults from being loaded again later, if the user doesn't
" have a local vimrc (~/.vimrc)
let skip_defaults_vim = 1


" Set more options (overwrites settings from /usr/share/vim/[vim-version, example vim82, vim80, etc]/defaults.vim)
" Add as many options as you whish

" Set the mouse mode to 'r'
if has('mouse')
  set mouse=r
endif

4、保存

本页永久链接:https://www.orztip.com/?p=645&article_title=enable-debian-vim-mouse-right-click-menu-copy-paste