說明:這是打造適合本身的vim編輯器的進階方法,關於vim基礎知識,請自行百度。也可參考文章末尾推薦blog網址
若是以爲本身打造vim編輯器麻煩,能夠從github上面克隆一個,推薦:vimplushtml
在windows系統下使用vim請下載gVim,linux自帶Vimlinux
sudo apt-get install vim git
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim ~/.vimrc
set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/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 'VundleVim/Vundle.vim' " The following are examples of different formats supported. " Keep Plugin commands between vundle#begin/end. " plugin on GitHub repo Plugin 'tpope/vim-fugitive' " plugin from http://vim-scripts.org/vim/scripts.html " Plugin 'L9' " Git plugin not hosted on GitHub Plugin 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin) Plugin 'file:///home/gmarik/path/to/plugin' " The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " Install L9 and avoid a Naming conflict if you've already installed a " different version somewhere else. " Plugin 'ascenator/L9', {'name': 'newL9'} " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line
:PluginInstall
:bdelete
:PluginSearch :PluginSearch! (從vimscripts網站刷新本地列表)
:PluginUpdate :PluginInstall! (從新安裝全部插件)
:PluginList :e ~/.vimrc
:h vundle
sudo vim ~/.vimrc
leafpad ~/.vimrc
sudo apt-get install vim-gnome
操做方式:都是在normal模式下使用的git
y 表示從vim複製到系統剪切版 p 表示從外部文件(系統剪切版)粘貼到vim d 表示剪切 gp 粘貼而且移動光標到粘貼內容後,gP同理 yy 複製一行 dd 刪除一行 p 在當前光標後粘貼 P 在當前光標前粘貼
Plugin 'xxxx'
set backspace=2 color desert set encoding=utf-8 let &termencoding=&encoding set fileencodings=utf-8,gbk "解決中文亂碼 set number syntax on set cindent set incsearch "增量式搜索 set hlsearch "高亮搜索