vscode-settings

How to get import options in vscode similar to pycharm

How to get import options in vscode similar to pycharm Question: In Pycharm I press ALT + Enter hotkey to get suggestion and import what I need. This feature is very helpful. How should I do the same in Visual Studio Code Asked By: Amin Ba || Source Answers: The Solution You need an extension …

Total answers: 1

Can no longer fold python dictionaries in VS Code

Can no longer fold python dictionaries in VS Code Question: I used to be able to collapse (fold) python dictionaries just fine in my VS Code. Randomly I am not able to do that anymore. I can still fold classes and functions just fine, but dictionaries cannot fold, the arrow on the left hand side …

Total answers: 5

SyntaxError : Invalid syntax jedi

SyntaxError : Invalid syntax jedi Question: There is a problem showing in my vs-code editor SyntaxError: Invalid syntax jedi I don’t know why this problem showing it’s bothering me so much and there are some weird symbols on my editor ←[0m ←[m you can see this image can anyone tell how to remove both of …

Total answers: 3

How can I set max line length in vscode for python?

How can I set max line length in vscode for python? Question: For JavaScript formatter works fine but not for Python. I have installed autopep8 but it seems that I can’t set max line length. I tried this: "python.formatting.autopep8Args": [ "–max-line-length", "79", "–experimental" ] and my settings.json looks like this: { "workbench.colorTheme": "One Dark Pro", …

Total answers: 3

Prevent changing indentation from tabs to spaces

Prevent changing indentation from tabs to spaces Question: I have VSCode installed and python 3.6.8 I use tabs for my indentation. But when ever I save the file, all the tabs are being converted to spaces. This might be because of the formatter I use, i.e. Black. How do I prevent the formatter from doing …

Total answers: 6

Black does not support "Format Selection" command – VS Code error

Black does not support "Format Selection" command – VS Code error Question: I need to indent my python file in Vs Code. I followed the normal procedure, On Windows Shift + Alt + F On Mac Shift + Option + F On Linux Ctrl + Shift + I But my question is every time when …

Total answers: 4

library importing issues in vs code

library importing issues in vs code Question: import errors in python in vs code "i tried some imports for a chat bot project in vs code but its always shows some errors that shown in the picture below. looking for solutions ,thank you." this picture shows the error that i seen after importing some libraries …

Total answers: 1

How do I use snippets for Jupyter Notebook with VSCode?

How do I use snippets for Jupyter Notebook with VSCode? Question: I’ve been using VSCode for a while and at the moment I am trying to set up snippets to work. They seem to work well with simple Python (.py) files but not with Jupyter Notebook (.ipynb) files. Is there any way to make them …

Total answers: 3