[Top][All Lists]

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

Re: textedit - how to set tab size for correct column calculation?

From: Federico Bruni
Subject: Re: textedit - how to set tab size for correct column calculation?
Date: Sat, 03 Nov 2018 08:55:15 +0100

Hi David

I confirm the problem.
But I wonder how lilypond can predict how many spaces an editor will consider for a tab. It's impossible, isn't it? The best workaround is not using tabs at all (or replace them with spaces upon save).

For those who want to reproduce the problem, do not use Frescobaldi, which converts tabs to spaces. Create a ly file with another editor, use tabs, compile the PDF and you'll see that the COLUMN in textedit://FILE:LINE:CHAR:COLUMN has a shift forward.

Il giorno sab 3 nov 2018 alle 7:03, David Baptista <address@hidden> ha scritto:
I actually like then setup I currently have (Lilypond + Notepad++ with custom Lilypond language definition for auto complete and syntax highlighting [the definitions file is out there on the Internet] plus Sumatra PDF as a viewer that allows PDF updating even when open - one custom Notepad shortcut for compiling with NppExec and that's it). The only part that is hacky is the referred "textedit" links because somehow internally, when lilypond generates them, it assumes that one tab equals 8 spaces and this is actually editor and configuration dependant (so it seems there should be a way to set tab size for textedit link calculations within Lilypond, which I do not know if it is the case).

In consequence, I have some nasty calculations in a custom script for textedit:// links to actually land in the right column in Notepad++.

Andrew Bernard <address@hidden> escreveu no dia sexta, 2/11/2018 à(s) 22:35:
Hi David,

Lilypond only cares about whitespace. Tbas are not integral to the syntax, as they are in some programming languages. Why don't you consider using Frescobaldi? Its a very capable and good lilypond environment. I cant see why, given that it exists, anybody would use a crude text editor. I can understand using emacs, however. Give it a go!


On Sat, 3 Nov 2018 at 07:15, David Baptista <address@hidden> wrote:

I have been fiddling with textedit on Windows, and I have determined that when source files contain tabs, lilypond always calculates the "column" parameter assuming that tabs occupy 8 spaces. In my case I have my editor configured for 4 spaces, so the link always overshoots.

reply via email to

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