Hi,
I am copying code from website matplotlib and pasting into the vim editor in a terminal on OSX:
[(http://matplotlib.sourceforge.net/examples/pylab_examples/ellipse_demo.html)][1]
While this works fine in bbedit:
`from pylab import figure, show, rand
from matplotlib.patches import Ellipse
NUM = 250
ells = [Ellipse(xy=rand(2)*10, width=rand(), height=rand(), angle=rand()*360)
for i in xrange(NUM)]
fig = figure()
ax = fig.add_subplot(111, aspect='equal')
for e in ells:
ax.add_artist(e)
e.set_clip_box(ax.bbox)
e.set_alpha(rand())
e.set_facecolor(rand(3))
ax.set_xlim(0, 10)
ax.set_ylim(0, 10)
show()
ie all the code is properly aligned, in VIM it looks like this:
from pylab import figure, show, rand
from matplotlib.patches import Ellipse
NUM = 250
ells = [Ellipse(xy=rand(2)*10, width=rand(), height=rand(), angle=rand()*360)
for i in xrange(NUM)]
fig = figure()
ax = fig.add_subplot(111, aspect='equal')
for e in ells:
ax.add_artist(e)
e.set_clip_box(ax.bbox)
e.set_alpha(rand())
e.set_facecolor(rand(3))
ax.set_xlim(0, 10)
ax.set_ylim(0, 10)
show()
Anybody know how to fix this annoying situation? Does it have something to do with the different carriage return / line feed conventions on the Mac? Thanks.