lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python3-ly reformat in vim


From: Martin Tarenskeen
Subject: Re: python3-ly reformat in vim
Date: Fri, 10 May 2019 08:27:33 +0200 (CEST)
User-agent: Alpine 2.21 (LFD 202 2017-01-01)



On Fri, 10 May 2019, Andrew Bernard wrote:

Add this code to ~/.vimrc:

" lilypond reformat (acb)
" reformat buffer, and return cursor to about the same place.
fun DoLilypondReformat()
    let l = line(".")
    let c = col(".")
    :%!ly reformat
    call cursor(l, c)
endfun

au Filetype lilypond nmap <F2> :call DoLilypondReformat()<CR>

Great! That's very useful! But the indentation of the code between fun and endfun gave errors on my system. After unindenting these lines your code worked perfectly.

--

MT

reply via email to

[Prev in Thread] Current Thread [Next in Thread]