So, I don't know a command that'll automatically take a long string and make it a fixed-width, but a Jupyter Notebook shortcut to quickly comment a block of code is to type:
⌘/ command + slash will toggle comment/uncomment a block of code. This works in both python and R flavors of the notebook. (type ESC while in a notebook to get to command mode, then "H" for a longer list of shortcuts). On Tuesday, April 18, 2017 at 12:18:55 PM UTC-7, Andy Davidson wrote: > > Hi > > One features I mis from R-studio is the ability to reflow comments. For > example lets say I paste the following comment in a code cell > > "This dataset checks that your code always picks the first-occurring > Profile-most Probable k-mer in a given sequence of Dna. In the first > sequence (“GCCCAA”), “GCC” and “CCA” are both Profile-most Probable k-mers. > However, you must return “GCC” since it occurs earlier than “CCA”. Thus, if > the first sequence of your output is “CCA”, this test case fails your code.” > > After “reflow” the comment looks like > > # test data set 1 > # This dataset checks that your code always picks the first-occurring > # Profile-most Probable k-mer in a given sequence of Dna. In the first > # sequence (“GCCCAA”), “GCC” and “CCA” are both Profile-most Probable > # k-mers. However, you must return “GCC” since it occurs earlier than > # “CCA”. Thus, if the first sequence of your output is “CCA”, this test > # case fails your code. > > > Now if I go through and edit the commented section all I have to is > ‘re-flow’ and it will reformat my comments so that no line is more than a > fixed length > > Kind regards > > Andy > > P.s. I am using a mac. Hopefully their is a keyboard short cut > > > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/a7d07804-eb2c-4395-a0dd-c067dcd05c7e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
