Skip to content

Instantly share code, notes, and snippets.

@FireyFly
Last active May 31, 2016 04:27
Show Gist options
  • Save FireyFly/1e0ae978e2f9aac5ff0eb68baca40502 to your computer and use it in GitHub Desktop.
Save FireyFly/1e0ae978e2f9aac5ff0eb68baca40502 to your computer and use it in GitHub Desktop.
FactoryIdle syntax file.
" FireFly's FactoryIdle vim syntax file.
" Check that a syntax file hasn't been loaded already.
if exists("b:current_syntax")
finish
endif
"" Syntax """""""""""""""""""
syn match facDesignLine "^\s.*" contains=@facDesign,facDesignComment
syn match facDesignComment "\[.*\]" contained
syn match facStaticWall "#" contained
syn match facStaticFloor "\." contained
syn match facStaticSemi "," contained
syn match facConveyor "[─│┘└┐┌┤├┴┬┼]" contained
syn match facUtilRecycle "%" contained
syn match facUtilResearch "@" contained
syn match facUtilLab "&" contained
syn match facUtilSeller "\$" contained
syn match facBuyerCoal "c" contained
syn match facBuyerGas "g" contained
syn match facBuyerIron "i" contained
syn match facBuyerOil "o" contained
syn match facBuyerSilicon "s" contained
syn match facMakerElec "E" contained
syn match facMakerIron "I" contained
syn match facMakerPlastic "P" contained
syn match facMakerSteel "S" contained
syn cluster facStatic contains=facStaticWall,facStaticFloor,facStaticSemi
syn cluster facUtil contains=facUtilRecycle,facUtilResearch,facUtilLab,facUtilSeller
syn cluster facBuyer contains=facBuyerCoal,facBuyerGas,facBuyerIron,facBuyerOil,facBuyerSilicon
syn cluster facMaker contains=facMakerIron,facMakerPlastic,facMakerSteel,facMakerElec
syn cluster facDesign contains=facConveyor,@facStatic,@facUtil,@facBuyer,@facMaker
"" Highlighting """""""""""""
hi link facDesignComment Comment
hi facStaticWall ctermbg=7 ctermfg=8
hi facStaticFloor ctermfg=8
hi facStaticSemi ctermfg=2
hi facUtilRecycle ctermfg=10
hi facUtilResearch ctermfg=14
hi facUtilLab ctermbg=4 ctermfg=14
hi facUtilSeller ctermfg=3
hi facBuyerCoal ctermbg=8 ctermfg=0
hi facBuyerGas ctermbg=6 ctermfg=0
hi facBuyerIron ctermbg=1 ctermfg=7
hi facBuyerOil ctermbg=5 ctermfg=0
hi facBuyerSilicon ctermbg=8 ctermfg=7
hi facMakerIron ctermbg=1 ctermfg=7
hi facMakerPlastic ctermbg=3 ctermfg=0
hi facMakerSteel ctermbg=8 ctermfg=7
hi facMakerElec ctermbg=2 ctermfg=0
let b:current_syntax = "factoryidle"
## Legend
┼ [Conveyor]
% [Recycle]
@ [Research]
& [Lab]
$ [Seller]
c [Coal buyer]
g [Gas buyer]
i [Iron buyer]
o [Oil buyer]
I [Iron foundry]
P [Plastic maker]
S [Steel foundry]
## Plastic designs
4×10 5×8 7×6+2
ccPP$$PPcc o┌cccc┐o ┌cccc┐
o└PP$$PP┘o oPP$$PPo PP$$PP
o─PP┤├PP─o oPP$$PPo PP$$PP
ogg┘%%└ggo └PP┤├PP┘ PP┤├PP
gg┘%%└gg ││%%││
│└oo┘│
ggoogg
oo
## Research
9×17
@@@@┐ ┌gg ┌@@@@
@@@@&&┬┘o└┬&&@@@@
@@@@&&─┬o┬─&&@@@@
@@@@&&││o││&&@@@@
├┤├──┬──┤├┤
@@@@&&│┤│├│&&@@@@
@@@@&&┘PP┘└&&@@@@
@@@@&&┌PP─%&&@@@@
@@@@┘ccPP─gg└@@@@
vim: set ft=factoryidle ve=all tw=0 nocul:
############
#..........# ################################ ######### #########
#..........# #........#.........#...........# #........,........#
#...........,.........#.........#............,,,.........,........#
#...........,.........#......................,,,.......## ##......#
#..........# #........#.....................# #......# #......#
#..........# #........#.....................# ###.#### #......#
#..........# #......#.##.#..................# #......#####......#
#...........,.......#....#......#...........# #.................#
####....#### #......#....#......#...........# #.................#
,,,, #......#....#......############# ##########..###..##
####....#### #......#....#......# ,, ,,
#..........# #......#....#......# ############### ##..###..###
#..........# #..................# #..............,...........#
#..........# ###...#########...## #.............# #..........#
#..........# ,,, ,,, ##...........## ##.........#
#..........# ###...#########...## #...........# #.........#
#.....#....# #..................# ##...........## ##.........#
#.....#....# #..................# #..............,...........#
#.....#....# #............#.....# #.............# #..........#
#.....###### #............#.....# ##...........## ##.........#
#.........# #............#.....# #...........# #.........#
##.........,,.............#.....# ##...........## ##.........#
#.........,,.............#.....# #..............,...........#
#.........,,.............#.....# ### ###.............# #..........#
#.........,,.............#.....# #.###..............## ##.........#
#........#, #...................,...................# #.........#
####..####, #...................,...................## ##.........#
,,,,,,, ########...###...### #.................... ...........#
,, ,,,,,,,,,,,,,, #.................... ...........#
#..#### ##### ,,, ,,,, #.................... ...........#
####.....## #...####...###...### #.................... ...........#
#..........,.......#...........# #.................### #..........#
#..........,....................,..................# #..........#
#..........,....................,.....########.....# ##..........#
#........## #......#............,.....# #.....# #...........#
########## #......#...........# ###### ####### #...........#
#################### #############
vim: set ft=factoryidle ve=all tw=0 nocul:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment