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

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

  1. set nocompatible " requireaps
  2. set encoding=utf-8
  3. filetype on " required
  4. let python_highlight_all=1
  5. filetype plugin on
  6. filetype plugin indent on
  7. syntax on
  8. " set the runtime path to include Vundle and initialize
  9. set rtp+=~/.vim/bundle/Vundle.vim
  10. call vundle#begin()
  11. " alternatively, pass a path where Vundle should install plugins
  12. "call vundle#begin('~/some/path/here')
  13. " let Vundle manage Vundle, required
  14. Plugin 'gmarik/Vundle.vim'
  15. Plugin 'tmhedberg/SimpylFold'
  16. Plugin 'vim-scripts/indentpython.vim'
  17. Plugin 'scrooloose/syntastic'
  18. Plugin 'nvie/vim-flake8'
  19. Plugin 'scrooloose/nerdtree'
  20. Plugin 'kien/ctrlp.vim'
  21. Plugin 'mattn/emmet-vim'
  22. Bundle 'Valloric/YouCompleteMe'
  23. Bundle 'winmanager'
  24. Bundle 'taglist.vim'
  25. Bundle 'ternjs/tern_for_vim'
  26. " Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
  27. " All of your Plugins must be added before the following line
  28. call vundle#end() " required
  29. filetype plugin indent on " required
  30. "split navigations
  31. nnoremap <C-J> <C-W><C-J>
  32. nnoremap <C-K> <C-W><C-K>
  33. nnoremap <C-L> <C-W><C-L>
  34. nnoremap <C-H> <C-W><C-H>
  35. " Enable folding
  36. set foldmethod=syntax
  37. set foldlevel=99
  38. " Enable folding with the spacebar
  39. nnoremap <space> za
  40. let g:SimpylFold_docstring_preview=1
  41. " PEP8
  42. au BufNewFile,BufRead *.py,*.c
  43. \ set tabstop=4 |
  44. \ set softtabstop=4 |
  45. \ set shiftwidth=4 |
  46. \ set textwidth=79 |
  47. \ set expandtab |
  48. \ set autoindent |
  49. \ set fileformat=unix |
  50. " full stack developer
  51. au BufNewFile,BufRead *.js,*.html,*.css
  52. \ set tabstop=2 |
  53. \ set softtabstop=2 |
  54. \ set shiftwidth=2 |
  55. " use youcompleteme
  56. let g:ycm_autoclose_preview_window_after_completion=1
  57. let g:ycm_global_ycm_extra_conf = '/root/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
  58. map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
  59. "python with virtualenv support
  60. py << EOF
  61. import os
  62. import sys
  63. if 'VIRTUAL_ENV' in os.environ:
  64. project_base_dir = os.environ['VIRTUAL_ENV']
  65. activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
  66. execfile(activate_this, dict(__file__=activate_this))
  67. EOF
  68. " set emmet
  69. imap <F2> <C-y>,
  70. imap <F4> <C-x><C-o>
  71. let Tlist_Ctags_Cmd = '/usr/bin/ctags'
  72. let Tlist_Show_One_File=1
  73. let Tlist_Exit_OnlyWindow=1
  74. " set NERDTree
  75. let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
  76. let g:NERDTree_title="[NERDTree]"
  77. let g:winManagerWindowLayout="NERDTree|TagList"
  78. function! NERDTree_Start()
  79. exec 'NERDTree'
  80. endfunction
  81. function! NERDTree_IsValid()
  82. return 1
  83. 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. Dawson City【道森市】

    Dawson City Cities usually have a good reason for being where they are, like a nearby port or river. ...

  2. POJ 3254 状压DP(基础题)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17749   Accepted: 9342 Desc ...

  3. C语言进阶—— 接续符和转义符13

    接续符的意义: C语言中的接续符 (\) 是指示编译器行为的利器 我们来看一个案例: #in\ clud\ e <st\ dio.h> in\ t m\ ain(\ ) { pri\ nt ...

  4. B1005 继续(3n+1)猜想 (25分)

    B1005 继续(3n+1)猜想 (25分) 卡拉兹(Callatz)猜想已经在1001中给出了描述.在这个题目里,情况稍微有些复杂. 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程 ...

  5. springboot搭建环境访问Controller层返回404

    如果启动成功,但是却访问不了你自己写的controller,报404错误,那么原因就是您写的controller没有被spring 容器扫描到 解决方案: spring boot 默认扫描您的类是 在 ...

  6. python基础之模块part1

    模块: 模块本质上就是一个Python程序. 所有说是对象的,一定可以通过  对象.方法  来实现某些操作. 模块种类: 内置模块 第三方模块 自定义模块 import在查找模块的顺序:内置模块--- ...

  7. 5,Linux之文档与目录结构

    Linux文件系统结构 Linux目录结构的组织形式和Windows有很大的不同.首先Linux没有“盘(C盘.D盘.E盘)”的概念.已经建立文件系统的硬盘分区被挂载到某一个目录下,用户通过操作目录来 ...

  8. 2-安装linux7

    1.操作系统简介 操作系统: 桌面操作系统 redhat fedora slackware ubuntu debian suse linux centos 服务器操作系统 linux redhat s ...

  9. CSAcademy Palindromic Concatenation 字符串哈希

    题意: 题目链接 给出\(n\)个字符串,求有多少对\((i,j),i \neq j\)使得\(s_i\)与\(s_j\)拼起来是回文串 分析: 设\(s_i,s_j\)的长度分别为\(L_i, L_ ...

  10. jQuery上传文件控件Uploadify使用

    Uploadify是JQuery的一个上传插件,支持ajax无刷新上传,多个文件同时上传,上传进行进度显示,删除已上传文件等. 首先应下载jQuery和uploadify插件 jQuery下载地址:h ...