|
From: | Andrew Bernard |
Subject: | Re: python3-ly reformat in vim |
Date: | Fri, 10 May 2019 16:29:16 +1000 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |