windows cmder 安装 Vundle
- git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- vi /etc/vimrc 上,添加Configure Plugins
- :PluginInstall
set nocompatible " be iMproved, requiredfiletype off " requiredset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()Plugin 'VundleVim/Vundle.vim'Plugin 'mattn/emmet-vim' "插件名安装Plugin 'file:///home/gmarik/path/to/plugin' “ 本地安装Plugin 'git://git.wincent.com/command-t.git' " 插件github地址安装" 上面添加插件call vundle#end() " requiredfiletype plugin indent on " required
安装 Plugin 'Valloric/YouCompleteMe'
vim配置
通过下面的命令可以找到它的位置::scriptnames例如,象这样去编辑该文件::edit ~/.vimrc接下来你就可以在里面添加你自己的命令设置了,就象你在 Vim 里进行设置时所用的命令一样 。 如:Go:set hlsearch"G"命令先移动到文件末尾 。 "o"另辟一行进行编辑,在该行上键入你的":set"命令 。 然后用 来退出插入模式 。 最后保存文件:ZZ:set autowrite
:set filetype=javascript 手工指定该文件的类型/usr/share/vim/vim80/syntax 目录下代表支持高亮的文件类型\cmder\vendor\git-for-windows\usr\share\vim\vim80\syntax 他在这里可以找到
set iskeyword& 在最后添加&让这个配置恢复其默认值,关键命令:set nu! 显示行号:set nonu 不显示行号:set ignorecase 忽略大小写:set noignorecase 不忽略大小写:set hlsearch 高亮变量:set nohlsearch 取消高亮let g:user_emmet_leader_key='' "改Emmet的快捷键set showmatch "代码匹配set autoread "文件在Vim之外修改过,自动重新读入set ignorecase "检索时忽略大小写set fileencodings=uft-8,gbk "使用utf-8或gbk打开文件set helplang=cn "帮助系统设置为中文set autowrite 自动保存,并不是隔段时间自动保存set noautowrite 不自动保存set whichwrap=b,s,\<,\>,[,],l,h 光标移动到一行的头或尾的时候继续移动 set so=0 光标快到上下边界,引发窗口滚动:help 'wrap' 查看一个命令怎么使用set nowrap 不折行:set list 显示制表符:set cmdheight=3 窗口最底部显示信息行数:syntax enable 开启彩色set filetype 当前文件类型:set background=dark 设置背景色:set background=light:w index.html 把当前文件内容写到另一个文件:w >> index.html 追加:set backup 生成备份文件 ~:set backupext=.bak 设置备份文件后缀
set nocompatible " be iMproved, requiredfiletype off " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'" Plugin 'Valloric/YouCompleteMe'Plugin 'mattn/emmet-vim'Plugin 'dart-lang/dart-vim-plugin'Plugin 'mxw/vim-jsx'Plugin 'posva/vim-vue'Plugin 'pangloss/vim-javascript'Plugin 'git@github.com:leafgarland/typescript-vim.git'Plugin 'mhartington/vim-angular2-snippets'Plugin 'git@github.com:hail2u/vim-css3-syntax.git'Plugin 'git@github.com:ap/vim-css-color.git'Plugin 'git@github.com:wavded/vim-stylus.git'Plugin 'groenewege/vim-less'Plugin 'cakebaker/scss-syntax.vim'Plugin 'git@github.com:scrooloose/nerdtree.git' " 文件系统资源管理器" Plugin 'git@github.com:Shougo/deoplete.nvim.git'" Plugin 'git@github.com:kien/ctrlp.vim.git'Plugin 'git@github.com:vim-scripts/AutoComplPop.git'" Plugin 'Valloric/YouCompleteMe'" 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 linecall vundle#end() " requiredfiletype 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" Setting some decent VIM settings for programmingset ai " set auto-indenting on for programmingset showmatch " automatically show matching brackets. works like it does in bbedit.set vb " turn on the "visual bell" - which is much quieter than the "audio blink"set ruler " show the cursor position all the timeset laststatus=2 " make the last line where the status is two lines deep so you can see status alwaysset backspace=indent,eol,start " make that backspace key work the way it shouldset nocompatible " vi compatible is LAMEset background=dark " Use colours that work well on a dark background (Console is usually black)set showmode " show the current modeset clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windowssyntax on " turn syntax highlighting on by default" Show EOL type and last modified timestamp, right after the filenameset statusline=%<%F%h%m%r\ [%{&ff}]\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P"------------------------------------------------------------------------------" Only do this part when compiled with support for autocommands.if has("autocmd") "Set UTF-8 as the default encoding for commit messages autocmd BufReadPre COMMIT_EDITMSG,MERGE_MSG,git-rebase-todo setlocal fileencodings=utf-8 "Remember the positions in files with some git-specific exceptions" autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") \ && expand("%") !~ "COMMIT_EDITMSG" \ && expand("%") !~ "MERGE_EDITMSG" \ && expand("%") !~ "ADD_EDIT.patch" \ && expand("%") !~ "addp-hunk-edit.diff" \ && expand("%") !~ "git-rebase-todo" | \ exe "normal g`\"" | \ endif autocmd BufNewFile,BufRead *.patch set filetype=diff autocmd BufNewFile,BufRead *.diff set filetype=diff autocmd Syntax diff \ highlight WhiteSpaceEOL ctermbg=red | \ match WhiteSpaceEOL /\(^+.*\)\@<=\s\+$/ autocmd Syntax gitcommit setlocal textwidth=74endif " has("autocmd")set nuset tabstop=2 set softtabstop=2set backspace=2set shiftwidth=2set autoindentset showmatch "代码匹配set ignorecase "检索时忽略大小写set fileencodings=uft-8set helplang=cn "帮助系统设置为中文set encoding=utf-8set whichwrap=b,s,\<,\>,[,],l,h