Hi Martin,
That's probably from pasting into email.
Andrew
On Fri, 10 May 2019 at 16:27, Martin Tarenskeen
wrote:
>
>
> 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 plac
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 lilypo
Hi Werner,
Interesting. I'll have some investigation. But close enough is good enough
for me. In the majority of cases in my work, no lines are added or deleted,
so I end up back very close.
Thanks!
Andrew
On Fri, 10 May 2019 at 15:32, Werner LEMBERG wrote:
>
> > [...] Note that, as with al
> [...] Note that, as with all code tidying programs, you can only
> return the cursor to approximately the same position, as lines may
> be added of deleted.
Are you sure about that? In Emacs, I can set a marker property that
`sticks' to a given character. As long as this character is not
de
For those who use vim, I'm posting this as result of my discovery of
python3-ly reformat thanks to David Wright in the hope that others may find
it useful.
This is for Debian or Ubuntu, and assumes the Python package python3-ly is
installed.
Add this code to ~/.vimrc:
" lilypond reformat (acb)
"