Automatically advance to the next line after F9

61 views
Skip to first unread message

Anh Le

unread,
Feb 3, 2016, 11:42:12 AM2/3/16
to spyder
Coming from RStudio, I'm familiar with the behavior of the cursor automatically moving to the next line. I think this makes sense for data analysis code. Does Spyder have something similar? If not, is there a reason for this implementation?

Yuxiang Wang

unread,
Feb 4, 2016, 8:08:09 AM2/4/16
to spyder
Have you tried to use shift + enter to progress through code cells? It looks like:

# %%
import matplotlib.pyplot as plt

# %%
fig, axs = plt.subplots()
fig.savefig('mpl_tiff.tif', dpi=300)


And you can use shift + enter to run the current cell, and in the mean time the cursor will be at the next cell.

I don't know how much this helps, but sounds like an interesting feature to you if you haven't tried it yet!

Shawn

Anh Le

unread,
Feb 24, 2016, 3:38:40 PM2/24/16
to spyder
I'm aware of the code cell, but I was hopeful that there is a way to auto-advance without this since I want to maintain a pure Python script (that can be run with python file.py in the terminal), instead of something specific to an IDE.

Carlos Córdoba

unread,
Feb 24, 2016, 3:46:22 PM2/24/16
to spyd...@googlegroups.com
Hi,

Cells in Spyder are defined by comments that start with this format:

    #%%

so there's nothing that Spdyer-specific about them, and so you can run Python files on a terminal without any problems-

You can think of them as headers for different sections for your file (e.g. load data, process data and run analysis).


Cheers,
Carlos

El 24/02/16 a las 14:12, Anh Le escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages