Last active
April 2, 2023 05:22
-
-
Save maxzinkus/a4c96eb77d811cb83eb84f7c93e4aad6 to your computer and use it in GitHub Desktop.
Vim syntax file for Pokémon Showdown Export Format text files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: Pokemon Showdown Export Format | |
" Author: Max Zinkus | |
" License: CC-BY-SA https://creativecommons.org/licenses/by-sa/3.0/us/ | |
" Makes Showdown Export Format text files slightly more readable | |
" Natures are highlighted by the stat they boost | |
syn match mon '^.* @ .*$' | |
syn match tera '^Tera Type: .*$' contains=typeNormal,typeFighting,typeFlying,typePoison,typeGround,typeRock,typeBug,typeGhost,typeSteel,typeFire,typeWater,typeGrass,typeElectric,typePsychic,typeIce,typeDragon,typeDark,typeFairy | |
syn keyword typeNormal contained Normal | |
syn keyword typeFighting contained Fighting | |
syn keyword typeFlying contained Flying | |
syn keyword typePoison contained Poison | |
syn keyword typeGround contained Ground | |
syn keyword typeRock contained Rock | |
syn keyword typeBug contained Bug | |
syn keyword typeGhost contained Ghost | |
syn keyword typeSteel contained Steel | |
syn keyword typeFire contained Fire | |
syn keyword typeWater contained Water | |
syn keyword typeGrass contained Grass | |
syn keyword typeElectric contained Electric | |
syn keyword typePsychic contained Psychic | |
syn keyword typeIce contained Ice | |
syn keyword typeDragon contained Dragon | |
syn keyword typeDark contained Dark | |
syn keyword typeFairy contained Fairy | |
syn match ivs '^IVs: .*$' contains=statHP,statAtk,statDef,statSpA,statSpD,statSpe | |
syn match evs '^EVs: .*$' contains=statHP,statAtk,statDef,statSpA,statSpD,statSpe | |
syn keyword statHP contained HP | |
syn keyword statAtk contained Atk | |
syn keyword statDef contained Def | |
syn keyword statSpA contained SpA | |
syn keyword statSpD contained SpD | |
syn keyword statSpe contained Spe | |
syn match natureValue '^.* Nature\(\w\)*$' contains=natNeutral,natAtk,natDef,natSpA,natSpD,natSpe | |
syn keyword natNeutral contained Hardy Docile Serious Bashful Quirky | |
syn keyword natAtk contained Lonely Brave Adamant Naughty | |
syn keyword natDef contained Bold Relaxed Impish Lax | |
syn keyword natSpA contained Modest Mild Quiet Rash | |
syn keyword natSpD contained Calm Gentle Sassy Careful | |
syn keyword natSpe contained Timid Hasty Jolly Naive | |
syn match shiny '^Shiny: .*$' contains=shinyNo,shinyYes skipwhite | |
syn keyword shinyNo contained No | |
syn keyword shinyYes contained Yes Square | |
syn match tid '^TID: .*$' | |
syn match sid '^SID: .*$' | |
syn match move '^- .*$' | |
syn match comment '^---.*$' | |
syn match comment '^===.*$' | |
hi link mon VisualNOS | |
hi typeNormal ctermfg=254 | |
hi typeFighting ctermfg=202 | |
hi typeFlying ctermfg=153 | |
hi typePoison ctermfg=89 | |
hi typeGround ctermfg=172 | |
hi typeRock ctermfg=130 | |
hi typeBug ctermfg=143 | |
hi typeGhost ctermfg=61 | |
hi typeSteel ctermfg=248 | |
hi typeFire ctermfg=9 | |
hi typeWater ctermfg=27 | |
hi typeGrass ctermfg=10 | |
hi typeElectric ctermfg=11 | |
hi typePsychic ctermfg=163 | |
hi typeIce ctermfg=81 | |
hi typeDragon ctermfg=44 | |
hi typeDark ctermfg=241 | |
hi typeFairy ctermfg=207 | |
hi statHP ctermfg=2 | |
hi statAtk ctermfg=1 | |
hi statDef ctermfg=4 | |
hi statSpA ctermfg=5 | |
hi statSpD ctermfg=6 | |
hi statSpe ctermfg=7 | |
hi link natAtk statAtk | |
hi link natDef statDef | |
hi link natSpA statSpA | |
hi link natSpD statSpD | |
hi link natSpe statSpe | |
hi link shinyYes Constant | |
hi link comment Comment | |
" install in ~/.vim/syntax/pkmn.vim | |
" use a modeline or custom filetype setting to ensure filetype=pkmn syntax=pkmn (or add detection for *.pkmn files) | |
let b:current_syntax = "pkmn" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment