neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

bst.vim (2825B)


      1 " Vim syntax file
      2 " Language:     BibTeX Bibliography Style
      3 " Maintainer:   Tim Pope <vimNOSPAM@tpope.info>
      4 " Filenames:    *.bst
      5 " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $
      6 
      7 " quit when a syntax file was already loaded
      8 if exists("b:current_syntax")
      9    finish
     10 endif
     11 
     12 setlocal iskeyword=48-57,#,$,',.,A-Z,a-z
     13 
     14 syn case ignore
     15 
     16 syn match   bstString +"[^"]*\%("\|$\)+ contains=bstField,bstType,bstError
     17 " Highlight the last character of an unclosed string, but only when the cursor
     18 " is not beyond it (i.e., it is still being edited). Imperfect.
     19 syn match   bstError     '[^"]\%#\@!$' contained
     20 
     21 syn match   bstNumber         "#-\=\d\+\>"
     22 syn keyword bstNumber         entry.max$ global.max$
     23 syn match   bstComment        "%.*"
     24 
     25 syn keyword bstCommand        ENTRY FUNCTION INTEGERS MACRO STRINGS
     26 syn keyword bstCommand        READ EXECUTE ITERATE REVERSE SORT
     27 syn match   bstBuiltIn        "\s[-<>=+*]\|\s:="
     28 syn keyword bstBuiltIn        add.period$
     29 syn keyword bstBuiltIn        call.type$ change.case$ chr.to.int$ cite$
     30 syn keyword bstBuiltIn        duplicate$ empty$ format.name$
     31 syn keyword bstBuiltIn        if$ int.to.chr$ int.to.str$
     32 syn keyword bstBuiltIn        missing$
     33 syn keyword bstBuiltIn        newline$ num.names$
     34 syn keyword bstBuiltIn        pop$ preamble$ purify$ quote$
     35 syn keyword bstBuiltIn        skip$ stack$ substring$ swap$
     36 syn keyword bstBuiltIn        text.length$ text.prefix$ top$ type$
     37 syn keyword bstBuiltIn        warning$ while$ width$ write$
     38 syn match   bstIdentifier     "'\k*"
     39 syn keyword bstType           article book booklet conference
     40 syn keyword bstType           inbook incollection inproceedings
     41 syn keyword bstType           manual mastersthesis misc
     42 syn keyword bstType           phdthesis proceedings
     43 syn keyword bstType           techreport unpublished
     44 syn keyword bstField          abbr address annote author
     45 syn keyword bstField          booktitle chapter crossref comment
     46 syn keyword bstField          edition editor
     47 syn keyword bstField          howpublished institution journal key month
     48 syn keyword bstField          note number
     49 syn keyword bstField          organization
     50 syn keyword bstField          pages publisher
     51 syn keyword bstField          school series
     52 syn keyword bstField          title type
     53 syn keyword bstField          volume year
     54 
     55 " Define the default highlighting.
     56 " Only when an item doesn't have highlighting yet
     57 
     58 hi def link bstComment           Comment
     59 hi def link bstString            String
     60 hi def link bstCommand           PreProc
     61 hi def link bstBuiltIn           Statement
     62 hi def link bstField             Special
     63 hi def link bstNumber            Number
     64 hi def link bstType              Type
     65 hi def link bstIdentifier        Identifier
     66 hi def link bstError             Error
     67 
     68 let b:current_syntax = "bst"
     69 
     70 " vim:set ft=vim sts=4 sw=4: