How to enter a linebreak ( carriage return ) in a dialogue box

Asked by Marcel Hendrix

Using ngspice with gschem, I find it very nice to have multi-line attributes to hold the various SPICE directives and even control scripts.

Although I can paste anything I want from my text editor into the Edit Attributes dialogue, I can find no way to edit a multi-line attribute satisfactorily. There seems to be no way to break lines, as the <Enter> key, and also separate ^M, ^J characters, are seen as OK ('finished'). Is there an escape for the <Enter> key, or a Guile hook somewhere?

-marcel

Question information

Language:
English Edit question
Status:
Solved
For:
gEDA Edit question
Assignee:
No assignee Edit question
Solved by:
Marcel Hendrix
Solved:
Last query:
Last reply:
Revision history for this message
Marcel Hendrix (mhx-3) said :
#1

There is indeed a good way to do this.

Instead of trying to edit the text in the dialog that pops up
when selecting the component with a left-click, then a
right-click for the context menu and going to Edit...,
select the component with a left click and then type E X .
This pops up a dialog that supports using Enter to break
lines.

-marcel

Revision history for this message
Marcel Hendrix (mhx-3) said :
#2

> There seems to be no way to break lines, as the <Enter> key,
> and also separate ^M, ^J characters, are seen as OK ('finished').
> Is there an escape for the <Enter> key, or a Guile hook somewhere?

The 'secret key' proves to be ^Enter.
Found it in old release notes.

-marcel

Revision history for this message
Roland Lutz (rlutz) said :
#3

Your solutions are correct. Let me elaborate on that for the sake of anyone finding this via Google:

You have two options to insert a line break into an attribute. The first is to type Ctrl+Enter in the multi-attribute editor (invoked via "E E"). This will look weird while you are typing since the size of the editing widget isn't adjusted, but the row will expand in height once you confirm the new value.

The other option is to select only the attribute itself and use the text editor to edit it (invoked via "E X"). The first line will start with the attribute and an equals sign—don't let that confuse you, it's just gEDA's way to represent an attribute as a text object. Don't touch that part and you will be fine.