使用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++開發環境
- Mac OS X 上的PHP開發環境 vimMacPHP開發環境
- Vim+CMake+MinGW配置C/C++開發環境C++開發環境
- WSL設定php開發環境PHP開發環境
- Dockerfile 方式定製 lnmp 環境DockerLNMP
- Win11開發環境設定開發環境
- Docker定製自己的環境映象Docker
- 用 Docker 製作的 Laravel 開發環境DockerLaravel開發環境
- linux 環境下嵌入式開發vim 工具編輯跳轉Linux
- 使用webpack搭建react開發環境WebReact開發環境
- 使用 Rainbond 搭建本地開發環境AI開發環境
- 使用 Docker 搭建本地開發環境!Docker開發環境
- 使用 PhpStorm + Docker 搭建開發環境PHPORMDocker開發環境
- PHP開發環境 03 - 使用KFKDock搭建PHP專案環境PHP開發環境
- emacs開發環境配置(4)——rust開發環境Mac開發環境Rust
- 配置開發環境、生成環境、測試環境開發環境
- 使用Docker桌面開發環境功能開發SpringBoot - itnextDocker開發環境Spring Boot
- 一、開發環境開發環境
- 開發環境配置開發環境
- PHP開發環境PHP開發環境
- 使用ansible搭建python多版本開發環境Python開發環境
- 使用IntelliJ IDEA 搭建 spring mvc開發環境IntelliJIdeaSpringMVC開發環境
- 使用multipass在mac搭建linux開發環境MacLinux開發環境
- Windows下使用laradock作為開發環境Windows開發環境
- Flutter開發入門之開發環境搭建(VSCode搭建Flutter開發環境)Flutter開發環境VSCode
- 專案開發中,如何使用eolinker進行環境管理:開發、測試和生產環境
- python下多環境開發(虛擬環境)Python
- ubuntu環境下搭建以太坊開發環境Ubuntu開發環境
- Linux 開發環境 -- C/C++開發環境編譯安裝Linux開發環境C++編譯
- 用 Spring 區分開發環境、測試環境、生產環境Spring開發環境
- win 環境使用easyswoole利用docker進行開發Docker
- 【Hadoop】:Windows下使用IDEA搭建Hadoop開發環境HadoopWindowsIdea開發環境
- Linux開發環境搭建——deepin系統的使用Linux開發環境
- js開發環境配置JS開發環境
- 1 – 搭建開發環境開發環境
- Androdi開發環境搭建開發環境
- react 配置開發環境React開發環境
- Linux 環境 + 本地開發Linux