Before downloading Lilypond, please read about the text input.
You must download Lilypond before doing any of the following.
In order to use the lilypond
command, export the right path as follows (it must match with the location of your LilyPond.app file):
export PATH="$PATH:$HOME/Applications/LilyPond.app/Contents/Resources/bin"
Run the lilypond
command to make LilyPond compile the .ly
file:
lilypond file_name.ly
It will compile the source file and create a .pdf
file.
In order to make the compilation easier with Sublime Text, I created a new Build System for Lilypond containing:
{
"shell_cmd": "lilypond $file",
"selector": "source.lilypond"
}
In case you are writing with the vim editor, you can add these lines to your .vimrc
file to enable syntax highlighting for Lilypond:
filetype off
set runtimepath+=~/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/vim
filetype on