本篇內(nèi)容介紹了“怎么用VundleVim定制vim開發(fā)環(huán)境”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
目前成都創(chuàng)新互聯(lián)已為上1000家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)站空間、成都網(wǎng)站托管、企業(yè)網(wǎng)站設(shè)計(jì)、黃龍網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
1.建議vim版本在7.3以上,查看vim版本
點(diǎn)擊(此處)折疊或打開
(py3env) [root@MySQLtest-213-2 pytonstudy]# vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 21 2016 17:10:41)
Included patches: 1-207, 209-629
Modified by
Compiled by
下載
點(diǎn)擊(此處)折疊或打開
https://github.com/VundleVim/Vundle.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim ~/.vimrc 添加如下內(nèi)容
點(diǎn)擊(此處)折疊或打開
" show row number
set nu
" " color theme
colorscheme desert
" " 設(shè)置encoding,防止亂碼
set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1
" """"""""""""""""""""""""""""""
" " Vundle Setting "
" """"""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype on " required
" " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" "
" " 插件管理核心庫
Bundle 'gmarik/vundle'
" " 文件管理器
Plugin 'scrooloose/nerdtree'
map
" " ctrlp搜索插件
Bundle 'ctrlpvim/ctrlp.vim'
let g:ctrlp_map = '
let g:ctrlp_cmd = 'CtrlP'
" " 加強(qiáng)狀態(tài)欄
Plugin 'bling/vim-airline'
" "代碼補(bǔ)全
Bundle 'Shougo/neocomplcache'
let g:neocomplcache_enable_at_startup = 1
" " Use smartcase.
let g:neocomplcache_enable_smart_case = 1
" " Set minimum syntax keyword length.
let g:neocomplcache_min_syntax_length = 3
let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
set completeopt-=preview
" " EasyGrep
Plugin 'dkprice/vim-easygrep'
" " 自動格式化
Plugin 'Chiel92/vim-autoformat'
noremap
let g:autoformat_autoindent = 1
let g:autoformat_retab = 1
let g:autoformat_remove_trailing_spaces = 1
" " 自動補(bǔ)全括號,引號
Plugin 'Raimondi/delimitMate'
let g:delimitMate_expand_space = 1
let g:delimitMate_expand_cr = 2
let g:delimitMate_expand_space = 1
call vundle#end() " required
filetype plugin indent on " required
" " size of a hard tabstop
set tabstop=4
" " size of an "indent"
set shiftwidth=4
按esc 退出到vim命令模式輸入
點(diǎn)擊(此處)折疊或打開
:BundleInstall
點(diǎn)擊(此處)折疊或打開
" Installing plugins to /root/.vim/bundle | 1
. Plugin 'VundleVim/Vundle.vim' |~
. Plugin 'gmarik/vundle' |~
. Plugin 'scrooloose/nerdtree' |~
. Plugin 'ctrlpvim/ctrlp.vim' |~
. Plugin 'bling/vim-airline' |~
. Plugin 'Shougo/neocomplcache' |~
. Plugin 'dkprice/vim-easygrep' |~
. Plugin 'Chiel92/vim-autoformat' |~
. Plugin 'Raimondi/delimitMate' |~
* Helptags |~
|~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
~ |~
Preview [Vundle] Installer vun… 100% ? 12/12 ㏑ : 1 [No Name] 100% ? 0/1 ㏑ : 1
Done!
安裝完成
代碼事例
點(diǎn)擊(此處)折疊或打開
(py3env) [root@mysqltest-213-2 pytonstudy]# vim test_su.py
1 a = 1
2 a2 = 3
3 a += a2
4 print("a2=%d"%(a2))
5 print("a=%d"%(a))
“怎么用VundleVim定制vim開發(fā)環(huán)境”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!