kali linux---Xshell无法在vim中复制黏贴

kali linux—xshell无法在vim中复制黏贴

切换自己的home目录
在自己的home目录下新建.vimrc

root@kali:~# cd ~
root@kali:~# pwd
/root
root@kali:~# ls
Desktop  Documents  Downloads  Music  Pictures  Public  python  Templates  Videos
root@kali:~# ls -la
total 108
drwxr-xr-x 18 root root 4096 Jan  5 23:39 .
drwxr-xr-x 23 root root 4096 Nov 20 22:35 ..
-rw-------  1 root root  766 Jan  5 21:28 .bash_history
-rw-r--r--  1 root root 3391 Nov  9 23:41 .bashrc
drwx------ 10 root root 4096 Jan  5 21:44 .cache
drwxr-xr-x 10 root root 4096 Jan  5 08:25 .config
drwxr-xr-x  2 root root 4096 Nov 20 23:06 Desktop
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Documents
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Downloads
drwx------  2 root root 4096 Nov 20 22:45 .gconf
drwx------  3 root root 4096 Nov 20 22:45 .gnupg
-rw-------  1 root root 1530 Jan  5 21:31 .ICEauthority
drwx------  3 root root 4096 Nov 20 22:45 .local
drwx------  4 root root 4096 Jan  5 21:44 .mozilla
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Music
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Pictures
-rw-r--r--  1 root root  148 Oct 30 20:46 .profile
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Public
drwxr-xr-x 21 root root 4096 Jan  5 21:27 python
-rw-------  1 root root 1024 Nov  9 23:50 .rnd
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Templates
drwxr-xr-x  2 root root 4096 Nov 20 22:45 Videos
drwxr-xr-x  3 root root 4096 Jan  5 23:08 .vim
-rw-------  1 root root 9634 Jan  5 23:39 .viminfo
-rw-r--r--  1 root root 2576 Jan  5 23:38 .vimrc
root@kali:~# 
我使用的是vundle插件管理器,首先要下载vundle

在自己的home目录下执行以下命令:

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

root@kali:~# git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
Cloning into '/root/.vim/bundle/vundle'...
remote: Counting objects: 3132, done.
remote: Total 3132 (delta 0), reused 0 (delta 0), pack-reused 3132
Receiving objects: 100% (3132/3132), 932.57 KiB | 10.00 KiB/s, done.
Resolving deltas: 100% (1103/1103), done.
root@kali:~# 


root@kali:~/.vim/bundle# ls
vundle
root@kali:~/.vim/bundle# cd vundle/
root@kali:~/.vim/bundle/vundle# ls
autoload      CONTRIBUTING.md  ftplugin         README_KR.md  README_ZH_CN.md  syntax
changelog.md  doc              LICENSE-MIT.txt  README.md     README_ZH_TW.md  test
root@kali:~/.vim/bundle/vundle# cd autoload/
root@kali:~/.vim/bundle/vundle/autoload# ls
vundle  vundle.vim 
root@kali:~/.vim/bundle/vundle/autoload# pwd
/root/.vim/bundle/vundle/autoload
root@kali:~/.vim/bundle/vundle/autoload# ls
vundle  vundle.vim
root@kali:~/.vim/bundle/vundle/autoload# 

然后在自己的home目录下创建.vimrc文件,并把以下内容复制进去:
root@kali:~# cat .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
root@kali:~# 

然后就可以Xshell在vim中任意复制与黏贴
参考:http://www.cnblogs.com/king-ding/p/kalilinux2.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

徐为波

看着给就好了,学习写作有点累!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值