HappenApps / Quiver

Quiver documentation and issue tracker
2.26k stars 109 forks source link

Support creating new cell type based on selected region #1327

Closed mobileben closed 5 years ago

mobileben commented 5 years ago

The app is tedious in manipulating code cells. I find it is actually easier if one could enter in a bunch of test, and then change the text into the appropriate cells.

There is a "Convert To" feature which seeming seems like it would be cool, but the drawback is it changes the whole cell.

A much more usable feature would be to take a highlighted region and then insert the cell.

Example:

Say we have a text cell.

Step X Do the following to setup the widget

shell command something something shell command something something

You should see the output

Blah blah blah

In this case, I would want to covert the shell command section into a code cell.

This means at the end of this operation, it would be

text cell code cell text cell

All based on me having highlighted the shell command region (the two lines) and then "applying" the operation.

Instead, I have to either create the cells on the fly which isn't a great experience. Or I have to go back and insert cells and copy and paste. I also then typically have to remove formatting because of the limitations of the libraries used to build Quiver.

In either case, the workflow could be streamlined.

ylian commented 5 years ago

This is already supported. Highlight the shell command region, then use "Cell Menu > Split Cell", this splits the text cell into three text cells. Then change the text cell to code cell. It's quite fast if you use keyboard shortcuts (highlight, Option-Command-Return to split into three cells, Option-Command-2 to change it to a code cell, Option-Command-/ to change the code language).

mobileben commented 5 years ago

Confirmed! Cool, I had no idea Split Cell worked that way. This works.