Я широко использую Vscode в своем рабочем процессе вместе с расширением VIM.
Я часто выполняю отдельные строки в редакторе в интерактивном режиме Python.
On Shift+Enter (без символов не выделяется). Предполагается, что это только выполнять текущую строку и не изменять положение курсора. что значительно препятствует моему желаемому рабочему процессу. Но теперь я сделал полную переустановку, и код по -прежнему перепрыгивает курсор на следующую строку в Shift+Enter. < /P>
Есть ли способ предотвратить это и снова получить старое поведение?// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+down",
"command": "workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
{
"key": "shift+up",
"command": "workbench.action.focusActiveEditorGroup"
}
]
< /code>
{
"workbench.colorTheme": "Default Dark Modern",
"git.openRepositoryInParentFolders": "never",
}
< /code>
I tried completly reinstalling (uninstall vscode, remove all local folders in appdata). This fixed the problem before. On encountering the problem again, I was not able to revert to the desired cursor behaviour with this approach.
The only keyboard shortcut active in editor with shift+enter is Python Run Selection/Line in Python terminal. To use this command the Python extension has to be activated, all others are deactivated.
Current keyboard shortucuts with shift+Enter
EDIT:
I found the solution with the help of the comments below:
The python extension version I was using was:
2023.20.0 which released about a two weeks ago.
Downgrading to 2023.18.0 fixed the problem. Apparently they added this feature per default but it would be nice to know how to deactivate without having to downgrade.
Подробнее здесь: https://stackoverflow.com/questions/775 ... rrent-line
Предотвратить пропуск vScode в следующую не пустую строку при выполнении текущей строки с помощью Shift+Enter In Python ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение