CCARH Software for Humdrum: VI syntax highlighting
[ MuseData | Humdrum ]

Download the following file, humdrum.vim, to use in the editor program vim for coloring while editing the different components of the Humdrum data format.

  humdrum.vim -- vim syntax file for colorizing humdrum data.

There are several ways to use the file humdrum.vim:

  1. Manual loading: you can load the colorizing for Humdrum data manually by typing one of the following commands inside of the vim editor:
                :source humdrum.vim
                :so humdrum.vim
    
  2. Automatic loading:
    1. First, add these lines to a file in your home directory called .vimrc :
       syntax on
       au BufRead,BufNewFile *.hmd set filetype=humdrum 
       au BufRead,BufNewFile *.krn set filetype=humdrum 
       au! Syntax humdrum  source ~/.vim/humdrum.vim
      
      where .hmd and .krn are file endings you want to associate with the Humdrum syntax coloring.

    2. Then copy the humdrum.vim file into the location ~/.vim/humdrum.vim.

To the right is an example of syntax highlighting in vim using the following coloring conventions:


Green Bibliographic records
Light Blue Global comments
Blue Local comments
Pink Tandem interpretations
Red Exclusive interpretations
Red
Background
Invalid tabs

Syntax highlighting designed for the **kern representation:

White
Background
Measure lines
White
Highlighted
Chords
Blue
Background
Invalid chording spaces