在用户目录编辑.vimrc文件不存在则创建,vi的三种模式:命令模式,插入模式,可视模式,鼠标可以启动于各种模式中,所以配置文件中的set mouse=a启动了所有模式,这样就屏蔽了鼠标右健功能,set mouse=c模式开启复制黏贴。

kali中简单方法将下面配置完全复制并覆盖原来的.vimrc文件,建议先备份:

set nocompatible              " requireaps
set encoding=utf-8
filetype on " required
let python_highlight_all=1
filetype plugin on
filetype plugin indent on
syntax on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'mattn/emmet-vim'
Bundle 'Valloric/YouCompleteMe'
Bundle 'winmanager'
Bundle 'taglist.vim'
Bundle 'ternjs/tern_for_vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding
set foldmethod=syntax
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
let g:SimpylFold_docstring_preview=1
" PEP8
au BufNewFile,BufRead *.py,*.c
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix |
" full stack developer
au BufNewFile,BufRead *.js,*.html,*.css
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2 |
" use youcompleteme
let g:ycm_autoclose_preview_window_after_completion=1
let g:ycm_global_ycm_extra_conf = '/root/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
"python with virtualenv support
py << EOF
import os
import sys
if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
EOF
" set emmet
imap <F2> <C-y>,
imap <F4> <C-x><C-o>
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
" set NERDTree
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
let g:NERDTree_title="[NERDTree]"
let g:winManagerWindowLayout="NERDTree|TagList"
function! NERDTree_Start()
exec 'NERDTree'
endfunction
function! NERDTree_IsValid()
return 1
endfunction

参考:

  http://www.cnblogs.com/king-ding/p/kalilinux2.html

  http://blog.csdn.net/abcddtt/article/details/20386203

注意:

  直接复制代码到linux内可能会报错,因为编码不对使用notepad++右下角编码方式修改为Unix(LF):

ssh xshell 连接在vim中无法用 ctrl+insert 复制黏贴的更多相关文章

  1. (转)xshell无法在vim中复制黏贴

    ssh xshell 连接在vim中无法用 ctrl+insert 复制黏贴 修改.vimrc set mouse=c vi的三种模式:命令模式,插入模式,可视模式.鼠标可以启动于各种模式中: The ...

  2. ContOS网络连接及简单的ssh Xshell连接!

    这边简单的记录一下下ContOS网络连接及简单的ssh Xshell连接! 首先你得安装一个Contos Linux系统对吧! 1.找到设置--->网络-->有线连接-->IPv4 ...

  3. xshell连接本地虚拟机中的centos

    1. 一开始Xshell连接不上(设置为DHCP 动态IP)虚拟机上的centos8 参考这篇博文,将centos上的DHCP改为static 静态IP xshell连接本地虚拟机中的centos 2 ...

  4. Vim中如何全选并复制?

    全部删除:按esc后,然后dG全部复制:按esc后,然后ggyG 全选高亮显示:按esc后,然后ggvG(这个好像有点问题)或者ggVG正确 vim如何与剪贴板交互(将vim的内容复制出来) 习惯了在 ...

  5. Xshell 远程使用vim打开文件不能使用右键复制粘贴(右键显示可视)的问题

    Xshell 远程使用vim打开文件不能使用右键复制粘贴(右键显示可视)的问题 Debian9.4系统不能再VIM打开文件界面不能使用右键复制粘贴 root@debian:~# vim /usr/sh ...

  6. Linux使用技巧(一):vim中选中多行、复制和粘贴

    一.选中多行: 使用命令vim打开文件,移动光标至所选行的开头,按v进入视图,键盘上按向下键,选中所需行即可. 二.复制与粘贴 三种方法: 1)在上文第一部分的基础上,按y,然后移动光标至所需粘贴处, ...

  7. 如何通过SSH工具(SecureCRT、XShell)连接Vmware虚拟机中的Linux(CentOS7)

    本文主要解决的问题:如何通过SSH工具连接到VMWare中改的Linux系统(CentOS7) 核心内容:Linux中需要安装openssh-server,并且启动了openssh-server服务. ...

  8. 使用xshell连接本地虚拟机中的Linux问题

    xshell 连接虚拟机中Linux报错: Could not connect to '192.168.8.120' (port 22):Connection failed. 原因:虚拟机中Linux ...

  9. 用xshell连接VMware虚拟机中安装的Centos7系统

    首先要保证你安装的Centos7系统的网路适配器使用的桥接模式,这个模式允许你安装再虚拟机中的Centos系统有一个自己的ip地址. 然后再虚拟机中登录你的Centos系统,用ip addr命令查看你 ...

随机推荐

  1. ZOJ3553 概率DP

    Bloodsucker In 0th day, there are n-1 people and 1 bloodsucker. Every day, two and only two of them ...

  2. VIM 如何切换buffer

    命令 :ls 可查看当前已打开的buffer 命令 :b num 可切换buffer (num为buffer list中的编号) 其它命令: :bn -- buffer列表中下一个 buffer :b ...

  3. PHP.23-ThinkPHP框架的三种模型实例化-(D()方法与M()方法的区别)

    三种模型实例化 原则上:每个数据表应对应一个模型类(Home/Model/GoodsModel.class.php --> 表tp_goods) 1.直接实例化 和实例化其他类库一样实例化模型类 ...

  4. 集合源码分析之 HashSet

    一 知识准备 HashSet 是Set接口的实现类,Set存在的最大意义区别于List就是,Set中存放的元素不能够重复,就是不能够有两个相同的元素存放在Set中,那么怎样的两个元素才算是相同的,这里 ...

  5. 1- js vue.js

    1 js 2  Vue.js

  6. luogu2221 [HAOI2012]高速公路

    和sdoi的相关分析很像qwq,推柿子然后线段树搞搞 #include <iostream> #include <cstdio> using namespace std; ty ...

  7. win7重装后恢复grub和ubuntu14

    没有光盘和优盘启动盘,可以在win7下安装easybcd,添加一个启动选项为linux grub2,启动后进入ubutnu,执行如下: sudo -i   //取得root权限 fdisk -l    ...

  8. USACO Section1.3 Barn Repair 解题报告

    barn1解题报告 —— icedream61 博客园(转载请注明出处)---------------------------------------------------------------- ...

  9. ansible自动部署Keepalived实现Nginx服务双机热备

    脚本实现通过ansible-playbook自动化安装Keepalived和配置,主要解决问题如下: Keepalived自动化安装: keepalived_vrid配置,自动根据vip获取最后一段作 ...

  10. python pip install XXX出现报错问题

    重装Anacondas后,将pip 和python.exe路径加入到环境变量后直接在cmd窗口进行pip 操作,报错如下 报错内容为: pip is configured with locations ...