说明:这是打造适合本身的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 "高亮搜索