Initial commit.
This commit is contained in:
113
vim/syntax/conque_term.vim
Normal file
113
vim/syntax/conque_term.vim
Normal file
@@ -0,0 +1,113 @@
|
||||
" FILE: syntax/conque_term.vim {{{
|
||||
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
|
||||
" WEBSITE: http://conque.googlecode.com
|
||||
" MODIFIED: 2011-09-02
|
||||
" VERSION: 2.3, for Vim 7.0
|
||||
" LICENSE:
|
||||
" Conque - Vim terminal/console emulator
|
||||
" Copyright (C) 2009-2011 Nico Raffo
|
||||
"
|
||||
" MIT License
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
" in the Software without restriction, including without limitation the rights
|
||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
" copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
" THE SOFTWARE.
|
||||
" }}}
|
||||
|
||||
|
||||
" *******************************************************************************************************************
|
||||
" MySQL *************************************************************************************************************
|
||||
" *******************************************************************************************************************
|
||||
|
||||
" TODO Move these to syntax which is only executed for mysql
|
||||
"syn match MySQLTableBodyG "^\s*\w\+:\(.\+\)\=$" contains=MySQLTableHeadG,MySQLNullG,MySQLBool,MySQLNumberG,MySQLStorageClass oneline skipwhite skipnl
|
||||
"syn match MySQLTableHeadG "^\s*\w\+:" contains=MySQLTableColon skipwhite contained
|
||||
"syn match MySQLTableColon ":" contained
|
||||
|
||||
syn match MySQLTableHead "^ *|.*| *$" nextgroup=MySQLTableDivide contains=MySQLTableBar oneline skipwhite skipnl
|
||||
syn match MySQLTableBody "^ *|.*| *$" nextgroup=MySQLTableBody,MySQLTableEnd contains=MySQLTableBar,MySQLNull,MySQLBool,MySQLNumber,MySQLStorageClass oneline skipwhite skipnl
|
||||
syn match MySQLTableEnd "^ *+[+=-]\++ *$" oneline
|
||||
syn match MySQLTableDivide "^ *+[+=-]\++ *$" nextgroup=MySQLTableBody oneline skipwhite skipnl
|
||||
syn match MySQLTableStart "^ *+[+=-]\++ *$" nextgroup=MySQLTableHead oneline skipwhite skipnl
|
||||
syn match MySQLNull " NULL " contained contains=MySQLTableBar
|
||||
syn match MySQLStorageClass " PRI " contained
|
||||
syn match MySQLStorageClass " MUL " contained
|
||||
syn match MySQLStorageClass " UNI " contained
|
||||
syn match MySQLStorageClass " CURRENT_TIMESTAMP " contained
|
||||
syn match MySQLStorageClass " auto_increment " contained
|
||||
syn match MySQLTableBar "|" contained
|
||||
syn match MySQLNumber "|\? *\d\+\(\.\d\+\)\? *|" contained contains=MySQLTableBar
|
||||
syn match MySQLQueryStat "^\d\+ rows\? in set.*" oneline
|
||||
syn match MySQLPromptLine "^.\?mysql> .*$" contains=MySQLKeyword,MySQLPrompt,MySQLString oneline
|
||||
syn match MySQLPromptLine "^ -> .*$" contains=MySQLKeyword,MySQLPrompt,MySQLString oneline
|
||||
syn match MySQLPrompt "^.\?mysql>" contained oneline
|
||||
syn match MySQLPrompt "^ ->" contained oneline
|
||||
syn case ignore
|
||||
syn keyword MySQLKeyword select count max sum avg date show table tables status like as from left right outer inner join contained
|
||||
syn keyword MySQLKeyword where group by having limit offset order desc asc show contained and interval is null on
|
||||
syn case match
|
||||
syn region MySQLString start=+'+ end=+'+ skip=+\\'+ contained oneline
|
||||
syn region MySQLString start=+"+ end=+"+ skip=+\\"+ contained oneline
|
||||
syn region MySQLString start=+`+ end=+`+ skip=+\\`+ contained oneline
|
||||
|
||||
|
||||
hi def link MySQLPrompt Identifier
|
||||
hi def link MySQLTableHead Title
|
||||
hi def link MySQLTableBody Normal
|
||||
hi def link MySQLBool Boolean
|
||||
hi def link MySQLStorageClass StorageClass
|
||||
hi def link MySQLNumber Number
|
||||
hi def link MySQLKeyword Keyword
|
||||
hi def link MySQLString String
|
||||
|
||||
" terms which have no reasonable default highlight group to link to
|
||||
hi MySQLTableHead term=bold cterm=bold gui=bold
|
||||
if &background == 'dark'
|
||||
hi MySQLTableEnd term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
|
||||
hi MySQLTableDivide term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
|
||||
hi MySQLTableStart term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
|
||||
hi MySQLTableBar term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
|
||||
hi MySQLNull term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
|
||||
hi MySQLQueryStat term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444
|
||||
elseif &background == 'light'
|
||||
hi MySQLTableEnd term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
|
||||
hi MySQLTableDivide term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
|
||||
hi MySQLTableStart term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
|
||||
hi MySQLTableBar term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
|
||||
hi MySQLNull term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
|
||||
hi MySQLQueryStat term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e
|
||||
endif
|
||||
|
||||
|
||||
" *******************************************************************************************************************
|
||||
" Bash **************************************************************************************************************
|
||||
" *******************************************************************************************************************
|
||||
|
||||
" Typical Prompt
|
||||
if g:ConqueTerm_PromptRegex != ''
|
||||
silent execute "syn match ConquePromptLine '" . g:ConqueTerm_PromptRegex . ".*$' contains=ConquePrompt,ConqueString oneline"
|
||||
silent execute "syn match ConquePrompt '" . g:ConqueTerm_PromptRegex . "' contained oneline"
|
||||
hi def link ConquePrompt Identifier
|
||||
endif
|
||||
|
||||
" Strings
|
||||
syn region ConqueString start=+'+ end=+'+ skip=+\\'+ contained oneline
|
||||
syn region ConqueString start=+"+ end=+"+ skip=+\\"+ contained oneline
|
||||
syn region ConqueString start=+`+ end=+`+ skip=+\\`+ contained oneline
|
||||
hi def link ConqueString String
|
||||
|
||||
" vim: foldmethod=marker
|
||||
100
vim/syntax/cucumber.vim
Normal file
100
vim/syntax/cucumber.vim
Normal file
@@ -0,0 +1,100 @@
|
||||
" Vim syntax file
|
||||
" Language: Cucumber
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: *.feature
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
syn sync minlines=20
|
||||
|
||||
let g:cucumber_languages = {
|
||||
\"en": {"and": "And", "background": "Background", "but": "But", "examples": "Examples|Scenarios", "feature": "Feature", "given": "Given", "scenario": "Scenario", "scenario_outline": "Scenario Outline", "then": "Then", "when": "When"},
|
||||
\"ar": {"and": "\\%u0648", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629", "but": "\\%u0644\\%u0643\\%u0646", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629", "given": "\\%u0628\\%u0641\\%u0631\\%u0636", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637", "then": "\\%u0627\\%u0630\\%u0627\\%u064b|\\%u062b\\%u0645", "when": "\\%u0645\\%u062a\\%u0649|\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627"},
|
||||
\"bg": {"and": "\\%u0418", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f", "but": "\\%u041d\\%u043e", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439", "then": "\\%u0422\\%u043e", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e"},
|
||||
\"cat": {"and": "I", "background": "Rerefons|Antecedents", "but": "Per\\%u00f2", "examples": "Exemples", "feature": "Caracter\\%u00edstica", "given": "Donat|Donada", "scenario": "Escenari", "scenario_outline": "Esquema de l\'escenari", "then": "Aleshores", "when": "Quan"},
|
||||
\"cy": {"and": "A", "but": "Ond", "examples": "Enghreifftiau", "feature": "Arwedd", "given": "anrhegedig a", "scenario": "Scenario", "then": "Yna", "when": "Pryd"},
|
||||
\"cz": {"and": "A", "background": "Pozad\\%u00ed", "but": "Ale", "examples": "P\\%u0159\\%u00edklady", "feature": "Po\\%u017eadavek", "given": "Pokud", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e", "then": "Pak", "when": "Kdy\\%u017e"},
|
||||
\"da": {"and": "Og", "background": "Baggrund", "but": "Men", "examples": "Eksempler", "feature": "Egenskab", "given": "Givet", "scenario": "Scenarie", "scenario_outline": "Abstrakt Scenario", "then": "S\\%u00e5", "when": "N\\%u00e5r"},
|
||||
\"de": {"and": "Und", "background": "Grundlage", "but": "Aber", "examples": "Beispiele", "feature": "Funktionalit\\%u00e4t", "given": "Gegeben sei", "scenario": "Szenario", "scenario_outline": "Szenariogrundriss", "then": "Dann", "when": "Wenn"},
|
||||
\"en-au": {"and": "N", "background": "Background", "but": "Cept", "examples": "Cobber", "feature": "Crikey", "given": "Ya know how", "scenario": "Mate", "scenario_outline": "Blokes", "then": "Ya gotta", "when": "When"},
|
||||
\"en-lol": {"and": "AN", "background": "B4", "but": "BUT", "examples": "EXAMPLZ", "feature": "OH HAI", "given": "I CAN HAZ", "scenario": "MISHUN", "scenario_outline": "MISHUN SRSLY", "then": "DEN", "when": "WEN"},
|
||||
\"es": {"and": "Y", "background": "Antecedentes", "but": "Pero", "examples": "Ejemplos", "feature": "Caracter\\%u00edstica", "given": "Dado", "scenario": "Escenario", "scenario_outline": "Esquema del escenario", "then": "Entonces", "when": "Cuando"},
|
||||
\"et": {"and": "Ja", "background": "Taust", "but": "Kuid", "examples": "Juhtumid", "feature": "Omadus", "given": "Eeldades", "scenario": "Stsenaarium", "scenario_outline": "Raamstsenaarium", "then": "Siis", "when": "Kui"},
|
||||
\"fi": {"and": "Ja", "background": "Tausta", "but": "Mutta", "examples": "Tapaukset", "feature": "Ominaisuus", "given": "Oletetaan", "scenario": "Tapaus", "scenario_outline": "Tapausaihio", "then": "Niin", "when": "Kun"},
|
||||
\"fr": {"and": "Et", "background": "Contexte", "but": "Mais", "examples": "Exemples", "feature": "Fonctionnalit\\%u00e9", "given": "Soit", "scenario": "Sc\\%u00e9nario", "scenario_outline": "Plan du Sc\\%u00e9nario", "then": "Alors", "when": "Lorsque"},
|
||||
\"he": {"and": "\\%u05d5\\%u05d2\\%u05dd", "background": "\\%u05e8\\%u05e7\\%u05e2", "but": "\\%u05d0\\%u05d1\\%u05dc", "examples": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\%u05d5\\%u05ea", "feature": "\\%u05ea\\%u05db\\%u05d5\\%u05e0\\%u05d4", "given": "\\%u05d1\\%u05d4\\%u05d9\\%u05e0\\%u05ea\\%u05df", "scenario": "\\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9", "scenario_outline": "\\%u05ea\\%u05d1\\%u05e0\\%u05d9\\%u05ea \\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9", "then": "\\%u05d0\\%u05d6|\\%u05d0\\%u05d6\\%u05d9", "when": "\\%u05db\\%u05d0\\%u05e9\\%u05e8"},
|
||||
\"hu": {"and": "\\%u00c9s", "background": "H\\%u00e1tt\\%u00e9r", "but": "De", "examples": "P\\%u00e9ld\\%u00e1k", "feature": "Jellemz\\%u0151", "given": "Ha", "scenario": "Forgat\\%u00f3k\\%u00f6nyv", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat", "then": "Akkor", "when": "Majd"},
|
||||
\"id": {"and": "Dan", "background": "Dasar", "but": "Tapi", "examples": "Contoh", "feature": "Fitur", "given": "Dengan", "scenario": "Skenario", "scenario_outline": "Skenario konsep", "then": "Maka", "when": "Ketika"},
|
||||
\"it": {"and": "E", "background": "Contesto", "but": "Ma", "examples": "Esempi", "feature": "Funzionalit\\%u00e0", "given": "Dato", "scenario": "Scenario", "scenario_outline": "Schema dello scenario", "then": "Allora", "when": "Quando"},
|
||||
\"ja": {"and": "\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f", "but": "\\%u3057\\%u304b\\%u3057|\\%u4f46\\%u3057", "examples": "\\%u4f8b|\\%u30b5\\%u30f3\\%u30d7\\%u30eb", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3|\\%u6a5f\\%u80fd", "given": "\\%u524d\\%u63d0", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8|\\%u30c6\\%u30f3\\%u30d7\\%u30ec|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"},
|
||||
\"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd", "but": "\\%ud558\\%uc9c0\\%ub9cc", "examples": "\\%uc608", "feature": "\\%uae30\\%ub2a5", "given": "\\%uc870\\%uac74", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c"},
|
||||
\"lt": {"and": "Ir", "background": "Kontekstas", "but": "Bet", "examples": "Pavyzd\\%u017eiai|Scenarijai|Variantai", "feature": "Savyb\\%u0117", "given": "Duota", "scenario": "Scenarijus", "scenario_outline": "Scenarijaus \\%u0161ablonas", "then": "Tada", "when": "Kai"},
|
||||
\"lv": {"and": "Un", "background": "Konteksts|Situ\\%u0101cija", "but": "Bet", "examples": "Piem\\%u0113ri|Paraugs", "feature": "Funkcionalit\\%u0101te|F\\%u012b\\%u010da", "given": "Kad", "scenario": "Scen\\%u0101rijs", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga", "then": "Tad", "when": "Ja"},
|
||||
\"nl": {"and": "En", "background": "Achtergrond", "but": "Maar", "examples": "Voorbeelden", "feature": "Functionaliteit", "given": "Gegeven", "scenario": "Scenario", "scenario_outline": "Abstract Scenario", "then": "Dan", "when": "Als"},
|
||||
\"no": {"and": "Og", "background": "Bakgrunn", "but": "Men", "examples": "Eksempler", "feature": "Egenskap", "given": "Gitt", "scenario": "Scenario", "scenario_outline": "Abstrakt Scenario", "then": "S\\%u00e5", "when": "N\\%u00e5r"},
|
||||
\"pl": {"and": "Oraz", "background": "Za\\%u0142o\\%u017cenia", "but": "Ale", "examples": "Przyk\\%u0142ady", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107", "given": "Zak\\%u0142adaj\\%u0105c", "scenario": "Scenariusz", "scenario_outline": "Szablon scenariusza", "then": "Wtedy", "when": "Je\\%u017celi"},
|
||||
\"pt": {"and": "E", "background": "Contexto", "but": "Mas", "examples": "Exemplos", "feature": "Funcionalidade", "given": "Dado", "scenario": "Cen\\%u00e1rio|Cenario", "scenario_outline": "Esquema do Cen\\%u00e1rio|Esquema do Cenario", "then": "Ent\\%u00e3o|Entao", "when": "Quando"},
|
||||
\"ro": {"and": "Si", "but": "Dar", "feature": "Functionalitate", "given": "Daca", "scenario": "Scenariu", "then": "Atunci", "when": "Cand"},
|
||||
\"ro2": {"and": "\\%u0218i", "but": "Dar", "feature": "Func\\%u021bionalitate", "given": "Dac\\%u0103", "scenario": "Scenariu", "then": "Atunci", "when": "C\\%u00e2nd"},
|
||||
\"ru": {"and": "\\%u0418|\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f", "but": "\\%u041d\\%u043e|\\%u0410", "examples": "\\%u0417\\%u043d\\%u0430\\%u0447\\%u0435\\%u043d\\%u0438\\%u044f", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f", "then": "\\%u0422\\%u043e", "when": "\\%u0415\\%u0441\\%u043b\\%u0438"},
|
||||
\"se": {"and": "Och", "background": "Bakgrund", "but": "Men", "examples": "Exempel", "feature": "Egenskap", "given": "Givet", "scenario": "Scenario", "scenario_outline": "Abstrakt Scenario", "then": "S\\%u00e5", "when": "N\\%u00e4r"},
|
||||
\"sk": {"and": "A", "background": "Pozadie", "but": "Ale", "examples": "Pr\\%u00edklady", "feature": "Po\\%u017eiadavka", "given": "Pokia\\%u013e", "scenario": "Scen\\%u00e1r", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru", "then": "Tak", "when": "Ke\\%u010f"},
|
||||
\"vi": {"and": "V\\%u00e0", "background": "B\\%u1ed1i c\\%u1ea3nh", "but": "Nh\\%u01b0ng", "examples": "D\\%u1eef li\\%u1ec7u", "feature": "T\\%u00ednh n\\%u0103ng", "given": "Bi\\%u1ebft|Cho", "scenario": "T\\%u00ecnh hu\\%u1ed1ng|K\\%u1ecbch b\\%u1ea3n", "scenario_outline": "Khung t\\%u00ecnh hu\\%u1ed1ng|Khung k\\%u1ecbch b\\%u1ea3n", "then": "Th\\%u00ec", "when": "Khi"},
|
||||
\"zh-CN": {"and": "\\%u800c\\%u4e14", "background": "\\%u80cc\\%u666f", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50", "feature": "\\%u529f\\%u80fd", "given": "\\%u5047\\%u5982", "scenario": "\\%u573a\\%u666f", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"},
|
||||
\"zh-TW": {"and": "\\%u800c\\%u4e14|\\%u4e26\\%u4e14", "background": "\\%u80cc\\%u666f", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50", "feature": "\\%u529f\\%u80fd", "given": "\\%u5047\\%u8a2d", "scenario": "\\%u5834\\%u666f|\\%u5287\\%u672c", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1|\\%u5287\\%u672c\\%u5927\\%u7db1", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}}
|
||||
|
||||
function! s:pattern(key)
|
||||
return '\<\%('.join(map(values(g:cucumber_languages),'substitute(get(v:val,a:key,"\\%(a\\&b\\)"),"|","\\\\|","g")'),'\|').'\)\%(\>\|[[:alnum:]]\@<!\)'
|
||||
endfunction
|
||||
|
||||
function! s:Add(name)
|
||||
let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","Table"],'"cucumber".a:name.v:val'),",")
|
||||
exe "syn region cucumber".a:name.'Region matchgroup=cucumber'.a:name.' start="\%(^\s*\)\@<=\%('.s:pattern(tolower(a:name)).'\)" end="$"'.next
|
||||
exe 'syn region cucumber'.a:name.'AndRegion matchgroup=cucumber'.a:name.'And start="\%(^\s*\)\@<='.s:pattern('and').'" end="$" contained'.next
|
||||
exe 'syn region cucumber'.a:name.'ButRegion matchgroup=cucumber'.a:name.'But start="\%(^\s*\)\@<='.s:pattern('but').'" end="$" contained'.next
|
||||
exe 'syn match cucumber'.a:name.'Comment "\%(^\s*\)\@<=#.*" contained'.next
|
||||
exe 'syn match cucumber'.a:name.'Table "\%(^\s*\)\@<=|.*" contained contains=cucumberDelimiter'.next
|
||||
exe 'hi def link cucumber'.a:name.'Comment cucumberComment'
|
||||
exe 'hi def link cucumber'.a:name.'But cucumber'.a:name.'And'
|
||||
exe 'hi def link cucumber'.a:name.'And cucumber'.a:name
|
||||
exe 'syn cluster cucumberStepRegions add=cucumber'.a:name.'Region,cucumber'.a:name.'AndRegion,cucumber'.a:name.'ButRegion'
|
||||
endfunction
|
||||
|
||||
syn match cucumberComment "\%(^\s*\)\@<=#.*"
|
||||
|
||||
exe 'syn match cucumberFeature "\%(^\s*\)\@<='.s:pattern('feature').':"'
|
||||
exe 'syn match cucumberBackground "\%(^\s*\)\@<='.s:pattern('background').':"'
|
||||
exe 'syn match cucumberScenario "\%(^\s*\)\@<='.s:pattern('scenario').':"'
|
||||
exe 'syn match cucumberScenarioOutline "\%(^\s*\)\@<='.s:pattern('scenario_outline').':"'
|
||||
exe 'syn match cucumberExamples "\%(^\s*\)\@<='.s:pattern('examples').':" nextgroup=cucumberExampleTable skipnl skipwhite'
|
||||
|
||||
syn match cucumberPlaceholder "<[^<>]*>" contained containedin=@cucumberStepRegions
|
||||
syn match cucumberExampleTable "\%(^\s*\)\@<=|.*" contains=cucumberDelimiter
|
||||
syn match cucumberDelimiter "|" contained
|
||||
syn match cucumberTags "\%(^\s*\)\@<=\%(@[^@[:space:]]\+\s\+\)*@[^@[:space:]]\+\s*$"
|
||||
syn region cucumberString start=+\%(^\s*\)\@<="""+ end=+"""+
|
||||
|
||||
call s:Add('Then')
|
||||
call s:Add('When')
|
||||
call s:Add('Given')
|
||||
|
||||
hi def link cucumberComment Comment
|
||||
hi def link cucumberFeature Macro
|
||||
hi def link cucumberBackground Define
|
||||
hi def link cucumberScenario Define
|
||||
hi def link cucumberScenarioOutline Define
|
||||
hi def link cucumberExamples Define
|
||||
hi def link cucumberPlaceholder Constant
|
||||
hi def link cucumberDelimiter Delimiter
|
||||
hi def link cucumberTags Tag
|
||||
hi def link cucumberString String
|
||||
hi def link cucumberGiven Conditional
|
||||
hi def link cucumberWhen Function
|
||||
hi def link cucumberThen Type
|
||||
|
||||
let b:current_syntax = "cucumber"
|
||||
|
||||
" vim:set sts=2 sw=2:
|
||||
45
vim/syntax/cvsannotate.vim
Executable file
45
vim/syntax/cvsannotate.vim
Executable file
@@ -0,0 +1,45 @@
|
||||
" Vim syntax file
|
||||
" Language: CVS annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the cvscommand plugin. Originally written by Mathieu
|
||||
" Clabaut
|
||||
" License:
|
||||
" Copyright (c) 2007 Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match cvsDate /\d\d-...-\d\d/ contained
|
||||
syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate
|
||||
syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName
|
||||
syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate
|
||||
|
||||
if !exists("did_cvsannotate_syntax_inits")
|
||||
let did_cvsannotate_syntax_inits = 1
|
||||
hi link cvsDate Comment
|
||||
hi link cvsName Type
|
||||
hi link cvsVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="CVSAnnotate"
|
||||
76
vim/syntax/eruby.vim
Normal file
76
vim/syntax/eruby.vim
Normal file
@@ -0,0 +1,76 @@
|
||||
" Vim syntax file
|
||||
" Language: eRuby
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = 'eruby'
|
||||
endif
|
||||
|
||||
if !exists("g:eruby_default_subtype")
|
||||
let g:eruby_default_subtype = "html"
|
||||
endif
|
||||
|
||||
if !exists("b:eruby_subtype") && main_syntax == 'eruby'
|
||||
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
|
||||
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
|
||||
if b:eruby_subtype == ''
|
||||
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
|
||||
endif
|
||||
if b:eruby_subtype == ''
|
||||
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\)\+$','',''),'\.\zs\w\+$')
|
||||
endif
|
||||
if b:eruby_subtype == 'rhtml'
|
||||
let b:eruby_subtype = 'html'
|
||||
elseif b:eruby_subtype == 'rb'
|
||||
let b:eruby_subtype = 'ruby'
|
||||
elseif b:eruby_subtype == 'yml'
|
||||
let b:eruby_subtype = 'yaml'
|
||||
elseif b:eruby_subtype == 'js'
|
||||
let b:eruby_subtype = 'javascript'
|
||||
elseif b:eruby_subtype == 'txt'
|
||||
" Conventional; not a real file type
|
||||
let b:eruby_subtype = 'text'
|
||||
elseif b:eruby_subtype == ''
|
||||
let b:eruby_subtype = g:eruby_default_subtype
|
||||
endif
|
||||
endif
|
||||
|
||||
if !exists("b:eruby_nest_level")
|
||||
let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g'))
|
||||
endif
|
||||
if !b:eruby_nest_level
|
||||
let b:eruby_nest_level = 1
|
||||
endif
|
||||
|
||||
if exists("b:eruby_subtype") && b:eruby_subtype != ''
|
||||
exe "runtime! syntax/".b:eruby_subtype.".vim"
|
||||
unlet! b:current_syntax
|
||||
endif
|
||||
syn include @rubyTop syntax/ruby.vim
|
||||
|
||||
syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
|
||||
|
||||
exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline'
|
||||
exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend'
|
||||
exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=\{1,4}" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend'
|
||||
exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
|
||||
|
||||
" Define the default highlighting.
|
||||
|
||||
hi def link erubyDelimiter Delimiter
|
||||
hi def link erubyComment Comment
|
||||
|
||||
let b:current_syntax = 'eruby'
|
||||
|
||||
if main_syntax == 'eruby'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8:
|
||||
8
vim/syntax/git-diff.vim
Normal file
8
vim/syntax/git-diff.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
runtime syntax/diff.vim
|
||||
|
||||
syntax match gitDiffStatLine /^ .\{-}\zs[+-]\+$/ contains=gitDiffStatAdd,gitDiffStatDelete
|
||||
syntax match gitDiffStatAdd /+/ contained
|
||||
syntax match gitDiffStatDelete /-/ contained
|
||||
|
||||
highlight gitDiffStatAdd ctermfg=2
|
||||
highlight gitDiffStatDelete ctermfg=5
|
||||
3
vim/syntax/git-log.vim
Normal file
3
vim/syntax/git-log.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
syntax match gitLogCommit +^commit \x\{40}+
|
||||
|
||||
highlight link gitLogCommit Statement
|
||||
18
vim/syntax/git-status.vim
Normal file
18
vim/syntax/git-status.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
runtime syntax/diff.vim
|
||||
setlocal filetype=
|
||||
|
||||
syntax match gitStatusComment +^#.*+ contains=ALL
|
||||
|
||||
syntax match gitStatusBranch +On branch .\++
|
||||
|
||||
syntax match gitStatusUndracked +\t\zs.\++
|
||||
syntax match gitStatusNewFile +\t\zsnew file: .\++
|
||||
syntax match gitStatusModified +\t\zsmodified: .\++
|
||||
|
||||
highlight link gitStatusComment Comment
|
||||
|
||||
highlight link gitStatusBranch Title
|
||||
|
||||
highlight link gitStatusUndracked diffOnly
|
||||
highlight link gitStatusNewFile diffAdded
|
||||
highlight link gitStatusModified diffChanged
|
||||
67
vim/syntax/git.vim
Normal file
67
vim/syntax/git.vim
Normal file
@@ -0,0 +1,67 @@
|
||||
" Vim syntax file
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Last Change: 2008 Mar 21
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
syn sync minlines=50
|
||||
|
||||
syn include @gitDiff syntax/diff.vim
|
||||
|
||||
syn region gitHead start=/\%^/ end=/^$/
|
||||
syn region gitHead start=/\%(^commit \x\{40\}$\)\@=/ end=/^$/
|
||||
|
||||
" For git reflog and git show ...^{tree}, avoid sync issues
|
||||
syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/
|
||||
syn match gitHead /^\x\{40\} \x\{40}\t.*/
|
||||
|
||||
syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --git \|$\)\@=/ contains=@gitDiff fold
|
||||
syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --git \|$\)\@=/ contains=@gitDiff
|
||||
|
||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
|
||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
|
||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitMode /^\d\{6\}/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
||||
syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
|
||||
syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite
|
||||
syn region gitEmail matchgroup=gitEmailDelimiter start=/</ end=/>/ keepend oneline contained containedin=gitIdentity
|
||||
|
||||
syn match gitReflogHeader /^Reflog:/ contained containedin=gitHead nextgroup=gitReflogMiddle skipwhite
|
||||
syn match gitReflogHeader /^Reflog message:/ contained containedin=gitHead skipwhite
|
||||
syn match gitReflogMiddle /\S\+@{\d\+} (/he=e-2 nextgroup=gitIdentity
|
||||
|
||||
syn match gitDate /\<\u\l\l \u\l\l \d\=\d \d\d:\d\d:\d\d \d\d\d\d [+-]\d\d\d\d/ contained
|
||||
syn match gitDate /-\=\d\+ [+-]\d\d\d\d\>/ contained
|
||||
syn match gitDate /\<\d\+ \l\+ ago\>/ contained
|
||||
syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHash skipwhite
|
||||
syn match gitStage /\<\d\t\@=/ contained
|
||||
syn match gitReference /\S\+\S\@!/ contained
|
||||
syn match gitHash /\<\x\{40\}\>/ contained nextgroup=gitIdentity,gitStage skipwhite
|
||||
syn match gitHash /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite
|
||||
syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitHashAbbrev /\<\x\{40\}\>/ contained nextgroup=gitHashAbbrev skipwhite
|
||||
|
||||
hi def link gitDateHeader gitIdentityHeader
|
||||
hi def link gitIdentityHeader gitIdentityKeyword
|
||||
hi def link gitIdentityKeyword Label
|
||||
hi def link gitReflogHeader gitKeyword
|
||||
hi def link gitKeyword Keyword
|
||||
hi def link gitIdentity String
|
||||
hi def link gitEmailDelimiter Delimiter
|
||||
hi def link gitEmail Special
|
||||
hi def link gitDate Number
|
||||
hi def link gitMode Number
|
||||
hi def link gitHashAbbrev gitHash
|
||||
hi def link gitHash Identifier
|
||||
hi def link gitReflogMiddle gitReference
|
||||
hi def link gitReference Function
|
||||
hi def link gitStage gitType
|
||||
hi def link gitType Type
|
||||
|
||||
let b:current_syntax = "git"
|
||||
44
vim/syntax/gitannotate.vim
Executable file
44
vim/syntax/gitannotate.vim
Executable file
@@ -0,0 +1,44 @@
|
||||
" Vim syntax file
|
||||
" Language: git annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) 2009 Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained
|
||||
syn match gitCommit /^\^\?\x\+/ contained
|
||||
syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained
|
||||
syn match gitLineNumber /\d\+)\@=/ contained
|
||||
syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName
|
||||
|
||||
if !exists("did_gitannotate_syntax_inits")
|
||||
let did_gitannotate_syntax_inits = 1
|
||||
hi link gitName Type
|
||||
hi link gitCommit Statement
|
||||
hi link gitDate Comment
|
||||
hi link gitLineNumber Label
|
||||
endif
|
||||
|
||||
let b:current_syntax="gitAnnotate"
|
||||
65
vim/syntax/gitcommit.vim
Normal file
65
vim/syntax/gitcommit.vim
Normal file
@@ -0,0 +1,65 @@
|
||||
" Vim syntax file
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: *.git/COMMIT_EDITMSG
|
||||
" Last Change: 2008 Apr 09
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
syn sync minlines=50
|
||||
|
||||
if has("spell")
|
||||
syn spell toplevel
|
||||
endif
|
||||
|
||||
syn include @gitcommitDiff syntax/diff.vim
|
||||
syn region gitcommitDiff start=/\%(^diff --git \)\@=/ end=/^$\|^#\@=/ contains=@gitcommitDiff
|
||||
|
||||
syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
|
||||
syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
|
||||
syn match gitcommitOverflow ".*" contained contains=@Spell
|
||||
syn match gitcommitBlank "^[^#].*" contained contains=@Spell
|
||||
syn match gitcommitComment "^#.*"
|
||||
syn region gitcommitHead start=/^# / end=/^#$/ contained transparent
|
||||
syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
|
||||
syn match gitcommitBranch "\S\+" contained
|
||||
syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
|
||||
|
||||
syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
|
||||
syn match gitcommitUntrackedFile "\t\@<=.*" contained
|
||||
|
||||
syn region gitcommitDiscarded start=/^# Changed but not updated:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
|
||||
syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold
|
||||
|
||||
syn match gitcommitDiscardedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite
|
||||
syn match gitcommitSelectedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite
|
||||
syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow
|
||||
syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
|
||||
syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile
|
||||
syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile
|
||||
|
||||
hi def link gitcommitSummary Keyword
|
||||
hi def link gitcommitComment Comment
|
||||
hi def link gitcommitUntracked gitcommitComment
|
||||
hi def link gitcommitDiscarded gitcommitComment
|
||||
hi def link gitcommitSelected gitcommitComment
|
||||
hi def link gitcommitOnBranch Comment
|
||||
hi def link gitcommitBranch Special
|
||||
hi def link gitcommitDiscardedType gitcommitType
|
||||
hi def link gitcommitSelectedType gitcommitType
|
||||
hi def link gitcommitType Type
|
||||
hi def link gitcommitHeader PreProc
|
||||
hi def link gitcommitUntrackedFile gitcommitFile
|
||||
hi def link gitcommitDiscardedFile gitcommitFile
|
||||
hi def link gitcommitSelectedFile gitcommitFile
|
||||
hi def link gitcommitFile Constant
|
||||
hi def link gitcommitDiscardedArrow gitcommitArrow
|
||||
hi def link gitcommitSelectedArrow gitcommitArrow
|
||||
hi def link gitcommitArrow gitcommitComment
|
||||
"hi def link gitcommitOverflow Error
|
||||
hi def link gitcommitBlank Error
|
||||
|
||||
let b:current_syntax = "gitcommit"
|
||||
37
vim/syntax/gitconfig.vim
Normal file
37
vim/syntax/gitconfig.vim
Normal file
@@ -0,0 +1,37 @@
|
||||
" Vim syntax file
|
||||
" Language: git config file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: gitconfig, .gitconfig, *.git/config
|
||||
" Last Change: 2007 Dec 16
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
setlocal iskeyword+=-
|
||||
setlocal iskeyword-=_
|
||||
|
||||
syn match gitconfigComment "[#;].*"
|
||||
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
|
||||
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
|
||||
syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
|
||||
syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
|
||||
syn keyword gitconfigBoolean true false yes no contained
|
||||
syn match gitconfigNumber "\d\+" contained
|
||||
syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
|
||||
syn match gitconfigError +\\.+ contained
|
||||
syn match gitconfigEscape +\\[\\"ntb]+ contained
|
||||
syn match gitconfigEscape +\\$+ contained
|
||||
|
||||
hi def link gitconfigComment Comment
|
||||
hi def link gitconfigSection Keyword
|
||||
hi def link gitconfigVariable Identifier
|
||||
hi def link gitconfigBoolean Boolean
|
||||
hi def link gitconfigNumber Number
|
||||
hi def link gitconfigString String
|
||||
hi def link gitconfigDelim Delimiter
|
||||
hi def link gitconfigEscape Delimiter
|
||||
hi def link gitconfigError Error
|
||||
|
||||
let b:current_syntax = "gitconfig"
|
||||
31
vim/syntax/gitrebase.vim
Normal file
31
vim/syntax/gitrebase.vim
Normal file
@@ -0,0 +1,31 @@
|
||||
" Vim syntax file
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: git-rebase-todo
|
||||
" Last Change: 2008 Apr 16
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn match gitrebaseHash "\v<\x{7,40}>" contained
|
||||
syn match gitrebaseCommit "\v<\x{7,40}>" nextgroup=gitrebaseSummary skipwhite
|
||||
syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
||||
syn match gitrebaseComment "^#.*" contains=gitrebaseHash
|
||||
syn match gitrebaseSquashError "\v%^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
|
||||
hi def link gitrebaseCommit gitrebaseHash
|
||||
hi def link gitrebaseHash Identifier
|
||||
hi def link gitrebasePick Statement
|
||||
hi def link gitrebaseEdit PreProc
|
||||
hi def link gitrebaseSquash Type
|
||||
hi def link gitrebaseSummary String
|
||||
hi def link gitrebaseComment Comment
|
||||
hi def link gitrebaseSquashError Error
|
||||
|
||||
let b:current_syntax = "gitrebase"
|
||||
19
vim/syntax/gitsendemail.vim
Normal file
19
vim/syntax/gitsendemail.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim syntax file
|
||||
" Language: git send-email message
|
||||
" Maintainer: Tim Pope
|
||||
" Filenames: *.msg.[0-9]* (first line is "From ... # This line is ignored.")
|
||||
" Last Change: 2007 Dec 16
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/mail.vim
|
||||
syn case match
|
||||
|
||||
syn match gitsendemailComment "\%^From.*#.*"
|
||||
syn match gitsendemailComment "^GIT:.*"
|
||||
|
||||
hi def link gitsendemailComment Comment
|
||||
|
||||
let b:current_syntax = "gitsendemail"
|
||||
91
vim/syntax/haml.vim
Normal file
91
vim/syntax/haml.vim
Normal file
@@ -0,0 +1,91 @@
|
||||
" Vim syntax file
|
||||
" Language: Haml
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: *.haml
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = 'haml'
|
||||
endif
|
||||
let b:ruby_no_expensive = 1
|
||||
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
silent! syn include @hamlSassTop syntax/sass.vim
|
||||
unlet! b:current_syntax
|
||||
syn include @hamlRubyTop syntax/ruby.vim
|
||||
|
||||
syn case match
|
||||
|
||||
syn cluster hamlComponent contains=hamlAttributes,hamlClassChar,hamlIdChar,hamlObject,hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable
|
||||
syn cluster hamlEmbeddedRuby contains=hamlAttributes,hamlObject,hamlRuby,hamlRubyFilter
|
||||
syn cluster hamlTop contains=hamlBegin,hamlPlainFilter,hamlRubyFilter,hamlSassFilter,hamlComment,hamlHtmlComment
|
||||
|
||||
syn match hamlBegin "^\s*\%([<>]\|&[^=~]\)\@!" nextgroup=hamlTag,hamlAttributes,hamlClassChar,hamlIdChar,hamlObject,hamlRuby,hamlPlainChar,hamlInterpolatable
|
||||
|
||||
syn match hamlTag "%\w\+" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@hamlComponent
|
||||
syn region hamlAttributes matchgroup=hamlAttributesDelimiter start="{" end="}" contained contains=@hamlRubyTop nextgroup=@hamlComponent
|
||||
syn region hamlObject matchgroup=hamlObjectDelimiter start="\[" end="\]" contained contains=@hamlRubyTop nextgroup=@hamlComponent
|
||||
syn match hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable
|
||||
syn match hamlSelfCloser "/" contained
|
||||
syn match hamlClassChar "\." contained nextgroup=hamlClass
|
||||
syn match hamlIdChar "#" contained nextgroup=hamlId
|
||||
syn match hamlClass "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
|
||||
syn match hamlId "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
|
||||
syn region hamlDocType start="^\s*!!!" end="$"
|
||||
|
||||
syn region hamlRuby matchgroup=hamlRubyOutputChar start="[!&]\==\|\~" end="$" contained contains=@hamlRubyTop keepend
|
||||
syn region hamlRuby matchgroup=hamlRubyChar start="-" end="$" contained contains=@hamlRubyTop keepend
|
||||
syn match hamlPlainChar "\\" contained
|
||||
syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="!\===" end="$" keepend contained contains=hamlInterpolation,@hamlHtmlTop
|
||||
syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="&==" end="$" keepend contained contains=hamlInterpolation
|
||||
syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contained contains=@hamlRubyTop
|
||||
syn region hamlErbInterpolation matchgroup=hamlInterpolationDelimiter start="<%[=-]\=" end="-\=%>" contained contains=@hamlRubyTop
|
||||
|
||||
syn match hamlHelper "\<action_view?\|\.\@<!\<\%(flatten\|open\|puts\)" contained containedin=@hamlEmbeddedRuby,@hamlRubyTop,rubyInterpolation
|
||||
syn keyword hamlHelper capture_haml find_and_preserve html_attrs init_haml_helpers list_of preced preserve succeed surround tab_down tab_up page_class contained containedin=@hamlEmbeddedRuby,@hamlRubyTop,rubyInterpolation
|
||||
|
||||
syn cluster hamlHtmlTop contains=@htmlTop,htmlBold,htmlItalic,htmlUnderline
|
||||
syn region hamlPlainFilter matchgroup=hamlFilter start="^\z(\s*\):\%(plain\|preserve\|erb\|redcloth\|textile\|markdown\)\s*$" end="^\%(\z1 \)\@!" contains=@hamlHtmlTop,rubyInterpolation
|
||||
syn region hamlEscapedFilter matchgroup=hamlFilter start="^\z(\s*\):\%(escaped\)\s*$" end="^\%(\z1 \)\@!" contains=rubyInterpolation
|
||||
syn region hamlErbFilter matchgroup=hamlFilter start="^\z(\s*\):erb\s*$" end="^\%(\z1 \)\@!" contains=@hamlHtmlTop,hamlErbInterpolation
|
||||
syn region hamlRubyFilter matchgroup=hamlFilter start="^\z(\s*\):ruby\s*$" end="^\%(\z1 \)\@!" contains=@hamlRubyTop
|
||||
syn region hamlJavascriptFilter matchgroup=hamlFilter start="^\z(\s*\):javascript\s*$" end="^\%(\z1 \)\@!" contains=@htmlJavaScript,rubyInterpolation keepend
|
||||
syn region hamlSassFilter matchgroup=hamlFilter start="^\z(\s*\):sass\s*$" end="^\%(\z1 \)\@!" contains=@hamlSassTop
|
||||
|
||||
syn region hamlJavascriptBlock start="^\z(\s*\)%script" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \)\@!" contains=@hamlTop,@htmlJavaScript keepend
|
||||
syn region hamlCssBlock start="^\z(\s*\)%style" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \)\@!" contains=@hamlTop,@htmlCss keepend
|
||||
syn match hamlError "\$" contained
|
||||
|
||||
syn region hamlComment start="^\z(\s*\)-#" end="^\%(\z1 \)\@!" contains=rubyTodo
|
||||
syn region hamlHtmlComment start="^\z(\s*\)/" end="^\%(\z1 \)\@!" contains=@hamlTop,rubyTodo
|
||||
syn match hamlIEConditional "\%(^\s*/\)\@<=\[if\>[^]]*]" contained containedin=hamlHtmlComment
|
||||
|
||||
hi def link hamlSelfCloser Special
|
||||
hi def link hamlDespacer Special
|
||||
hi def link hamlClassChar Special
|
||||
hi def link hamlIdChar Special
|
||||
hi def link hamlTag Special
|
||||
hi def link hamlClass Type
|
||||
hi def link hamlId Identifier
|
||||
hi def link hamlPlainChar Special
|
||||
hi def link hamlInterpolatableChar hamlRubyChar
|
||||
hi def link hamlRubyOutputChar hamlRubyChar
|
||||
hi def link hamlRubyChar Special
|
||||
hi def link hamlInterpolationDelimiter Delimiter
|
||||
hi def link hamlDocType PreProc
|
||||
hi def link hamlFilter PreProc
|
||||
hi def link hamlAttributesDelimiter Delimiter
|
||||
hi def link hamlObjectDelimiter Delimiter
|
||||
hi def link hamlHelper Function
|
||||
hi def link hamlHtmlComment hamlComment
|
||||
hi def link hamlComment Comment
|
||||
hi def link hamlIEConditional SpecialComment
|
||||
hi def link hamlError Error
|
||||
|
||||
let b:current_syntax = "haml"
|
||||
|
||||
" vim:set sw=2:
|
||||
40
vim/syntax/hgannotate.vim
Executable file
40
vim/syntax/hgannotate.vim
Executable file
@@ -0,0 +1,40 @@
|
||||
" Vim syntax file
|
||||
" Language: HG annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) 2010 Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match hgVer /\d\+/ contained
|
||||
syn match hgName /^\s*\S\+/ contained
|
||||
syn match hgHead /^\s*\S\+\s\+\d\+:/ contains=hgVer,hgName
|
||||
|
||||
if !exists("did_hgannotate_syntax_inits")
|
||||
let did_hgannotate_syntax_inits = 1
|
||||
hi link hgName Type
|
||||
hi link hgVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="hgAnnotate"
|
||||
305
vim/syntax/less.vim
Normal file
305
vim/syntax/less.vim
Normal file
@@ -0,0 +1,305 @@
|
||||
" Vim syntax file
|
||||
" Language: LESS Cascading Style Sheets
|
||||
" Maintainer: Leaf Corcoran <leafot@gmail.com>
|
||||
" Modifier: Bryan J Swift <bryan@bryanjswift.com>
|
||||
" URL: http://leafo.net/lessphp/vim/less.vim
|
||||
" URL: http://gist.github.com/161047
|
||||
" Last Change: 2009 August 4
|
||||
" LESS by Leaf Corcoran
|
||||
" CSS2 by Nikolai Weibull
|
||||
" Full CSS2, HTML4 support by Yeti
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'less'
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
|
||||
|
||||
syn keyword cssTagName abbr acronym address applet area a b base
|
||||
syn keyword cssTagName basefont bdo big blockquote body br button
|
||||
syn keyword cssTagName caption center cite code col colgroup dd del
|
||||
syn keyword cssTagName dfn dir div dl dt em fieldset font form frame
|
||||
syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
|
||||
syn keyword cssTagName iframe img input ins isindex kbd label legend li
|
||||
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
|
||||
syn keyword cssTagName option p param pre q s samp script select small
|
||||
syn keyword cssTagName span strike strong style sub sup tbody td
|
||||
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
|
||||
syn match cssTagName "\<table\>"
|
||||
syn match cssTagName "\*"
|
||||
|
||||
syn match cssTagName "@page\>" nextgroup=cssDefinition
|
||||
|
||||
syn match cssSelectorOp "[+>.]"
|
||||
syn match cssSelectorOp2 "[~|]\?=" contained
|
||||
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-zУ<7A>-УП_@][A-Za-zУ<7A>-УП0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
|
||||
syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
|
||||
syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
|
||||
syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
|
||||
syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
|
||||
|
||||
syn match cssValueInteger "[-+]\=\d\+"
|
||||
syn match cssValueNumber "[-+]\=\d\+\(\.\d*\)\="
|
||||
syn match cssValueLength "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
|
||||
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
|
||||
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
|
||||
|
||||
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
|
||||
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr
|
||||
syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
|
||||
syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline
|
||||
syn keyword cssFontDescriptorAttr contained all
|
||||
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
|
||||
syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
|
||||
syn match cssUnicodeRange contained "U+\x\+-\x\+"
|
||||
|
||||
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
|
||||
" FIXME: These are actually case-insentivie too, but (a) specs recommend using
|
||||
" mixed-case (b) it's hard to highlight the word `Background' correctly in
|
||||
" all situations
|
||||
syn case match
|
||||
syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
|
||||
syn case ignore
|
||||
syn match cssColor contained "\<transparent\>"
|
||||
syn match cssColor contained "\<white\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
|
||||
"syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)"
|
||||
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
|
||||
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn keyword cssCommonAttr contained auto none inherit
|
||||
syn keyword cssCommonAttr contained top bottom
|
||||
syn keyword cssCommonAttr contained medium normal
|
||||
|
||||
syn match cssFontProp contained "\<font\>\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\>\)\="
|
||||
syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
|
||||
syn match cssFontAttr contained "\<small\>\(-\(caps\|caption\)\>\)\="
|
||||
syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>"
|
||||
syn match cssFontAttr contained "\<message-box\>"
|
||||
syn match cssFontAttr contained "\<status-bar\>"
|
||||
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
|
||||
syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
|
||||
syn keyword cssFontAttr contained bold bolder lighter larger smaller
|
||||
syn keyword cssFontAttr contained icon menu
|
||||
syn match cssFontAttr contained "\<caption\>"
|
||||
syn keyword cssFontAttr contained large smaller larger
|
||||
syn keyword cssFontAttr contained narrower wider
|
||||
|
||||
syn keyword cssColorProp contained color
|
||||
syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\="
|
||||
syn keyword cssColorAttr contained center scroll fixed
|
||||
syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
|
||||
syn match cssColorAttr contained "\<no-repeat\>"
|
||||
|
||||
syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
|
||||
syn match cssTextAttr contained "\<line-through\>"
|
||||
syn match cssTextAttr contained "\<text-indent\>"
|
||||
syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
|
||||
syn keyword cssTextAttr contained underline overline blink sub super middle
|
||||
syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
|
||||
|
||||
syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<\(width\|z-index\)\>"
|
||||
syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
|
||||
syn keyword cssBoxProp contained width height float clear overflow clip visibility
|
||||
syn keyword cssBoxAttr contained thin thick both
|
||||
syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssBoxAttr contained hidden visible scroll collapse
|
||||
|
||||
syn keyword cssGeneratedContentProp contained content quotes
|
||||
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
|
||||
syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
|
||||
syn match cssAuralAttr contained "\<lower\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
|
||||
syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
|
||||
syn keyword cssGeneratedContentAttr contained inside outside
|
||||
|
||||
syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
|
||||
syn keyword cssPagingProp contained size marks inside orphans widows
|
||||
syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
|
||||
|
||||
syn keyword cssUIProp contained cursor
|
||||
syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
|
||||
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
|
||||
syn keyword cssUIAttr contained default crosshair pointer move wait help
|
||||
syn keyword cssUIAttr contained thin thick
|
||||
syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssUIAttr contained invert
|
||||
|
||||
syn match cssRenderAttr contained "\<marker\>"
|
||||
syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
|
||||
syn keyword cssRenderProp contained position top bottom direction
|
||||
syn match cssRenderProp contained "\<\(left\|right\)\>"
|
||||
syn keyword cssRenderAttr contained block inline compact
|
||||
syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
|
||||
syn keyword cssRenderAttr contained static relative absolute fixed
|
||||
syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
|
||||
syn match cssRenderAttr contained "\<bidi-override\>"
|
||||
|
||||
syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
|
||||
syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
|
||||
syn keyword cssAuralProp contained volume during azimuth elevation stress richness
|
||||
syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>"
|
||||
syn keyword cssAuralAttr contained silent
|
||||
syn match cssAuralAttr contained "\<spell-out\>"
|
||||
syn keyword cssAuralAttr contained non mix
|
||||
syn match cssAuralAttr contained "\<\(left\|right\)-side\>"
|
||||
syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>"
|
||||
syn keyword cssAuralAttr contained leftwards rightwards behind
|
||||
syn keyword cssAuralAttr contained below level above higher
|
||||
syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
|
||||
syn keyword cssAuralAttr contained faster slower
|
||||
syn keyword cssAuralAttr contained male female child code digits continuous
|
||||
|
||||
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
|
||||
syn keyword cssTableAttr contained fixed collapse separate show hide once always
|
||||
|
||||
|
||||
|
||||
syn match lessComment "//.*$" contains=@Spell
|
||||
syn match lessVariable "@[A-Za-z_-][A-Za-z0-9_-]*" contained
|
||||
syn region lessVariableDefinition start="^@" end=";" contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssDefinition,cssClassName,cssTagName,cssIdentifier,lessComment,lessVariable,lessFunction
|
||||
|
||||
" captures both the definition and the call
|
||||
syn region lessFunction matchgroup=lessFuncDef start="@[A-Za-z_-][A-Za-z0-9_-]*(" end=")" contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssDefinition,cssClassName,cssTagName,cssIdentifier,lessComment,lessVariable,lessFunction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
|
||||
syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
|
||||
syn match cssBraces contained "[{}]"
|
||||
syn match cssError contained "{@<>"
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssDefinition,cssClassName,cssTagName,cssIdentifier,lessComment,lessVariable,lessFunction
|
||||
" syn match cssBraceError "}"
|
||||
|
||||
syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
|
||||
syn keyword cssPseudoClassId contained link visited active hover focus before after left right
|
||||
syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
|
||||
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
|
||||
|
||||
syn region cssComment start="/\*" end="\*/" contains=@Spell
|
||||
|
||||
syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
|
||||
syn match cssSpecialCharQQ +\\"+ contained
|
||||
syn match cssSpecialCharQ +\\'+ contained
|
||||
syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
|
||||
syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
|
||||
|
||||
|
||||
|
||||
|
||||
if main_syntax == "css"
|
||||
syn sync minlines=10
|
||||
endif
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_less_syn_inits")
|
||||
if version < 508
|
||||
let did_less_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink lessComment Comment
|
||||
HiLink lessVariable Special
|
||||
HiLink lessFuncDef Function
|
||||
HiLink cssComment Comment
|
||||
HiLink cssTagName Statement
|
||||
HiLink cssSelectorOp Special
|
||||
HiLink cssSelectorOp2 Special
|
||||
HiLink cssFontProp StorageClass
|
||||
HiLink cssColorProp storageClass
|
||||
HiLink cssTextProp StorageClass
|
||||
HiLink cssBoxProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssAuralProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssGeneratedContentProp StorageClass
|
||||
HiLink cssPagingProp StorageClass
|
||||
HiLink cssTableProp StorageClass
|
||||
HiLink cssUIProp StorageClass
|
||||
HiLink cssFontAttr Type
|
||||
HiLink cssColorAttr Type
|
||||
HiLink cssTextAttr Type
|
||||
HiLink cssBoxAttr Type
|
||||
HiLink cssRenderAttr Type
|
||||
HiLink cssAuralAttr Type
|
||||
HiLink cssGeneratedContentAttr Type
|
||||
HiLink cssPagingAttr Type
|
||||
HiLink cssTableAttr Type
|
||||
HiLink cssUIAttr Type
|
||||
HiLink cssCommonAttr Type
|
||||
HiLink cssPseudoClassId PreProc
|
||||
HiLink cssPseudoClassLang Constant
|
||||
HiLink cssValueLength Number
|
||||
HiLink cssValueInteger Number
|
||||
HiLink cssValueNumber Number
|
||||
HiLink cssValueAngle Number
|
||||
HiLink cssValueTime Number
|
||||
HiLink cssValueFrequency Number
|
||||
HiLink cssFunction Constant
|
||||
HiLink cssURL String
|
||||
HiLink cssFunctionName Function
|
||||
HiLink cssColor Constant
|
||||
HiLink cssIdentifier Function
|
||||
HiLink cssInclude Include
|
||||
HiLink cssImportant Special
|
||||
HiLink cssBraces SpecialChar
|
||||
HiLink cssBraceError Error
|
||||
HiLink cssError Error
|
||||
HiLink cssInclude Include
|
||||
HiLink cssUnicodeEscape Special
|
||||
HiLink cssStringQQ String
|
||||
HiLink cssStringQ String
|
||||
HiLink cssMedia Special
|
||||
HiLink cssMediaType Special
|
||||
HiLink cssMediaComma Normal
|
||||
HiLink cssFontDescriptor Special
|
||||
HiLink cssFontDescriptorFunction Constant
|
||||
HiLink cssFontDescriptorProp StorageClass
|
||||
HiLink cssFontDescriptorAttr Type
|
||||
HiLink cssUnicodeRange Constant
|
||||
HiLink cssClassName Function
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "less"
|
||||
|
||||
if main_syntax == 'less'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
369
vim/syntax/ruby.vim
Normal file
369
vim/syntax/ruby.vim
Normal file
@@ -0,0 +1,369 @@
|
||||
" Vim syntax file
|
||||
" Language: Ruby
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Previous Maintainer: Mirko Nasato
|
||||
" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN)
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if has("folding") && exists("ruby_fold")
|
||||
setlocal foldmethod=syntax
|
||||
endif
|
||||
|
||||
syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo
|
||||
|
||||
if exists("ruby_space_errors")
|
||||
if !exists("ruby_no_trail_space_error")
|
||||
syn match rubySpaceError display excludenl "\s\+$"
|
||||
endif
|
||||
if !exists("ruby_no_tab_space_error")
|
||||
syn match rubySpaceError display " \+\t"me=e-1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Operators
|
||||
if exists("ruby_operators")
|
||||
syn match rubyOperator "\%([~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::\)"
|
||||
syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)"
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop
|
||||
endif
|
||||
|
||||
" Expression Substitution and Backslash Notation
|
||||
syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
|
||||
syn match rubyQuoteEscape "\\[\\']" contained display
|
||||
|
||||
syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop
|
||||
syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable
|
||||
syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained
|
||||
syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable
|
||||
syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained
|
||||
syn region rubyNoInterpolation start="\\#{" end="}" contained
|
||||
syn match rubyNoInterpolation "\\#{" display contained
|
||||
syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
|
||||
syn match rubyNoInterpolation "\\#\$\W" display contained
|
||||
|
||||
syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
|
||||
|
||||
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained
|
||||
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained
|
||||
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained
|
||||
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained
|
||||
|
||||
" These are mostly Oniguruma ready
|
||||
syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained
|
||||
syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial
|
||||
syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline
|
||||
syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display
|
||||
syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained
|
||||
syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained
|
||||
syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display
|
||||
syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
|
||||
syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display
|
||||
syn match rubyRegexpDot "\." contained display
|
||||
syn match rubyRegexpSpecial "|" contained display
|
||||
syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display
|
||||
syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display
|
||||
syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display
|
||||
syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display
|
||||
syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
|
||||
|
||||
syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape
|
||||
syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets
|
||||
syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment
|
||||
|
||||
" Numbers and ASCII Codes
|
||||
syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display
|
||||
|
||||
" Identifiers
|
||||
syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
|
||||
syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
|
||||
|
||||
syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"
|
||||
syn match rubyClassVariable "@@\h\w*" display
|
||||
syn match rubyInstanceVariable "@\h\w*" display
|
||||
syn match rubyGlobalVariable "$\%(\h\w*\|-.\)"
|
||||
syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
|
||||
syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
|
||||
syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\h\w*"
|
||||
syn match rubySymbol "[]})\"':]\@<!:\h\w*\%([?!=]>\@!\)\="
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
|
||||
syn match rubySymbol "[]})\"':]\@<!\h\w*[!?]\=:\s\@="he=e-1
|
||||
syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
||||
syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
||||
|
||||
syn match rubyBlockParameter "\h\w*" contained
|
||||
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter
|
||||
|
||||
syn match rubyInvalidVariable "$[^ A-Za-z_-]"
|
||||
syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]#
|
||||
syn match rubyPredefinedVariable "$_\>" display
|
||||
syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display
|
||||
syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
|
||||
syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
|
||||
syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
|
||||
syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>\%(\s*(\)\@!"
|
||||
syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
|
||||
"Obsolete Global Constants
|
||||
"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(PLATFORM\|RELEASE_DATE\|VERSION\)\>"
|
||||
"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(NotImplementError\)\>"
|
||||
|
||||
" Normal Regular Expression
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial keepend fold
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
|
||||
|
||||
" Generalized Regular Expression
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
||||
|
||||
" Normal String and Shell Command Output
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
||||
|
||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape
|
||||
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
|
||||
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
|
||||
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
|
||||
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
|
||||
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape
|
||||
|
||||
" Generalized Double Quoted String and Array of Strings and Shell Command Output
|
||||
" Note: %= is not matched here as the beginning of a double quoted string
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold
|
||||
|
||||
" Here Document
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\h\w*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart fold keepend
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
|
||||
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend
|
||||
syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
|
||||
|
||||
if exists('main_syntax') && main_syntax == 'eruby'
|
||||
let b:ruby_no_expensive = 1
|
||||
end
|
||||
|
||||
syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable nextgroup=rubyAliasDeclaration2 skipwhite
|
||||
syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable
|
||||
syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
|
||||
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator
|
||||
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator
|
||||
syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration
|
||||
syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
|
||||
syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
|
||||
|
||||
syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter
|
||||
|
||||
" Keywords
|
||||
" Note: the following keywords have already been defined:
|
||||
" begin case class def do end for if module unless until while
|
||||
syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!"
|
||||
syn match rubyOperator "\<defined?" display
|
||||
syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!"
|
||||
syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<\%(nil\|self\|__FILE__\|__LINE__\)\>[?!]\@!"
|
||||
syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!"
|
||||
|
||||
" Expensive Mode - match 'end' with the appropriate opening keyword for syntax
|
||||
" based folding and special highlighting of module/class/method definitions
|
||||
if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<undef\>" nextgroup=rubyFunction skipwhite skipnl
|
||||
syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
|
||||
syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
|
||||
" modifiers
|
||||
syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display
|
||||
syn match rubyRepeatModifier "\<\%(while\|until\)\>" display
|
||||
|
||||
syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
" curly bracket block or hash literal
|
||||
syn region rubyCurlyBlock start="{" end="}" contains=ALLBUT,@rubyNotTop fold
|
||||
syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold
|
||||
|
||||
" statements without 'do'
|
||||
syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
|
||||
|
||||
syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression
|
||||
syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression
|
||||
|
||||
syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression
|
||||
syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock
|
||||
|
||||
" statements with optional 'do'
|
||||
syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold
|
||||
|
||||
if !exists("ruby_minlines")
|
||||
let ruby_minlines = 50
|
||||
endif
|
||||
exec "syn sync minlines=" . ruby_minlines
|
||||
|
||||
else
|
||||
syn match rubyControl "\<def\>[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<class\>[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<module\>[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!"
|
||||
syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!"
|
||||
endif
|
||||
|
||||
" Special Methods
|
||||
if !exists("ruby_no_special_methods")
|
||||
syn keyword rubyAccess public protected private module_function
|
||||
" attr is a common variable name
|
||||
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
|
||||
syn keyword rubyAttribute attr_accessor attr_reader attr_writer
|
||||
syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)"
|
||||
syn keyword rubyEval eval class_eval instance_eval module_eval
|
||||
syn keyword rubyException raise fail catch throw
|
||||
" false positive with 'include?'
|
||||
syn match rubyInclude "\<include\>[?!]\@!"
|
||||
syn keyword rubyInclude autoload extend load require
|
||||
syn keyword rubyKeyword callcc caller lambda proc
|
||||
endif
|
||||
|
||||
" Comments and Documentation
|
||||
syn match rubySharpBang "\%^#!.*" display
|
||||
syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX contained
|
||||
syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell
|
||||
if !exists("ruby_no_comment_fold")
|
||||
syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend
|
||||
syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell fold
|
||||
else
|
||||
syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell
|
||||
endif
|
||||
|
||||
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|and\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\|module\|next\|nil\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|rescue\|retry\|return\|self\|super\|then\|true\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" transparent contains=NONE
|
||||
|
||||
syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE
|
||||
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|attr\|attr_accessor\|attr_reader\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(attr_writer\|autoload\|callcc\|catch\|caller\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(eval\|class_eval\|instance_eval\|module_eval\|exit\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fail\|fork\|include\|lambda\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(load\|loop\|private\|proc\|protected\)\>" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|raise\|throw\|trap\)\>" transparent contains=NONE
|
||||
|
||||
" __END__ Directive
|
||||
syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold
|
||||
|
||||
hi def link rubyClass rubyDefine
|
||||
hi def link rubyModule rubyDefine
|
||||
hi def link rubyMethodExceptional rubyDefine
|
||||
hi def link rubyDefine Define
|
||||
hi def link rubyFunction Function
|
||||
hi def link rubyConditional Conditional
|
||||
hi def link rubyConditionalModifier rubyConditional
|
||||
hi def link rubyExceptional rubyConditional
|
||||
hi def link rubyRepeat Repeat
|
||||
hi def link rubyRepeatModifier rubyRepeat
|
||||
hi def link rubyOptionalDo rubyRepeat
|
||||
hi def link rubyControl Statement
|
||||
hi def link rubyInclude Include
|
||||
hi def link rubyInteger Number
|
||||
hi def link rubyASCIICode Character
|
||||
hi def link rubyFloat Float
|
||||
hi def link rubyBoolean Boolean
|
||||
hi def link rubyException Exception
|
||||
if !exists("ruby_no_identifiers")
|
||||
hi def link rubyIdentifier Identifier
|
||||
else
|
||||
hi def link rubyIdentifier NONE
|
||||
endif
|
||||
hi def link rubyClassVariable rubyIdentifier
|
||||
hi def link rubyConstant Type
|
||||
hi def link rubyGlobalVariable rubyIdentifier
|
||||
hi def link rubyBlockParameter rubyIdentifier
|
||||
hi def link rubyInstanceVariable rubyIdentifier
|
||||
hi def link rubyPredefinedIdentifier rubyIdentifier
|
||||
hi def link rubyPredefinedConstant rubyPredefinedIdentifier
|
||||
hi def link rubyPredefinedVariable rubyPredefinedIdentifier
|
||||
hi def link rubySymbol Constant
|
||||
hi def link rubyKeyword Keyword
|
||||
hi def link rubyOperator Operator
|
||||
hi def link rubyPseudoOperator rubyOperator
|
||||
hi def link rubyBeginEnd Statement
|
||||
hi def link rubyAccess Statement
|
||||
hi def link rubyAttribute Statement
|
||||
hi def link rubyEval Statement
|
||||
hi def link rubyPseudoVariable Constant
|
||||
|
||||
hi def link rubyComment Comment
|
||||
hi def link rubyData Comment
|
||||
hi def link rubyDataDirective Delimiter
|
||||
hi def link rubyDocumentation Comment
|
||||
hi def link rubyTodo Todo
|
||||
|
||||
hi def link rubyQuoteEscape rubyStringEscape
|
||||
hi def link rubyStringEscape Special
|
||||
hi def link rubyInterpolationDelimiter Delimiter
|
||||
hi def link rubyNoInterpolation rubyString
|
||||
hi def link rubySharpBang PreProc
|
||||
hi def link rubyRegexpDelimiter rubyStringDelimiter
|
||||
hi def link rubySymbolDelimiter rubyStringDelimiter
|
||||
hi def link rubyStringDelimiter Delimiter
|
||||
hi def link rubyString String
|
||||
hi def link rubyRegexpEscape rubyRegexpSpecial
|
||||
hi def link rubyRegexpQuantifier rubyRegexpSpecial
|
||||
hi def link rubyRegexpAnchor rubyRegexpSpecial
|
||||
hi def link rubyRegexpDot rubyRegexpCharClass
|
||||
hi def link rubyRegexpCharClass rubyRegexpSpecial
|
||||
hi def link rubyRegexpSpecial Special
|
||||
hi def link rubyRegexpComment Comment
|
||||
hi def link rubyRegexp rubyString
|
||||
|
||||
hi def link rubyInvalidVariable Error
|
||||
hi def link rubyError Error
|
||||
hi def link rubySpaceError rubyError
|
||||
|
||||
let b:current_syntax = "ruby"
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
56
vim/syntax/sass.vim
Normal file
56
vim/syntax/sass.vim
Normal file
@@ -0,0 +1,56 @@
|
||||
" Vim syntax file
|
||||
" Language: Sass
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: *.sass
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/css.vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
|
||||
syn cluster sassCssAttributes contains=css.*Attr,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
|
||||
|
||||
syn match sassProperty "^\s*\zs\s\%([[:alnum:]-]\+:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute
|
||||
syn match sassCssAttribute ".*$" contained contains=@sassCssAttributes,sassConstant
|
||||
syn match sassConstant "![[:alnum:]_-]\+"
|
||||
syn match sassConstantAssignment "\%(![[:alnum:]_]\+\s*\)\@<==" nextgroup=sassCssAttribute skipwhite
|
||||
syn match sassMixin "^=.*"
|
||||
syn match sassMixing "^\s\+\zs+.*"
|
||||
|
||||
syn match sassEscape "^\s*\zs\\"
|
||||
syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId
|
||||
syn match sassId "[[:alnum:]_-]\+" contained
|
||||
syn match sassClassChar "\.[[:alnum:]_-]\@=" nextgroup=sassClass
|
||||
syn match sassClass "[[:alnum:]_-]\+" contained
|
||||
syn match sassAmpersand "&"
|
||||
|
||||
" TODO: Attribute namespaces
|
||||
" TODO: Arithmetic (including strings and concatenation)
|
||||
|
||||
syn region sassInclude start="@import" end=";\|$" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
|
||||
|
||||
syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained
|
||||
syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo
|
||||
syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo
|
||||
|
||||
hi def link sassCssComment sassComment
|
||||
hi def link sassComment Comment
|
||||
hi def link sassConstant Identifier
|
||||
hi def link sassMixing PreProc
|
||||
hi def link sassMixin PreProc
|
||||
hi def link sassTodo Todo
|
||||
hi def link sassInclude Include
|
||||
hi def link sassEscape Special
|
||||
hi def link sassIdChar Special
|
||||
hi def link sassClassChar Special
|
||||
hi def link sassAmpersand Character
|
||||
hi def link sassId Identifier
|
||||
hi def link sassClass Type
|
||||
|
||||
let b:current_syntax = "sass"
|
||||
|
||||
" vim:set sw=2:
|
||||
42
vim/syntax/svkannotate.vim
Executable file
42
vim/syntax/svkannotate.vim
Executable file
@@ -0,0 +1,42 @@
|
||||
" Vim syntax file
|
||||
" Language: SVK annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) 2007 Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained
|
||||
syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite
|
||||
syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite
|
||||
syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline
|
||||
|
||||
if !exists("did_svkannotate_syntax_inits")
|
||||
let did_svkannotate_syntax_inits = 1
|
||||
hi link svkName Type
|
||||
hi link svkDate Comment
|
||||
hi link svkVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="svkAnnotate"
|
||||
40
vim/syntax/svnannotate.vim
Executable file
40
vim/syntax/svnannotate.vim
Executable file
@@ -0,0 +1,40 @@
|
||||
" Vim syntax file
|
||||
" Language: SVN annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) 2007 Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match svnName /\S\+/ contained
|
||||
syn match svnVer /^\s\+\zs\d\+/ contained nextgroup=svnName skipwhite
|
||||
syn match svnHead /^\s\+\d\+\s\+\S\+/ contains=svnVer,svnName
|
||||
|
||||
if !exists("did_svnannotate_syntax_inits")
|
||||
let did_svnannotate_syntax_inits = 1
|
||||
hi link svnName Type
|
||||
hi link svnVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="svnAnnotate"
|
||||
31
vim/syntax/vcscommit.vim
Executable file
31
vim/syntax/vcscommit.vim
Executable file
@@ -0,0 +1,31 @@
|
||||
" Vim syntax file
|
||||
" Language: VCS commit file
|
||||
" Maintainer: Bob Hiestand (bob.hiestand@gmail.com)
|
||||
" License:
|
||||
" Copyright (c) 2007 Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax region vcsComment start="^VCS: " end="$"
|
||||
highlight link vcsComment Comment
|
||||
let b:current_syntax = "vcscommit"
|
||||
Reference in New Issue
Block a user