虎克的博客

Enthusiasm Biogeography-Biodiversity Informatics-Data Sciences

面向前端开发者和TextMate粉丝的vim配置

| Comments

vim-editor-icon1.pngtextmate.png

vim是编辑器中的神器,但是因为学习曲线比较陡,界面也仿佛从石器时代穿越,广大fashion的前端工作者们难免对其有距离感。其实vim最大的萌点有两个,其一是百科全书般的文本编辑功能,其二是可以随意定制,满足任何与编辑器相关的需求和偏好,比如下面这张便是我在macbook pro上运行vim的截图,不仅语法高亮可以冒充TextMate,功能也几乎一致。

picture-4.png

首先是做一个初始化配置脚本,在我的OSX10.5里是是~/.vimrc文件,这里只列出一些需要补充进去的设置:

    <li class="hl-firstline" style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 10px; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 12px !important; list-style-type: decimal !important; list-style-position: outside !important; list-style-image: initial !important; border-top-width: 1px; border-top-style: solid; border-top-color: #E3EEF9 !important; display: list-item !important; font-size: 12px !important; line-height: 20px !important; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(195, 206, 217); background-color: rgb(249, 251, 252) !important;"><span style="color: #444444; font-family: 'Lucida Grande', Verdana, Arial, sans-serif;">"设置语法高亮的配色,在GUI界面里使用我自定义的yytextmate.vim</span></li>
    
    <li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 10px; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 12px !important; list-style-type: decimal !important; list-style-position: outside !important; list-style-image: initial !important; display: list-item !important; font-size: 12px !important; line-height: 20px !important; border-left-width: 1px; border-left-style: solid; border-left-color: #C3CED9; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(227, 238, 249) !important; background-color: rgb(249, 251, 252) !important;"><span style="color: #444444; font-family: 'Lucida Grande', Verdana, Arial, sans-serif;">if has("gui_running")</span></li>
    
    <li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 10px; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 12px !important; list-style-type: decimal !important; list-style-position: outside !important; list-style-image: initial<p class='post-footer'>
       original link:
       <a href='http://Apiaceae.github.io/blog/2009/09/15/%E9%9D%A2%E5%90%91%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E8%80%85%E5%92%8CTextMate%E7%B2%89%E4%B8%9D%E7%9A%84vim%E9%85%8D%E7%BD%AE/'>http://Apiaceae.github.io/blog/2009/09/15/%E9%9D%A2%E5%90%91%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E8%80%85%E5%92%8CTextMate%E7%B2%89%E4%B8%9D%E7%9A%84vim%E9%85%8D%E7%BD%AE/</a><br/>
       &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
       &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
       </p>
    

Comments