Resizing console panel on Script package


#1

Hi,

This is probably a stupid question but I just started using Atom and the Script package. Everything seems very cool, but I can’t resize the output console panel past certain height. It’s very annoying, since the max height is really small.

I seem to be able to change the height via CSS, but only to a fixed amount, which doesn’t work for me.

Any suggestions or solutions?


#2

My experiments have shown that the max height is responsive to the content, so I can increase the font-size of the output and that gives me more potential room to increase the size of the output panel. That might be an option to make it more appealing to you.

I was also able to add empty “content” at the bottom with a CSS tweak.

.script-view .panel-body:after {
  height: 30px;
  content: "";
  display: block;
}

#3

Mmmm thanks, but I can’t get it working as I want to.

Only increasing the font-size of the output content I’m able to make it bigger. But I want big container, small font. So… No luck. Thanks, though!


#4

You could use terminal-plus. It allows completely free scaling of the panel.


#5

Where do I find this file?


#6

File -> Stylesheet..., or in the .atom folder in your user directory as styles.less.


#7

It seems the problem in this post was never solved. I’m having the same problem. I want text in the script console not to run off the right side (ie, to word wrap) and to be able to increase the height of the script console.

I’ve illustrated with an animated gif below in which I run the script (using cmd-I) and then when the script console below appears, I try to adjust the console window height, without success (I highlight text accidentally). Finally, I scroll right to demonstrate how much text is not word wrapping.
I’ve tried changing all of the following, quitting and restarting Atom between changes, and nothing has helped.

  1. installing terminal-plus (as advised in this discussion)
  2. Preferences–>Editor --> Soft Wrap
  3. Preferences–>Editor --> Soft Wrap at Preferred Line Length
  4. Preferences–>Editor --> Max Screen Line Length (can’t change from default 500)
  5. Preferences–>Editor --> Preferred Line length
  6. Atom–>Config…–> editor:
    preferredLineLength: 80
    scrollPastEnd: true
    softWrap: true
    softWrapAtPreferredLineLength: true
    test

#8

Your problem is very different from the original post. And you’re missing an important fact: the authors of packages such as script are not bound to make their packages respect Atom’s editor settings. I agree that the text should probably not stretch the screen if there are a lot of spaces in there. You have two options: use something other than script and see if it displays more like you want a package to, or make a suggestion for a change at the package’s repo.


#9

I’m puzzled by your statement that “Your problem is very different from the original post”. After reading the original post in this discussion carefully, and then re-reading it, it still does seem to me that it can be interpreted as describing exactly what I’m experiencing. It says “I can’t resize the output console panel past certain height. It’s very annoying, since the max height is really small.” I’m open to the possibility that it can be interpreted another way, but I just don’t see it.

Nevertheless, I have read your helpful suggestions carefully, and followed your advice and made a post at the repo.


#10

The original post doesn’t mention the output displaying as a single line without wrapping. It’s entirely about resizing the output pane.

After digging a bit further, I see that script for me wraps like one would expect. The dev tools also show that the pre tag in question has the CSS rule white-space: pre-wrap.

So I’m revising my earlier recommendation. You should be able to force the display to what you want with a styles.less change:

.script-view pre {
  white-space: pre-wrap !important
}

#11

This worked! I added the lines you recommended to style.less (accessed via Atom–>Stylesheet…), and then made the animated .gif below, which demonstrates that the console window only resizes if it has enough content.

In the first part of the .gif, I type cmd-I to run and then attempt resizing the console pane. There’s no effect since the output is only a few lines. But then I add print(dir(name)) to the code and re-run. This time the console pane does resize as desired. Note also that word-wrap is as desired.

Thanks much for pursuing this!