# install Vundle first
cd <HOME>
git clone https://github.com/gmarik/vundle.git .vim/bundle/vundle
# get my vimrc file
cd <VIM_HOME>
git init
git remote add origin https://github.com/summerwxy/vimrc.git
git fetch
git branch master origin/master
git checkout master
add Bundle 'xxxx' to _vimrc
run :BundleInstall in Vim
run :BundleInstall! in Vim
remove Bundle 'xxxx' from _vimrc
run :BundleClean! in Vim
-
AutoComplPop
- 用 Windows 路徑會在, [home].vim\bundle\ 裡面 To enable auto-popup for this completion, add following function to plugin/snipMate.vim:
fun! GetSnipsInCurrentScope() let snips = {} for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] call extend(snips, get(s:snippets, scope, {}), 'keep') call extend(snips, get(s:multi_snips, scope, {}), 'keep') endfor return snips endf -
ColorSelector
:SelectColorS打開選擇清單C-n下一個C-p上一個C-q關閉
-
css color
-
ctrlp
ctrl+p打開功能- 打開時
ctrl+f,ctrl+b可以在 可以在 file/mru/buffer 三種模式中切換 - 打開時 可以用
ctrl+z標示, 然後用ctrl+o一次打開標示的檔案
-
dbext
<leader>se執行選取的 SQL<leader>sel執行目前這行的 SQL
-
emmet
- insert mode:
<c-y>,產生 html tag - visual mode:
<c-y>,快速編輯Write as below. test1 test2 test3 Then do visual select(line wize) and type |<C-Y>,|. If you request 'Tag:', then type 'ul>li*'. <ul> <li>test1</li> <li>test2</li> <li>test3</li> </ul> - insert mode:
<c-y>d選取所在的 tag 裡面所有內容 - insert mode:
<c-y>i作用在 img tag 上, 取得當前圖片的大小 - insert mode:
<c-y>k移除整個 tag, 包含內容 - insert mode:
<c-y>jsplit/join tag - insert mode:
<c-y>/comment - insert mode:
<c-y>a作用在網址上, 產生成 a tag - visual mode:
<c-y>ccode pretty
- insert mode:
-
fugitive
:Git [command]= :!git [command]
-
indentLine
- 顯示 indent 的垂直線
-
Matrix Screensaver
F8切換 screensaver
-
minibufexpl
F10切換是否顯示 minibufexplctrl+tab可以在打開的文件中切換- 在 minibufexpl 上按
d可以關閉打開的文件 [[*]] multiple cursors ctrl+n
-
nerdtree
F11切換 nerdtree 畫面- 設定 NERDTreeIgnore 可以過濾一些不想顯示的檔案
-
Power Line
-
snipMate
- 輸入在 snipmate/snippets 裡面定義的字按
Tab就可以呼叫 - html: doct5, html, body, head, title, script, scriptsrc, style, base, r, div, fieldset, form, h1, input, label, link, mailto, meta, opt, select, table, textarea
- java: main, pu, po, pr, st, fi, ab, re, br, de, ca, th, sy, im, imp, ext, j.u, j.i, j.b, j.n, j.m, if, el, elif, wh, for, fore, sw, cs, tc, t, cl, in, m, , v, co, cos, as, try, tryf, rst
- javascript: proto, fun, f, if, ife, t, switch, case, for, forr, wh, do, :f, timeout, get, gett
- python: #!, imp, docs, wh, for, cl, def, deff, defs, property, ld, ., try, ifmain, _
- ruby: =b, y, rb, beg, req, #, end, case, when, def, deft, if, ife, elsif, unless, while, for, until, cla, cla-, mod, r, w, rw, Enum, Comp, Forw-, defs, defmm, defd, defds, am, app, usai, usau, array, hash, file, Dir, dir, deli, fil, flao, zip, dow, ste, tim, upt, loo, ea, eadeab, eac-, eai, eaid, eak, eakd, eal, eald, eap, eapd, eas-, easd-, eav, eavd, eawi, eawid, reve, reved, inj, injd, map, mapd, mapwi-, sor, sorb, ran, all, any, cl, col, cold, det, detd, fet, fin, find, fina, finad, gre, sub, sca, scad, max, min, par, pard, rej, rejd, sel, seld, lam, do, :, ope, patfh, unif, optp, opt, tc, ts, as, ase, asne, asid, asio, asko, asn, asnn, asm, asnm, aso, asr, asnr, asrt, ass, asns, ast, asnt, fl, bm-, rep, Md, Ml, deec, Pn-, tra, xml-, xpa, clafn, sinc, nam, tas
- snippet: snip, msnip
- bim: header, guard, f, for, wh, if, ife
- 輸入在 snipmate/snippets 裡面定義的字按
-
supertab
- 用
tab就對了
- 用
-
surround
- 主要命令有
cs,ds,yss,ysiw,S cs"'可以將 "Hello, World!" 改成 'Hello, World!'cs'<q>可以將 'Hello, World!' 改成Hello, World!
dst可以將Hello, World!
改成 Hello, World!yss)整行 可以將 Hello, World! 改成 (Hello, World!)ysiw]單個單字 可以將 (Hello, World!) 改成 ([Hello], World!)- Visual mode 下,
S<div>選取範圍 可以將 ([Hello], World!) 改成([Hello], World!) - yss 整行 ysiw 單字 S 選取範圍
- 主要命令有
-
tabular
- 用法
:Tab /,
- 用法
-
vimwiki
- 可用 .wiki, .md 檔案寫個人 wiki
-
xmledit
- 要記得要複製 ftplugin 裡面的檔案 變成 html.vim, htm.vim, gsp.vim...
- 類似 AutoClose, 可以自動補齊 html tag
- 還有 html tag 屬性的 list 可以用
<Leader>d可以刪除, 目前所在的 tag 本身
-
F7 切換 gvim 工具列, 功能列