I am trying to switch from Pycharm to Visual Studio 2013 (PTVS), however I cannot find how to change settings for auto-completion popups. For example, in Pycharm whenever you start writing something, it automatically gives you a list of possible keywords, like in screenshots below.
If I start to write 'co' pycharm lets me choose 'consecutive' which is an already defined boolean. Is there any way to change these settings in visual studio? I have went through the settings menu like 20 times now, and I am completely stuck.
screenshot of pycharm:
http://i61.tinypic.com/20960wn.png
screenshot of visual studio 2013:
http://i62.tinypic.com/2qtilg1.png
I found the answer by myself - PTVS doesn't support this feature, however there is a plugin, which can be downloaded here, which supposedly fixes this issue:
http://visualstudiogallery.msdn.microsoft.com/644b4359-5eeb-4ba5-9374-78a8507761f0
However, after further inspection, it is broken and doesnt work half as good as pycharm's autocomplete. Most of the time it popups a message saying 'no suggestions' which becomes seriously annoying getting that msg after every single letter.
Bottomline - it is broken.
This is now supported with PTVS. Per the completions section found on the GitHub wiki.
Completions can be shown at any time by pressing Ctrl+J or Ctrl+Space, or may be triggered automatically by certain commands (such as import), operators (such as a period/full stop), or by typing at any place where completions are likely to be helpful.
Related
I get some pylint warnings in the Problems view of PyCharm Community Edition:
a) How can I tell PyCharm to include the corresponding message code/id in the Problems View, so that I am able to manually suppress the warning without manually searching the corresponding message code/id?
b) How can I teach PyCharm to provide a quick fix for suppressing the warning with a line comment?
For example
"PyLint: Too many local variables"
=>
# pylint: disable=too-many-locals
Related:
List of pylint human readable message ids?
How to show pylint message codes in VScode?
How do I automatically fix lint issues reported by pylint?
Visual Studio Code quick-fix & python
Edit
Also see related issue ticket of PyCharm Pylint Plugin:
https://github.com/leinardi/pylint-pycharm/issues/92
While the standard Problems view does not show the message ids, the extra Pylint view does (after running a scan):
Unfortunately, quick fixes are not provided by that view.
The answer to
b) How can I teach PyCharm to provide a quick fix for suppressing the warning with a line comment?
Is sadly: Go back and wait at https://github.com/leinardi/pylint-pycharm/issues/92 (or someone starts implementing it 😅. and, btw, upstream actually accepts that OR someone goes ahead and creates a yet-another new plugin)
There do not seem be alternative PyLint Plugins for PyCharm. Unfortunately, for VsCodium (Visual Studio Code without tracking) the situation seems to be similar.
Well, there is the extension ms-python and it supports many linting tools for Python (Strg+Shift+P: Python: Select linter).
For PyLint it shows the message ids in the VsCodium PROBLEMS view.
If the language server would be set to Pylance, Quick fixes for PyLint would be available, too.
Unfortunately, the language server Pylance does not support VSCodium:
https://github.com/microsoft/pylance-release/issues/791
Related:
Visual Studio Code quick-fix & python
I have Visual Studio Code on my laptop and setting it up for the first time and am having trouble making Intellisense work. I downloaded the python extension. When I tried to type a syntax, I don't see a drop down of the available methods.
What I did so far was press F1> type 'open settings'> and see that the option is turned on. It looks like the setting is on, screenshot below line 18. I'm not sure if there is something I'm missing. Would anyone happen to have an idea of how I can have the auto complete functionality to work?
Intellisense was provided by the Language Server, The default value of it is Default.
Default: Automatically select a language server: Pylance if installed
and available, otherwise fallback to Jedi.
So, it's a little weird of your problem, could you try to install the Pylance and set it as the Language Server? Add this in the settings.json file:
"python.languageServer": "Pylance",
Have you tried Ctrl+Space or hovering some code?
Also do you have "Visual Studio IntelliCode" extension installed?
If neither Ctrl+Space nor hovering work, it is recommended to restart VS Code (https://code.visualstudio.com/docs/editor/intellisense#_troubleshooting)
The Python parser in Visual Studio Code 1.25.1 lints any error directly while typing.
How can I turn that off?
I would like to disable the live-parser-linting.
I do not want to completely disable linting from pep8 or pylint too.
Maybe the issue got adressed here too:
https://github.com/Microsoft/vscode-python/issues/2270
I found a setting for "List of surpressed diagnostic message" but I do not know, what to insert here (or if this is even the right place) nor do I find any documentation for the python.analysis.disabled settings on the web.
Help appreciated.
"python.analysis.disabled": [
"",
],
Is there any workaround?
[I am assuming you have the latest version of the Python extension for VS code installed as this won't have anything directly to do with VS Code 1.25.1]
If you are using the new language server from the Python extension then errors as you type do not turn off at the moment (you referenced the specific issue suggesting having a setting to turn that off).
If you're not using the new language server than the extension only runs linters on save, which would mean you have automatic saving as you type turned on and that's triggering the constant linting of your code. Tweak your settings to not automatically save and that will stop constant linting (and you can specify settings in VS Code for specific languages if you only want to change this for Python).
I want to use winpython interpreter for Visual Studio 2017 community edition. I found settings for another IDE here: Using WinPython as Interpreter for PyCharm. Where can I find similar settings for VS 2017 community edition?
(finally my first post after so long following. It's a shame, because it's maybe not the best answer, but it's late here)
You have to add your WinPython as a custom python enviroment.
Following steps:
Open VS an look for Tools > Python > Python Enviroments and then hit "add custom..."
There are several fields to be filled, which are nearly self explained (Path of Interpreter, window-interpreter etc.). I think, if you enter the Interpreter-Path, you can hit the button "auto-fill" on the right side an VS will try to look for the other fields automatically.
That's it. But the more interesting question is "Does Intellisense recognizes the packages in WinPython like scipy?"
Yes. But Intellisense needs a first date with the packages. Otherwise you won't cross the doorstep.
Open Tools > Python > Python Enviroments
Click on your Custom Python environment (WinPython, I still guess) and then click the field, where "configure" is listed an look for the Option "Intellisense". Then VS will look vor all modules. Be patient, at my machine it took some time.
After recognizing all modules (no red ! sign anymore, a blue check), you can hit the new appearing button above "Update Database". This will take less time.
In my case (a few minutes ago) I had to restart VS. When I hit numpy.p either in editor or interactive console, there appears auto-complete with every info you wish to have (in a pythonic, not a general way).
good night!
Sources:
https://learn.microsoft.com/en-us/visualstudio/python/python-environments
Visual Studio How to add Python module to Intellisense
Not sure if this is the right place to ask this question but I hope it is.
I have been using PyCharm for Python development in the last month and a half and there's an issue that irks me a lot since I've moved from Visual Studio (I had to). I am trying to find stuff in the code and PyCharm for some reason just doesn't give me the same replies I get searching the code on GitHub or Visual Studio.
Now I tried the OS X version of PyCharm and the Red Hat compliant version of it. I tried Ctrl + F, double Tab, and probably everything under the menus and just can't get the results I get elsewhere.
Am I missing something, should I configure additional stuff?
I needed to use Ctrl Shift F instead of double Tab
Please look at the structure in project view. You can get your function and variable names there.