---
title: "vim Web开发"
author: "vergilwang"
date: "2013-07-18T16:52:00Z"
tags: []
categories: ["互联网"]
slug: "vim-web"
draft: false
lastmod: "2014-02-15T12:34:35Z"
id: 2011140
url: "https://vergilwang.iteye.com/blog/2011140"
---

# [vim 下web开发html css js插件](http://www.cnblogs.com/Jason-Damon/archive/2011/10/31/2229692.html)

 

Vim下的Web开发之html,CSS,javascript插件

 

HTML

下载[HTML.zip](http://www.vim.org/scripts/script.php?script_id=453)

解压HTML.zip，然后将里面的所有文件copy到C:\\Program Files\\Vim\\vimfiles目录下  
首先，你应该把“ filetype plugin on ”写入你的vimrc。  
重启vim。  
新建一个test.html文件。用gvim打开按 ";html"看看会有什么结果！注意";html"是英文的分号(；)

Javascript

转载：http://panweizeng.com/archives/359

如果你喜欢[vim]()，平时也写写javascript，那么这篇文章就是为你而写的：）如果你喜欢javascript，但是还没有找到合适的编辑器，那么请[givevima try]()。

以下假定你对vim已经有所了解，另外所有插件在gnome-terminal中都测试过，在其他终端中应该不会有太大问题。

1. 语法高亮－javascript.vim  
   [http://www.vim.org/scripts/script.php?script\_id=1491]()  
   该插件安装在~/.vim/syntax/目录下。下载后需要修改一个地方，一般javascript编程，折叠层数不需要太深，我自己设置为1，即：  
   setlocal foldlevel=1。  
   需要在.vimrc中加入
   
   1. " 打开javascript折叠
   2. let b:javascript\_fold=1
   3. " 打开javascript对dom、html和css的支持
   4. let javascript\_enable\_domhtmlcss=1
   
   截屏（点击可查看大图）  
   ~/.vim/plugin下就可以
2. 变量标记和检查－mark.vim
   
   [http://www.vim.org/scripts/script.php?script\_id=1238]()  
   该插件安装到~/.vim/plugin/目录。在对变量进行检查和跟踪的时候会很有用，同时还可以防止变量名拼写错误。打开／关闭变量标记的默认快捷键是m。也可以使用v选中一段进行标记。  
   截屏（点击可查看大图）
   
   字典补全－javascript.dict
   
   1、autocomplet  
   一个自动完成的插件，当你输入
   
   ```
   <div id="
   的时候，插件能够给你列出当前页面的id值和CSS文件中的对应id名称，强烈推荐
   下载地址
   ```
   
   &lt;wbr&gt;到這裏下載 javascript 的 dict , wget&lt;wbr&gt;https://github.com/tyru/dotfiles/blob/master/dotfiles/.vim/dict/javascript.dict&lt;wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;
   
   應該用 git，，可是我不太會），然後將javascript.dict 放在 dict/ 底下
   
    
   
   1. "设置字典 ~/.vim/dict/javascript.dict是字典文件的路径
   2. autocmd FileType javascript set dictionary=~/.vim/dict/javascript.dict
   
   截屏（点击可查看大图）
   
    
   
   为了能够自动开启JavaScript文件的自动完成功能，你需要将下面的代码添加到你的~/.vimrc文件中
   
   autocmdFileTypejavascriptsetomnifunc=javascriptcomplete#CompleteJS
3. 运行代码片段－spidermonkey
   
   [http://www.mozilla.org/js/spidermonkey/]()  
   有时想测试一个小东西，没有必要写一个html然后到浏览器去运行，spidermonkey能帮你忙，而且spidermonkey还能作一些很 geek的事情。ubuntu系统安装很简单，sudo apt-get install spidermonkey-bin，其他系统请参考网站的文档。安装完毕后，输入js，则会进入一个js shell，和python类似。输入help()回车，会看到一个简单的帮助。  
   在vim编写javascript代码后，输入!js %即可执行当前文件的代码。也可以选中一段代码然后执行:’&lt;,'&gt;!js，这样会插入执行结果到当前文件。  
   截屏（点击可查看大图）
   
   虽然我不怎么用，但是可能对你有一些帮助
4. [winmanager]()类似资源管理器，如果从editplus或者其他图形编辑器转过来的朋友，这个可能很有用。  
   截屏（点击可查看大图）
5. [minibufexplorer]()类似标签页，管理当前打开的文件  
   [Tlist]()可以显示代码结构

&lt;wbr style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt;&lt;span style="color:#464646"&gt;VIM實在是深不可測，可以說是個萬能的editor，而且所需系統資源極少，適合老舊電腦。不過學習曲綫比較陡。這陣子看了一些關於javascript,jquery,xhtml,css的tutorial，就想說把vim設定成一個好用的IDE，作業起來方便。&lt;/span&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; 1：安裝JQeury 語法顏色&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;到這裏下載：http://www.vim.org/scripts/script.php?script\_id=2416 ，儲存到 syntax底下。&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;然後在 .vimrc 加入這一行 ：&lt;span style="word-wrap:normal; word-break:normal; line-height:normal; font-family:arial,helvetica,sans-serif; font-size:14px"&gt;au BufRead,BufNewFile jquery.\*.js set ft=javascript syntax=jquery&lt;/span&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="font-family:simsun; font-size:14px; line-height:21px"&gt;&lt;span style="color:#ff0000"&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt; &lt;div style="font-family:simsun; font-size:14px; line-height:21px"&gt;&lt;span style="color:#ff0000"&gt;2：安裝縮排&lt;/span&gt;&lt;/div&gt; &lt;div style="font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;div class="entry" style="border:0px; margin:0px; padding:10px 10px 10px 5px; font-family:arial,helvetica,clean,sans-serif; font-size:12px; line-height:16px; background-color:rgb(249,249,249)"&gt; &lt;p style="border:0px; margin-top:1em; margin-bottom:1em; padding-top:0px; padding-bottom:0px; line-height:25px; overflow:hidden"&gt; &lt;a href="http://www.vim.org/scripts/script.php?script\_id=1397"&gt;http://www.vim.org/scripts/script.php?script\_id=1397&lt;/a&gt;&lt;/p&gt; &lt;p style="color:rgb(70,70,70); border:0px; margin-top:1em; margin-bottom:1em; padding-top:0px; padding-bottom:0px; line-height:25px; overflow:hidden"&gt; 今天依然介绍vim这个大杀器的一个插件：xml.vim。 可以在&lt;a title="xml.vim" href="http://www.vim.org/scripts/script.php?script\_id=1397" style=""&gt;这里&lt;/a&gt;下载这个插件，非常小只有50几kb，把它复制到~/.vim/ftpplugin目录下，然后在vim的配置文件 ~/.vimrc 中添加一行：&lt;/p&gt; &lt;p style="color:rgb(70,70,70); border:0px; margin-top:1em; margin-bottom:1em; padding-top:0px; padding-bottom:0px; line-height:25px; overflow:hidden"&gt; filetype plugin indent on&lt;/p&gt; &lt;p style="color:rgb(70,70,70); border:0px; margin-top:1em; margin-bottom:1em; padding-top:0px; padding-bottom:0px; line-height:25px; overflow:hidden"&gt; 保存，重新用vim或者Gvim打开一个html文件，或者html.erb文件，在通常模式下，输入gg=G 会发现vim帮我们自动格式化了html代码，所有的缩进都很完美。&lt;/p&gt; &lt;/div&gt; &lt;p class="infobottom" style="color:rgb(70,70,70); border:0px; margin-top:1em; margin-bottom:1em; padding-top:0px; padding-bottom:0px; font-style:italic; font-family:arial,helvetica,clean,sans-serif; background-color:rgb(249,249,249)"&gt; Tags: vim&lt;/p&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; 3：安裝Javascript 語法顏色&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;到這裏下載 ：&lt;wbr&gt;&lt;a href="http://www.vim.org/scripts/script.php?script\_id=1491" style="text-decoration:none; color:rgb(64,96,116)"&gt;http://www.vim.org/scripts/script.php?script\_id=1491&lt;/a&gt;&lt;wbr&gt;，放在syntax 底下。&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="font-family:simsun; font-size:14px; line-height:21px"&gt;&lt;span style="color:rgb(204,0,0)"&gt;4：javascript 語法檢查&lt;/span&gt;&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;這個不算太好用，不像pyflakes可以及時的檢查錯誤，先用着吧。首先安裝 javascriptlint ,下載 &lt;wbr&gt;：http://www.javascriptlint.com/download/jsl-0.3.0-src.tar.gz &lt;wbr&gt;， 然後解壓縮。在該目錄內執行：&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;(1) make -f Makefile.ref all &lt;wbr&gt;，執行完會產生以下目錄&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;(2) cd Linux\_All\_DBG.OBJ/&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;(3) sudo cp jsl jscpucfg /usr/local/bin/&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;(4) jsl -help:conf &gt; jsl.conf &lt;wbr&gt;(照&lt;a href="http://blogs.linux.ie/kenguest/2007/03/18/integrating-javascript-lint-with-vim/" style="text-decoration:none; color:rgb(64,96,116)"&gt;http://blogs.linux.ie/kenguest/2007/03/18/integrating-javascript-lint-with-vim/&lt;/a&gt;&lt;wbr&gt;的說明做 jsl -help:conf &gt; etc/jsl.conf 會出現 permission denied，，就算用 sudo 還是不行，，所以就先輸出成 jsl.conf 再 cp 進 /etc )&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;(5) cp jsl.conf /etc/&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;然後在 .vimrc 加入：&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;set makeprg=jsl\\ -nologo\\ -nofilelisting\\ -nosummary\\ -nocontext\\ -conf\\ '/etc/jsl.conf'\\ -process\\ %&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;set errorformat=%f(%l):\\ %m&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;inoremap &lt;silent&gt; &lt;F5&gt; &lt;C-O&gt;:make&lt;CR&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;map &lt;silent&gt; &lt;F5&gt; :make&lt;CR&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;按F5 就會執行syntax的檢查，，，檢查的有點太詳細了。。我還是比較想用類似 pyflakes的plugin.....&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; 5: &lt;wbr&gt;javascript 自動補完 autocomplete&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;到這裏下載 javascript 的 dict , wget&lt;wbr&gt;https://github.com/tyru/dotfiles/blob/master/dotfiles/.vim/dict/javascript.dict&lt;wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;（ 應該用 git，，可是我不太會），然後將javascript.dict 放在 dict/ 底下&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;再來，下載 neocomlcache.vim 。wget&lt;wbr&gt;https://github.com/downloads/Shougo/neocomplcache&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;這個有點意思，，vba是 vim ball ,,不是M$的那個VBA。 先把&lt;wbr&gt;neocomplcache-6.1.vba 放到.vim的目錄底下， 然後用 vim 打開它，執行 : source &lt;wbr&gt;% ，，，竟然就自動安裝好了，，這個好，不用一個一個檔案copy到對應目錄。&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;然後在 .vimrc 加入：&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; autocmd FileType js :set dictionary+=~/.vim/dict/javascript.dict&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; set complete+=k&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; let g:neocomplcache\_enable\_at\_startup = 1&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; let g:neocomplcache\_enable\_auto\_select = 0&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; function! InsertTabWrapper()&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;let col = col('.') - 1&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;if !col || getline('.')\[col - 1] !~ '\\k'&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;return "\\"&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;else&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;if pumvisible()&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;return "\\"&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;else&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;return "\\\\"&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;end&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;endif&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; endfunction&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; inoremap = InsertTabWrapper()&lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;&lt;wbr&gt;使用起來有點問題，根據&lt;a href="http://tahir0u.com/2011/05/14/356.html" style="text-decoration:none; color:rgb(64,96,116)"&gt;http://tahir0u.com/2011/05/14/356.html&lt;/a&gt;&lt;wbr&gt;，要按tab才會跳出autocomplete的選項，可是變成不用按也會跑出來，而且按了tab還沒用，，，不過這算是比較方便的dict了。&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; 6：安裝zendcoding ,到這裏下載&lt;wbr&gt;&lt;a href="http://www.vim.org/scripts/script.php?script\_id=2981" style="text-decoration:none; color:rgb(64,96,116)"&gt;http://www.vim.org/scripts/script.php?script\_id=2981&lt;/a&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;解壓縮到相應目錄底下， 不用改 .vimrc 。這個plugin也挺神奇的，寫html很省事，舉例如下：&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;在 insert模式 ，輸入 &lt;wbr&gt;hml:5 , 然後 按住 control + y + , (這個是逗號），放開之後，就出現了以下tags&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;&lt;!DOCTYPE HTML&gt;&lt;/div&gt; &lt;div&gt;&lt;html lang="en"&gt;&lt;/div&gt; &lt;div&gt;&lt;head&gt;&lt;/div&gt; &lt;div&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;meta charset="UTF-8"&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/div&gt; &lt;div&gt;&lt;wbr&gt;&lt;wbr&gt;&lt;title&gt;&lt;/title&gt;&lt;/wbr&gt;&lt;/wbr&gt;&lt;/div&gt; &lt;div&gt;&lt;/head&gt;&lt;/div&gt; &lt;div&gt;&lt;body&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;&lt;/body&gt;&lt;/div&gt; &lt;div&gt;&lt;/html&gt;&lt;/div&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;br&gt; &lt;/div&gt; &lt;div style="color:rgb(70,70,70); font-family:simsun; font-size:14px; line-height:21px"&gt; &lt;wbr&gt;&lt;wbr&gt;呵呵，，這樣少打很多字呢。照&lt;a href="http://tahir0u.com/2011/05/14/356.html" style="text-decoration:none; color:rgb(64,96,116)"&gt;http://tahir0u.com/2011/05/14/356.html&lt;/a&gt;&lt;wbr&gt;的設定有點問題。。不過介紹的插件很不錯&lt;/wbr&gt;&lt;/wbr&gt;&lt;/wbr&gt; &lt;/div&gt; &lt;br&gt;&lt;/wbr&gt;