ssh xshell 连接在vim中无法用 ctrl+insert 复制黏贴
在用户目录编辑.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):