kali中Xshell在vim中无法复制黏贴【已解决】

Vundle是基于Git仓库的插件管理软件。Vundle将插件的安装简化为类似yum软件安装的过程,只要:BundleInstall插件就安装完了。
在自己的home目录下执行以下命令:

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle 

在自己的home目录下创建.vimrc文件,并把以下内容复制进去:

set nocompatible              " requireaps
set encoding=utf-8
filetype off                  " 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/autoload/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

然后就可以Xshell在vim中任意复制与粘贴了。

打开vim输入:PluginInstall。
:PluginInstall命令会安装在.vimrc文件中列出来的所有插件。
:PluginInstall 安装指定的插件。
从命令行安装vim +PluginInstall +qall。
如果使用 fish shell 需要在.vimrc添加set shell=/bin/bash。

打开vim输入:PluginClean
从命令行安装vim +:PluginClean。

打开vim输入:PluginSearch
从命令行安装vim +:PluginSearch 。

随机文章