Questions tagged [multiline]

Text that spans more than one line is considered "multiline". Concerns about wrapping, spacing, techniques and best practices.

Text that spans more than one line is considered "multiline". Concerns about wrapping, spacing, techniques and best practices, as well as language and platform-specific techniques for displaying text in a multiline format.

1916 questions
27
votes
6 answers

How can I create a multi line input in IPython?

I am reading the book Python Data Science Handbook by Jake VanderPlas. In the first chapter a multi line input in IPython is illustrated: Can anybody please tell me how to do that? I know how to write a block before executing it in Jupyter…
aurumpurum
  • 932
  • 3
  • 11
  • 27
26
votes
0 answers

Why doesn't Java support multi-line strings?

Why doesn't Java support multi-line strings? I know they dont, but I dont know why. Is there a good reason? Several other languages have this capability, even older ones, so why doesnt Java? As far as I know (not very far) it shouldnt be too had to…
David says Reinstate Monica
  • 19,209
  • 22
  • 79
  • 122
25
votes
2 answers

Kotlin add carriage return into multiline string

In Kotlin, when I build a multiline string like this: value expected = """ |digraph Test { |${'\t'}Empty1; |${'\t'}Empty2; |} |""".trimMargin() I see that the string…
Tom Tresansky
  • 19,364
  • 17
  • 93
  • 129
25
votes
2 answers

How do I format a multi-line TODO comment in PyCharm?

I want to add a multi-line TODO comment to my PyCharm project. # TODO: Multiple errors can be wrapped inside an exception. # WfcApiException should do recursive error checking to locate # and store an arbitrary number of nested…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
25
votes
2 answers

Ellipsize not working properly for a multiline TextView with an arbitrary maximum height

I have a TextView with an unknown maximum height, which is dependent on the device's DPI/screen resolution. So, for instance, on and MDPI device this maximum height makes it possible to show only 2 lines at a time, a value that can be increased up…
DPR
  • 770
  • 1
  • 11
  • 29
24
votes
4 answers

sed - Get only the replaced string from a multiline input & omit unmatched lines!

I want sed to omit all non-matching lines, and only output the replaced string (of the single/multiple intended line/s). In other words: I've got a hay stack, and only want the needle returned, not all the hay which was searched and which remained…
porg
  • 1,079
  • 1
  • 11
  • 17
24
votes
2 answers

How to output a multiline string in Dockerfile with a single command

I want to output the following text in a Dockerfile: *****first row ***** *****second row ***** One way is to do it like that: cat > Dockerfile <> /home/myfile RUN echo ' …
E235
  • 11,560
  • 24
  • 91
  • 141
24
votes
2 answers

create a multi line chart using Chart.js

I am trying to create a multiline chart using Chart.js I can do this for 1 line and i can do 2 lines using a fixed data structure but I cannot get multiple lines to display data passed to the data structure. here is the example usage abbreviated…
David Williamson
  • 255
  • 1
  • 2
  • 5
23
votes
5 answers

multiline formatting for verbatim strings in c# (prefix with @)

I love using the @"strings" in c#, especially when I have a lot of multi-line text. The only annoyance is that my code formatting goes to doodie when doing this, because the second and greater lines are pushed fully to the left instead of using the…
Brady Moritz
  • 8,624
  • 8
  • 66
  • 100
23
votes
2 answers

How is CheckBox with multi-line text done in Windows Forms?

How do I extend the text in a Windows Forms CheckBox to more than one line?
Kenny C
  • 2,279
  • 1
  • 19
  • 20
22
votes
4 answers

In Cloudformation YAML, use a Ref in a multiline string (? use Fn:Sub)

Imagine you have a aws resource such as Resources: IdentityPool: Type: "AWS::Cognito::IdentityPool" Properties: IdentityPoolName: ${self:custom.appName}_${self:provider.stage}_identity CognitoIdentityProviders: …
honkskillet
  • 3,007
  • 6
  • 31
  • 47
22
votes
2 answers

How to execute multiline python code from a bash script?

I need to extend a shell script (bash). As I am much more familiar with python I want to do this by writing some lines of python code which depends on variables from the shell script. Adding an extra python file is not an option. result=`python -c…
cknoll
  • 2,130
  • 4
  • 18
  • 34
22
votes
2 answers

style guide for multiline html

I have some lengthy HTML which is over the 80 character limit for my project. We have a style guide which restricts the number of characters per line, which is good because right now the line runs so long that you can't see it all without scrolling…
williamcodes
  • 6,317
  • 8
  • 32
  • 55
21
votes
5 answers

How can I sync the scrolling of two multiline textboxes?

How can I sync the scrolling of two multiline textboxes in C# (WinForms)? When you scroll up/down a line in TextBox A, TextBox B should scroll up/down too. The same the other way around. Is this achievable without custom controls?
lesderid
  • 3,388
  • 8
  • 39
  • 65
21
votes
3 answers

How to end a multi-line command in PowerShell

This should be easy, but can't figure it out. How do I end a multi-line command in PowerShell? For example if I enter Get-ChildItem | and press enter then I get a >> prompt which I assume is to continue the command. But if I then enter…
Svish
  • 152,914
  • 173
  • 462
  • 620