官網
插件列表
Vundle 插件管理器javascript
set nocompatible " be iMproved, required filetype off " required set rtp+=~/.vim/bundle/Vundle.vim call 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() " required filetype plugin indent on " required
安裝 YouCompleteMe Plugin 'Valloric/YouCompleteMe'php
經過下面的命令能夠找到它的位置: :scriptnames 例如,象這樣去編輯該文件: :edit ~/.vimrc 接下來你就能夠在裏面添加你本身的命令設置了,就象你在 Vim 裏進行設置時所用的命令同樣 。 如: Go:set hlsearch<Esc> "G"命令先移動到文件末尾 。 "o"另闢一行進行編輯,在該行上鍵入你的":set"命令 。 而後用<Esc>來退出插入模式 。 最後保存文件: 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='<C-Z>' "改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, 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' " 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 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 " Setting some decent VIM settings for programming set ai " set auto-indenting on for programming set 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 time set laststatus=2 " make the last line where the status is two lines deep so you can see status always set backspace=indent,eol,start " make that backspace key work the way it should set nocompatible " vi compatible is LAME set background=dark " Use colours that work well on a dark background (Console is usually black) set showmode " show the current mode set clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windows syntax on " turn syntax highlighting on by default " Show EOL type and last modified timestamp, right after the filename set 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=74 endif " has("autocmd") set nu set tabstop=2 set softtabstop=2 set backspace=2 set shiftwidth=2 set autoindent set showmatch "代碼匹配 set ignorecase "檢索時忽略大小寫 set fileencodings=uft-8 set helplang=cn "幫助系統設置爲中文 set encoding=utf-8 set whichwrap=b,s,\<,\>,[,],l,h