The "Enter" key in new IPython versions (5+) inserts a line break instead of executing the current block of code (e.g. inside a function definition); to execute the code block you have to navigate the cursor to the last line and then hit "Enter". In older version hitting "Enter" would directly execute the block. How can we execute the current code from the current cursor location without navigating to the end?
The following image shows what I mean, the curser is at the end of the line b=20
, I want to execute this block of code without having to navigate the cursor to the end of the next line. Is there a way to achieve this?
Alt + Enter
or
Esc + Enter
execute the current code block, regardless of cursor position.
Esc + Enter
execute the block of code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With