enabling ctrl+enter to execute current line in .py script and moving cursor to next line
See original GitHub issueEnvironment data
VS Code version: 1.19.1 Python Extension version: 0.9.1 Python Version: 3.6.2 anaconda OS and version: win10 version 1709 (build 17025.1000)
Actual behavior
ctrl+enter does nothing
Expected behavior
ctrl+enter executes “Run Selection/Line in Python Terminal” [ / python.execSelectionInTerminal ] context menu option and indexes cursor in editor to next line, i.e. like behavior with vscode R extension environment and with vs17 ide python script support.
Steps to reproduce:
- open .py file in vscode
- place cursor on a line of script
- enter “ctrl+enter”
Logs
Output from Python
output panel
Output from Console window
(Help->Developer Tools menu)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:23 (5 by maintainers)
Top Results From Across the Web
VS Code move to next line on run ctrl + enter - Stack Overflow
As explained in this blog post, here is how you can make VS Code run code selections using Ctrl + enter and move...
Read more >Working with Jupyter code cells in the Python Interactive window
You can then type in code, using Enter to go to a new line and Shift+Enter to run the code. To use the...
Read more >Interacting With Python
Use Python interactively by typing code directly into the interpreter; Execute code contained in a script file from the command line; Work within...
Read more >Work with source code | PyCharm Documentation - JetBrains
To add a line before the current one, press Ctrl+Alt+Enter . PyCharm moves the caret to the previous line. To duplicate a line,...
Read more >Windows / Linux Vim Keybindings Reference for the AWS ...
Description Keybinding Command
Backspace one space Shift‑Backspace | Backspace backspace
Indent the selection one tab Ctrl‑] blockindent
Outdent the selection one tab Ctrl‑[ blockoutdent
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ideally this would be indent aware too so that if I execute the first line of a code block the whole block is sent to the kernel (so that you can actually step through your code)
Yes, Ctrl+Enter should move to the next line, which makes it consistent with the behavior in PTVS. The auto-move to the next line makes Ctrl+Enter a super-useful tool to step through code. Without it, the utility is much more limited.