vimrc配置方案

上一篇文章备忘了Mac新机Terminal的优化方案,这篇文章备忘一下程序员的vi应该长什么样子_

set nocompatible
filetype off

set rtp+=~/.vim/bundle/vundle
call vundle#rc()

Bundle 'gmarik/vundle'
Bundle 'c.vim'
Bundle 'https://github.com/Lokaltog/vim-powerline.git'
set laststatus=2
set t_Co=256
let g:Powline_symbols='fancy'

filetype plugin indent on

syntax on
syntax enable
set number
filetype on
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab
set showmatch
set incsearch
set showcmd
set autoindent
set cindent
set hlsearch

syn case match

if version < 600
    syntax clear
elseif exists("b:current_syntax")
    finish
endif

syn case match

syn keyword pbTodo       contained TODO FIXME XXX
syn cluster pbCommentGrp contains=pbTodo

syn keyword pbSyntax     syntax import option
syn keyword pbStructure  package message group
syn keyword pbRepeat     optional required repeated
syn keyword pbDefault    default
syn keyword pbExtend     extend extensions to max
syn keyword pbRPC        service rpc returns

syn keyword pbType      int32 int64 uint32 uint64 sint32 sint64
syn keyword pbType      fixed32 fixed64 sfixed32 sfixed64
syn keyword pbType      float double bool string bytes
syn keyword pbTypedef   enum
syn keyword pbBool      true false

syn match   pbInt     /-\?\<\d\+\>/
syn match   pbInt     /\<0[xX]\x+\>/
syn match   pbFloat   /\<-\?\d*\(\.\d*\)\?/
syn region  pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp
syn region  pbString  start=/"/ skip=/\\"/ end=/"/
syn region  pbString  start=/'/ skip=/\\'/ end=/'/

if version >= 508 || !exists("did_proto_syn_inits")
    if version < 508
        let did_proto_syn_inits = 1
        command -nargs=+ HiLink hi link <args>
    else
        command -nargs=+ HiLink hi def link <args>
    endif

    HiLink pbTodo         Todo

    HiLink pbSyntax       Include
    HiLink pbStructure    Structure
    HiLink pbRepeat       Repeat
    HiLink pbDefault      Keyword
    HiLink pbExtend       Keyword
    HiLink pbRPC          Keyword
    HiLink pbType         Type
    HiLink pbTypedef      Typedef
    HiLink pbBool         Boolean

    HiLink pbInt          Number
    HiLink pbFloat        Float
    HiLink pbComment      Comment
    HiLink pbString       String

    delcommand HiLink
endif
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,075评论 25 708
  • 已忘了第一次的分别,在何年何月。依稀中看见柳枝款摆,荷风微漾。 道一声珍重,而后在青春的岔路分道扬镳。或许轮回的终...
    周皮皮bibby阅读 2,699评论 54 124
  • 畅读乐嘉的《色眼识人》算是初级阶段开始入门性格分析课程了吧,很喜欢书中的一句话:一旦洞见了真正的自己,你就能开始学...
    Shirley17阅读 292评论 0 0
  • 2016.12.24,夜。 被老公搂着腰,睡。却毫无睡意。满满朋友圈的圣诞味儿,却丝毫穿不进我的心。 平安夜,草草...
    六六的三三阅读 386评论 0 2
  • Background Mode Cordova插件,以防止应用程序在后台进入睡眠状态。 需要Cordova插件:c...
    待花谢花开阅读 5,949评论 0 1