Skip to main content
Typo corrected
Source Link
Vaclav Kotesovec
  • 3.4k
  • 1
  • 13
  • 24

If I copy from an external editor to Mathematica notebook a block of lines (with a code)

line 1
line 2
...
line n

then whole text is copied to a single cell. I can now use n-1 times "Divide cell" and manually create n new cells for each line. If n is big, then this is a hard work. Exists some better method how do it ? For example before copingcopying insert some special characters into text (representing an end of cell) ?

If I copy from an external editor to Mathematica notebook a block of lines (with a code)

line 1
line 2
...
line n

then whole text is copied to a single cell. I can now use n-1 times "Divide cell" and manually create n new cells for each line. If n is big, then this is a hard work. Exists some better method how do it ? For example before coping insert some special characters into text (representing an end of cell) ?

If I copy from an external editor to Mathematica notebook a block of lines (with a code)

line 1
line 2
...
line n

then whole text is copied to a single cell. I can now use n-1 times "Divide cell" and manually create n new cells for each line. If n is big, then this is a hard work. Exists some better method how do it ? For example before copying insert some special characters into text (representing an end of cell) ?

Tweeted twitter.com/#!/StackMma/status/613007718404759552
edited title
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

How to copy and paste `n`$n$ lines from a text editor to `n`$n$ cells?

Source Link
Vaclav Kotesovec
  • 3.4k
  • 1
  • 13
  • 24

How to copy and paste `n` lines from a text editor to `n` cells?

If I copy from an external editor to Mathematica notebook a block of lines (with a code)

line 1
line 2
...
line n

then whole text is copied to a single cell. I can now use n-1 times "Divide cell" and manually create n new cells for each line. If n is big, then this is a hard work. Exists some better method how do it ? For example before coping insert some special characters into text (representing an end of cell) ?