[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to invoke lilypond from vim
From: |
Benjamin Esham |
Subject: |
Re: how to invoke lilypond from vim |
Date: |
Thu, 16 Nov 2006 14:45:12 -0500 |
[Sorry about that… I replied to the sender and forgot to include the
list.]
Allan Spagnol Comar wrote:
Good night to all, I was wondering how can I invoke lilypond from
vim ? I
tried with :make but it invokes gnu make..... I looked at
lilypond.vim on
compilers folder of vim plugin and it seams to me that what I
should do
was just run make .... what did i miss ?
Here's what I've got in my .vimrc for Lilypond:
" process and view PDF of a ly file
nmap <Leader>l :call LilyPondCompileOpen()<CR>
" open this file's corresponding pdf
nmap <Leader>p :call Open_PDF()<CR>
" :: change a file's extension
function! ChangeExt(name, ext)
let name = substitute(a:name, "\.[a-zA-Z0-9_]*$", "\.".a:ext, "")
return name
endfunction
" :: compile and open a LilyPond file
function! LilyPondCompileOpen()
write
let pdfname = ChangeExt(expand("%"), "pdf")
exe "!/Applications/Lilypond.app/Contents/Resources/bin/lilypond -
dno-point-and-click --pdf '%' && open '" . pdfname . "'"
endfunction
" :: open the PDF associated with this file (used for ly, tex)
function! Open_PDF()
silent exe ":!open '".ChangeExt(expand("%"), "pdf'")
endfunction
HTH,
--
Benjamin D. Esham
address@hidden | AIM: bdesham128 | Jabber: same as e-mail
"It is the unknown we fear when we look upon death and darkness,
nothing more." — Albus Dumbledore in HBP
PGP.sig
Description: This is a digitally signed message part