simmel / urxvt-resize-font

URxvt Perl extension for resizing the font
219 stars 37 forks source link

Insert code line break in long string #19

Closed msiism closed 5 years ago

msiism commented 5 years ago

Please test this yourself before you merge it. I'm very new to Perl.

simmel commented 5 years ago

Thanks for the pull request!

Don't forget about line 25 and and one on line 125.

Also, like we talked about on email please at least add the textwidth vim modeline setting at line 1.

Thank you!

msiism commented 5 years ago

Don't forget about line 25 and and one on line 125.

You were referring to line 162 instead of 125 here, weren't you?

Also, like we talked about on email please at least add the textwidth vim modeline setting at line 1.

I've had a look at that and tried it. What Vim does there is inserting line breaks in the text without any notion of what that text is, if I'm not mistaken. (Or does ft=perl have any effect on wrapping?) This is generally not a good idea for code because it might simply break the code. I've asked about this in #perl on Freenode and was told that this can definitely also break Perl code.

simmel commented 5 years ago

A hint which produces broken code is better than no hint IMO.

Besides vim will not randomly add newlines it will just do so when you format the code e.g. via gq/gw.

So please add it.

simmel commented 5 years ago

You were referring to line 162 instead of 125 here, weren't you?

Exactly, 125 was the line number in this PR.

msiism commented 5 years ago

A hint which produces broken code is better than no hint IMO.

I'll have to disagree here. Working code should be the top priority, especially if something is being released to the general public.

Having no overly long lines in the code, though really nice to have, is not nearly as important, if you ask me.

simmel commented 5 years ago

Thank you for the contribution!