使用VundleVim定製vim開發環境
1.建議vim版本在7.3以上,檢視vim版本
下載
vim ~/.vimrc 新增如下內容
按esc 退出到vim命令模式輸入
安裝完成
程式碼事例
點選(此處)摺疊或開啟
- (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
下載
點選(此處)摺疊或開啟
- git clone .git ~/.vim/bundle/Vundle.vim
vim ~/.vimrc 新增如下內容
點選(此處)摺疊或開啟
-
" show row number
-
set nu
-
" " color theme
-
colorscheme desert
-
" " 設定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 <C-n> :NERDTreeToggle<CR>
-
" " ctrlp搜尋外掛
-
Bundle 'ctrlpvim/ctrlp.vim'
-
let g:ctrlp_map = '<c-p>'
-
let g:ctrlp_cmd = 'CtrlP'
-
" " 加強狀態列
-
Plugin 'bling/vim-airline'
-
" "程式碼補全
-
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 <F3> :Autoformat<CR>
-
let g:autoformat_autoindent = 1
-
let g:autoformat_retab = 1
-
let g:autoformat_remove_trailing_spaces = 1
-
" " 自動補全括號,引號
-
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
點選(此處)摺疊或開啟
- :BundleInstall
點選(此處)摺疊或開啟
- " 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!
安裝完成
程式碼事例
點選(此處)摺疊或開啟
-
(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))
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24486203/viewspace-2147782/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用webpack4.x定製自己的前端開發環境Web前端開發環境
- centos配置vim c++開發環境CentOSC++開發環境
- go語言配置VIM開發環境Go開發環境
- vim配置clojure開發環境備忘錄開發環境
- Mac OS X 上的PHP開發環境 vimMacPHP開發環境
- 定製SQL*Plus環境SQL
- WSL設定php開發環境PHP開發環境
- 開發中所使用的開發環境開發環境
- Vim+CMake+MinGW配置C/C++開發環境C++開發環境
- Dockerfile 方式定製 lnmp 環境DockerLNMP
- vim進階 | 使用外掛打造實用vim工作環境
- 用 Docker 製作的 Laravel 開發環境DockerLaravel開發環境
- Docker定製自己的環境映象Docker
- 使用 Docker 搭建本地開發環境!Docker開發環境
- 使用 Docker 搭建 PHP 開發環境DockerPHP開發環境
- 使用webpack搭建react開發環境WebReact開發環境
- 使用vagrant統一開發環境開發環境
- CUDA開發環境高亮顯示設定開發環境
- emacs開發環境配置(4)——rust開發環境Mac開發環境Rust
- PHP開發環境 03 - 使用KFKDock搭建PHP專案環境PHP開發環境
- 設定 Sublime Text 的 Python 開發環境Python開發環境
- Sublime Text 2的Haskell開發環境設定Haskell開發環境
- 在 MacBook Pro 上設定 Java 開發環境MacJava開發環境
- Eclipse+JBoss+MySQL開發環境設定EclipseMySql開發環境
- 使用 PhpStorm + Docker 搭建開發環境PHPORMDocker開發環境
- 使用 Rainbond 搭建本地開發環境AI開發環境
- 使用sublime搭建python開發環境Python開發環境
- linux 環境下嵌入式開發vim 工具編輯跳轉Linux
- linux環境vim升級到vim74Linux
- 試用環境開發環境不發郵件開發環境
- 開發環境配置開發環境
- PHP開發環境PHP開發環境
- 一、開發環境開發環境
- 實現B/S環境的UI定製UI
- PyQt5開發環境配置並使用QT開發環境
- 使用 Docker 作為 Python 開發環境DockerPython開發環境
- 使用 Vagrant 打造跨平臺開發環境開發環境
- Vim 實用技術,第 3 部分: 定製 Vim