X12 syntax highlighting for Notepad++?

John Straka picture John Straka · Jun 24, 2011 · Viewed 22.5k times · Source

I work with a few different X12 standard EDI transactions (270/271, 276/277.) I thought I'd check to see if anyone knew of an existing syntax highlighting profile for these for Notepad++ before I start to work on my own.

Answer

Phaxmohdem picture Phaxmohdem · Apr 3, 2012

I ran into the same problem, and ended up creating my own based on schema I had for 4010 & 5010 270/271, 276/277/278 message types.

Copy the code below into a file called X12.xml or something, then use the user defined language import feature in Notepad++ to import that xml file.

  • User defined dialogue... button (lightning bolt button)
  • Import button
  • May have to restart NP++ after import, but afterwards the new language will appear in your Language drop down menu.

    <NotepadPlus>
    <UserLang name="X12" ext="">
    <Settings>
        <Global caseIgnored="no" />
        <TreatAsSymbol comment="no" commentLine="no" />
        <Prefix words1="no" words2="no" words3="no" words4="no" />
    </Settings>
    <KeywordLists>
        <Keywords name="Delimiters">000000</Keywords>
        <Keywords name="Folder+"></Keywords>
        <Keywords name="Folder-"></Keywords>
        <Keywords name="Operators">* : ^ ~ +</Keywords>
        <Keywords name="Comment"></Keywords>
        <Keywords name="Words1">ISA GS ST SE GE IEA </Keywords>
        <Keywords name="Words2">BPR TRN AAA NX ENT RMR NM1 DTM DTP DMG INS REF BHT HL EQ N3 N4 PER PRV HI MPI EB HSD MSG III AMT STC SVC PWK CR6 CR5 CR2 CR1 CL1 CRC HCR UM </Keywords>
        <Keywords name="Words3">LS LE</Keywords>
        <Keywords name="Words4"></Keywords>
    </KeywordLists>
    <Styles>
        <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" />
        <WordsStyle name="KEYWORD2" styleID="6" fgColor="800000" bgColor="FFFFFF" fontStyle="1" />
        <WordsStyle name="KEYWORD3" styleID="7" fgColor="00FF00" bgColor="FFFFFF" fontStyle="1" />
        <WordsStyle name="KEYWORD4" styleID="8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="COMMENT" styleID="1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="COMMENT LINE" styleID="2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="OPERATOR" styleID="10" fgColor="FF00FF" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="DELIMINER1" styleID="14" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
        <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
    </Styles>
    </UserLang>
    </NotepadPlus>