在用户目录编辑.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):

最新文章

  1. 格式化 float 类型,保留小数点后1位
  2. K米测评
  3. wpf中ToolTip实现
  4. HDFS-RAID原理和实现
  5. 理解C#中的闭包
  6. Android 5.0新特性了解(二)----RippleEffect
  7. MapReduce原理讲解
  8. jz2440开发板设置备份
  9. HDU 5784 How Many Triangles
  10. zookeeper(1)
  11. int ,long long等范围
  12. 我的web前端整理和学习
  13. Xshell简单介绍
  14. http://jqweui.com/
  15. DevExpressXtraReport—制作雷达图
  16. Intro to Python for Data Science Learning 2 - List
  17. 在虚拟机中安装Ubuntu详细过程
  18. 限制html文本框input只能输入数字和小数点
  19. CentOS7 安装 chrome-gnome-shell
  20. 输出不重复的质因数(C++)

热门文章

  1. C语言进阶——enum, sizeof, typedef 分析11
  2. 14、函数之匿名函数(lambda)
  3. JDK及配置
  4. PHP.15-mysqli
  5. CodeForces 873D Merge Sort 构造 分治
  6. 修改MySQL数据库字符集
  7. Spider_Man_6 の Scrapy_Downloader Middleware(针对一下&#128055;&#128055;&#128055;)
  8. java jdbc与odbc数据库的连接mysql数据库
  9. hnust 好友互动标识
  10. python基础——字典dict