Clearing output from Scala Worksheet
Asked Answered
R

5

7

Every-time you save a Scala Worksheet in the Scala IDE, the output of each expression is printed as comments on the right-hand side of the editor. Is there a way to clear this output from a Scala Worksheet so that you can cut and paste code?

Currently, my solution is to save my worksheet with an error, so that the output would disappear. There must be a better way... a keyboard shortcut or something.

Revamp answered 8/11, 2012 at 19:7 Comment(1)
If the answer turns out to be no, please submit a feature request. That's definitely something we should have.Stumpf
H
4

There is no such feature yet. There is a related ticket: The Format action should strip comments.

Heins answered 8/11, 2012 at 21:23 Comment(1)
Thanks for opening a ticket Iulian.Revamp
E
4

While waiting for the ticket to be resolved, this regular expression can be used in Find/Replace (Ctrl/Cmd+F) to delete the comments.

 *//[>|].*$

Update: This has been fixed: #132

Evilminded answered 9/11, 2012 at 16:59 Comment(0)
B
2

It's jerry-rigged, but gets the job done.

  1. Make a small edit (e.g. delete a space where it doesn't matter) to prompt a save.
  2. Save.
  3. Press Esc immediately to terminate worksheet process.

You now have a clean worksheet!

Burg answered 24/10, 2013 at 4:15 Comment(0)
W
2

Ctrl+Shift+C does the job in Scala IDE 4.7.0

Walling answered 2/11, 2017 at 14:5 Comment(0)
T
1

Alt+Shift+A enables Block selection mode. You will be able to select only left part of screen (columns with code). Block mode also makes possible to select only columns with output.

More on block selection mode

Taxiplane answered 23/9, 2013 at 22:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.