Changeset 2142


Ignore:
Timestamp:
Dec 15, 2012, 10:15:47 PM (7 years ago)
Author:
sam
Message:

vimlol: improve the LolFx syntax handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/vimlol/vimlol.vim

    r2135 r2142  
    4242
    4343"""
    44 """ For now, pretend .lolfx is C++
     44""" LolFx language handler
    4545"""
    46 au BufRead,BufNewFile *.lolfx let b:current_syntax = "cpp"
    4746
     47" For now, pretend .lolfx is C++
     48au BufRead,BufNewFile *.lolfx set syntax=cpp
     49
     50" New sampler types (GLSL)
     51au BufRead,BufNewFile *.lolfx syn match cType
     52   \ "\<sampler\(\([12]D\|Cube\)\(Array\|\)\(Shadow\|\)\)\>"
     53   \ "\<sampler\(3D\|2DRect\|Buffer\|2DMS\|2DMSArray\|2DRectShadow\)\>"
     54
     55" Type constructs (LolFx)
     56au BufRead,BufNewFile *.lolfx syn keyword cppStructure
     57   \ technique pass precision
     58
     59" Variable attributes (GLSL and some HLSL)
     60au BufRead,BufNewFile *.lolfx syn keyword cType
     61   \ in out uniform attribute varying
     62
     63" Texture operators (GLSL and HLSL)
     64au BufRead,BufNewFile *.lolfx syn keyword cppOperator
     65   \ texture1D texture2D texture3D tex2D tex3D
     66
     67" Handle #version constructs
     68au BufRead,BufNewFile *.lolfx syn region cPreProc start="^\s*\(%:\|#\)\s*version\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
     69
Note: See TracChangeset for help on using the changeset viewer.