-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support manual (indenting) line breaks #573
Comments
I agree that the loss of user-intended indentation is a problem with Frescobaldi's format feature, but I don't think this is a complete solution. a b c d ...becomes... This means that every line that is to be indented will have to be preceded by %/, and that there is no way of forcing double indentation. How would you propose switching off the %// indentation if it isn't automatically switched off in following bars? |
I agree that this would be a very useful feature. |
I like the idea of protecting some intended indentation from frescobaldi formatting function, because I recently started using indentation with the same purpose. I wonder if this could be achieved in some smart way through python-ly and bar checking (see issue #437), in order to avoid the comments %/ and %//. I mean, if formatting is able to know if a bar is finished or not, it may act differently if a bar is splitted in two or more lines. |
That would of course be terrific. |
We now have several reports of the workflow with inside bar indents. But before agreeing on trying to adapt to this particular code style I'd like to broaden the discussion; other ways of user indentation is of course possible so I think the question is - which indents should be allowed by the I've a loose idea of two format options - a hard format which is basically like today (and can be useful on particularly messy code) and a softer one which is more careful with user indents. |
Has there been any development on this in the last two years? I'm finding my indenting/commenting/etc. structure/format is hard to manage in Frescobaldi, since the indent and format commands mess things up. |
I don't think so. At least not that I know of. I must admit that quite the contrary I seem to have adjusted my coding style using much more space between measures. That way I don't really need the indentation anymore. Something like this would seem typical now (of course this music is unusually simple): \relative {
c8 d e f
\oneVoice
g a
\voiceTwo
b c
| % 14
c4 d
\criticalRemark \with {
foo = bar
}
NoteHead
e
\once \override Something
f
| % 15
} But still I'd say it would be really good if Frescobaldi wouldn't necessarily revert manual indentation. |
Hi Urs (et al.),
I don't think so. At least not that I know of.
=(
my coding style using much more space between measures.
[…] Something like this would seem typical now
Wow. Don’t you find that very difficult to work with? I find “narrow, vertical" code less manageable than reasonably “wide” code. Would love to hear your thoughts on your system, and where you think the benefits lie.
Best,
Kieren.
…________________________________
Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: info@kierenmacmillan.info
|
I have a convention to lay out my music so each measure starts on a new line (with the possible exception of things like
c1 | c | c | c
). If a measure is too long to comfortably fit on a line I continue the measure on the second line but add one indent. A similar thing is true when I insert long tweaks, which will result in a layout likeI'm particularly convinced of the second one because that makes very expressive commits. Of course both constructs get destroyes when I apply Frescobaldi's
format
function. Therefore I'd like to ask if it is a good idea to support that kind of formatting convention or if that's too much a personal use case?My idea would be to recognize a user-settable "line break" comment, maybe defaulting to
%/
. On entering code this would result in one additional indentation step to be added to the next line. On explicit use offormat
this wouldAn optional addition would be to recognize a second line break comment (e.g.
%//
). This would make the following line indent to exactly the position of the comment, just like the second example above. With my comments the examples could be entered likeThe text was updated successfully, but these errors were encountered: