Rev 30 | Blame | Compare with Previous | Last modification | View Log | RSS feed
" Vim syntax file" Language: Thrift" Maintainer: Martin Smith <martin@facebook.com>" Last Change: $Date: $" Copy to ~/.vim/" Add to ~/.vimrc" au BufRead,BufNewFile *.thrift set filetype=thrift" au! Syntax thrift source ~/.vim/thrift.vim"" $Id: $"" Licensed to the Apache Software Foundation (ASF) under one" or more contributor license agreements. See the NOTICE file" distributed with this work for additional information" regarding copyright ownership. The ASF licenses this file" to you under the Apache License, Version 2.0 (the" "License"); you may not use this file except in compliance" with the License. You may obtain a copy of the License at"" http://www.apache.org/licenses/LICENSE-2.0"" Unless required by applicable law or agreed to in writing," software distributed under the License is distributed on an" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY" KIND, either express or implied. See the License for the" specific language governing permissions and limitations" under the License."if version < 600syntax clearelseif exists("b:current_syntax")finishendif" Todosyn keyword thriftTodo TODO todo FIXME fixme XXX xxx contained" Commentssyn match thriftComment "#.*" contains=thriftTodosyn region thriftComment start="/\*" end="\*/" contains=thriftTodosyn match thriftComment "//.\{-}\(?>\|$\)\@="" Stringsyn region thriftStringDouble matchgroup=None start=+"+ end=+"+" Numbersyn match thriftNumber "-\=\<\d\+\>" contained" Keywordssyn keyword thriftKeyword namespacesyn keyword thriftKeyword xsd_all xsd_optional xsd_nillable xsd_attrssyn keyword thriftKeyword include cpp_include cpp_type const optional requiredsyn keyword thriftBasicTypes void bool byte i16 i32 i64 double string binarysyn keyword thriftStructure map list set struct typedef exception enum throws" Specialsyn match thriftSpecial "\d\+:"" Structuresyn keyword thriftStructure service oneway extends"async" { return tok_async; }"exception" { return tok_xception; }"extends" { return tok_extends; }"throws" { return tok_throws; }"service" { return tok_service; }"enum" { return tok_enum; }"const" { return tok_const; }if version >= 508 || !exists("did_thrift_syn_inits")if version < 508let did_thrift_syn_inits = 1command! -nargs=+ HiLink hi link <args>elsecommand! -nargs=+ HiLink hi def link <args>endifHiLink thriftComment CommentHiLink thriftKeyword SpecialHiLink thriftBasicTypes TypeHiLink thriftStructure StorageClassHiLink thriftTodo TodoHiLink thriftString StringHiLink thriftNumber NumberHiLink thriftSpecial SpecialHiLink thriftStructure Structuredelcommand HiLinkendiflet b:current_syntax = "thrift"