Visual Studio Code and rshell
Posted: Wed Feb 09, 2022 7:18 pm
I've recently started using rshell for my projects and have been using Visual Studio Code for a while to edit the Micropython code. VS Code works well, but uploading, testing, debugging, etc. was inconvenient using Kitty and Ampy. So I started using rshell and realized that I could run rshell from a command prompt terminal in VS Code. This has improved efficiency and easy because I don't need to go to the desktop and back and forth between apps. So I though I'd share with all the issues I had along the way.
To learn how to add a command prompt to VS Code, you can find that easily with a web search, so I won't repeat that here. But what you'll find is that, inside VS Code Terminal, when you run rshell, you'll have a couple of issues.
First is that the up arrow will not show the previous command in REPL, so you'll need to use Ctrl+P instead.
Second, Ctrl-E will not go into Paste Mode because Ctrl-E in VS Code captures that key combination. You'll need to edit your settings by going to File/Settings and search for "terminal.integrated.commandsToSkipShell ", add the following items to the settings: workbench.action.quickOpenPreviousEditor, workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup, workbench.action.quickOpenPreviousRecentlyUsedEditor, workbench.action.quickOpen. This will pass through the Ctrl-E to the terminal session and VS Code will ignore those commands when your active pane is the Terminal window.
To learn how to add a command prompt to VS Code, you can find that easily with a web search, so I won't repeat that here. But what you'll find is that, inside VS Code Terminal, when you run rshell, you'll have a couple of issues.
First is that the up arrow will not show the previous command in REPL, so you'll need to use Ctrl+P instead.
Second, Ctrl-E will not go into Paste Mode because Ctrl-E in VS Code captures that key combination. You'll need to edit your settings by going to File/Settings and search for "terminal.integrated.commandsToSkipShell ", add the following items to the settings: workbench.action.quickOpenPreviousEditor, workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup, workbench.action.quickOpenPreviousRecentlyUsedEditor, workbench.action.quickOpen. This will pass through the Ctrl-E to the terminal session and VS Code will ignore those commands when your active pane is the Terminal window.