Live data from Hacker News

Python in Visual Studio Code

blogs.msdn.microsoft.com

81–90 of 202 posts

Re: Python in Visual Studio Code

#81
post #52

Earlier quoted context omitted.

The vscode vim bindings are atrocious. I use them because there's nothing better, but they're bad . Slow, super buggy, and did I mention slow? I hit tab and sometimes instead of inserting a \t, it inserts the letters " ". And it re-runs mypy/flake8/etc whenever I enter or exit insert mode, which I do a ton... so my CPU is constantly pegged. And commands like "2d}" don't delete the correct amount of paragraphs. And on…

What's the bug that you have with `2d}`? It seems to work fine for me. There shouldn't be any reason that it reruns save upon entering/exiting insert mode; are you sure you don't have some kind of keybinding/other setting that's autosaving for you? The ` ` issue is kind of a pesky race condition that's most likely exacerbated by VSCodeVim running slowly on your computer. Speaking of it running slowly, I would argue a…

Thanks for your work. I've been using vscodevim for a while and it works like a charm out of the box.

Re: Python in Visual Studio Code

#82
post #4

I am somewhat embarrassed, but also relieved to admit that I switched from vim (nvim to be precise) to VSCode (OMG M$FT!) and am very happy about it. I still use vim bindings as much as I can, but I guess giving up a bit of ideology can benefit one a lot. Although, that is until I start running out of memory on my personal laptop, then it's back to the terminal!

The vscode vim bindings are atrocious. I use them because there's nothing better, but they're bad . Slow, super buggy, and did I mention slow? I hit tab and sometimes instead of inserting a \t, it inserts the letters " ". And it re-runs mypy/flake8/etc whenever I enter or exit insert mode, which I do a ton... so my CPU is constantly pegged. And commands like "2d}" don't delete the correct amount of paragraphs. And on…

I had similar problems. Certain key combinations in vscode would cause the cursor to delete or corrupt large sections of my code and delete the undo history. After losing hours of work a few times, I went back to Vim. I really like the process of customizing my editors and having them work the same on all machines, even remote servers. (Vim for coding, and Emacs/Evil for Org Mode.)

Re: Python in Visual Studio Code

#83
post #13
post #4

I am somewhat embarrassed, but also relieved to admit that I switched from vim (nvim to be precise) to VSCode (OMG M$FT!) and am very happy about it. I still use vim bindings as much as I can, but I guess giving up a bit of ideology can benefit one a lot. Although, that is until I start running out of memory on my personal laptop, then it's back to the terminal!

> can benefit one a lot. What are those benefits? I tried to switch from vim to VSCode, and it just felt like it confined me. To be fair, I don't "run vim", per say, I run a shell with tmux inside, split horizontally in two, with vim on top, and two shells (a vertical split) underneath. The left shell on the bottom being used for miscellaneous things, and the right one running some kind of live code checking (with vi…

Yup, this is also my setup and workflow, and I also agree with what you say about VSCode feeling 'confining'.

This is probably just a matter of opinion/preference, but I feel like an editor should simply be an editor -and IMO there is no better editor for turning thoughts into code with minimal friction than VIM/Neovim. The OS functions perfectly fine as an IDE for everything else.

Re: Python in Visual Studio Code

#84
post #72
post #13

Earlier quoted context omitted.

> can benefit one a lot. What are those benefits? I tried to switch from vim to VSCode, and it just felt like it confined me. To be fair, I don't "run vim", per say, I run a shell with tmux inside, split horizontally in two, with vim on top, and two shells (a vertical split) underneath. The left shell on the bottom being used for miscellaneous things, and the right one running some kind of live code checking (with vi…

I could never get used to NERDTree for navigating through my project. What plugin do you use for project navigation?

I use fzf[1] for all my project navigation needs. It integrates very well with vim. You can get a quick recursive look at everything in the CWD with a stroke of a key and the fuzzy matching is instantaneous.

[1] https://github.com/junegunn/fzf

Re: Python in Visual Studio Code

#85
post #51

Earlier quoted context omitted.

I've been trying to get into VSCode for Python development, especially Django since the first official release of VSCode, every time I returned to PyCharm. I just decided to accept PyCharm the only IDE that can make me productive and go fast!

I had a similar experience. What are you missing?

* Auto complete * Integration with Python and Django, Flask. * Test runner (running the failed tests etc). * Amazing type hinting support. * Python console. * Support for pipenv, pip, virtualenv, etc. * Remote Python interpreter (working on Windows, but Python is inside a VM.) * Crazy Git support in one place (going through all the file history or selected lines history.) * Fast indexing. * ...

Some of the above or maybe all of them can be achieved in VSCode, but they never feel native and well integrated in there.

To me PyCharm seems to be built for these, they create, design and develop an IDE exactly for a specific audience. That's why PyCharm for Python, WebStorm for web and PHPStorm for php development.

Re: Python in Visual Studio Code

#86
post #48
post #30

I wonder how intellij will survive if vscode becomes a standard for pretty much every language. Which makes me wonder if kotlin will also survive if intellij goes bankrupt.

I've used Intellij for the Java, Python, Ruby, PHP, JavaScript, TypeScript. I can say that in no way I found VSCode be able to to take on it, even the JavaScript support and they way they have integration with many JavaScript frameworks and other languages frameworks is something I cannot find in VSCode. Intellij IDEs are really fast, very well integrated and made to get me productive, I couldn't find that in VSCode.…

> Intellij IDEs are really fast

I would strongly dispute this. I love the JetBrains IDEs and have been using IntelliJ IDEA for many years, but performance in general is definitely not one of its strong suits (though it has improved significantly over the years).

IntelliJ just feels very sluggish to me, and regularly lags and hangs on our (rather large) work codebase. Anything that causes the IDE to start indexing takes about a full minute before it is usable again. Then there's the occasional crash due to a bad plugin. And it definitely (at least for me) uses more battery on my MacBook than any other editor I've tried.

Having said all that, I try VSCode and other editors every couple months, but I always find myself coming back to IntelliJ IDEA for the reasons you mentioned. Currently, it's just a superior and "smarter" IDE, though I expect Microsoft to narrow the gap over time.

Re: Python in Visual Studio Code

#87
I've been pretty happy with PyCharm, having come from a java+Intellij background, but I'm open to other options.

So I'd be curious if someone can comment how VSCode compares to PyCharm wrt language aware features, such as: contextual selection, refactoring, finding usages, method/function extraction, auto-fixing, etc...?

Re: Python in Visual Studio Code

#88
post #54
post #24

I've been using VI since the 90's and VIM since... well the 90's. VSCode is the first IDE I've been able to live, and happily. It blows my mind. I have a tonne of tooling around automated python environments, vim plugins (now vscode plugins), tasks - and it's made the whole thing significantly more 'unixy' than it was before. And to think - MSFT! I have git hooks for my homedir's dotfiles that automatically look to s…

Just out of curiosity, what are some of the tasks that you run in vscode ? I've never found a real use for them, so I want to know what other people use them for.

I use them to convert markdown files to pdfs and open them. It can be as simple as the shell command `pandoc .md -o .pdf; open *.pdf`, and for more complicated documents, you can just write a makefile and have vscode use that.

Re: Python in Visual Studio Code

#89
post #52

Earlier quoted context omitted.

The vscode vim bindings are atrocious. I use them because there's nothing better, but they're bad . Slow, super buggy, and did I mention slow? I hit tab and sometimes instead of inserting a \t, it inserts the letters " ". And it re-runs mypy/flake8/etc whenever I enter or exit insert mode, which I do a ton... so my CPU is constantly pegged. And commands like "2d}" don't delete the correct amount of paragraphs. And on…

What's the bug that you have with `2d}`? It seems to work fine for me. There shouldn't be any reason that it reruns save upon entering/exiting insert mode; are you sure you don't have some kind of keybinding/other setting that's autosaving for you? The ` ` issue is kind of a pesky race condition that's most likely exacerbated by VSCodeVim running slowly on your computer. Speaking of it running slowly, I would argue a…

I'm sure the real Vim power-users might miss a whole bunch of stuff, but I consider myself an intermediate Vim user, and I think VSCodeVim is great. Almost all Vim commands I use seem to be supported. So thanks for your work :).

Re: Python in Visual Studio Code

#90

I have been following this extension ever since Don Jayamanne joined Microsoft. This has grown by leaps and bounds since then and is a fantastic extension. I was a little leary when I learned they were tossing out jedi in favor of the VS Python language server. However, after playing with it for a month or so now I can tell that it's a drastic improvement over what's currently in place. If anybody from the MS team is…

The key thing to know is that the Microsoft Python Language Server -- long, official name I know, hence why we just call it MPLS internally ;) -- comes from our Python workload for Visual Studio. It was an extremely tough call to make because David Halter has done a great job with Jedi and running that project. But in the end we decided that if we were going to need to keep the IntelliSense engine in Visual Studio going then we should get more out of that investment by turning it into a language server and making it available in VS Code.

But I will say (and continue to say) that we are extremely grateful to David Halter and everyone who has worked on Jedi. It gave the extension the initial IntelliSense support it needed in order to be successful. And we currently have no plans on removing Jedi support for those that prefer it (from the extension's perspective we're actually trying to treat the language server as yet another project we have integrated support for, but where we have a direct line to when a bug or feature crops up that we would like to see addressed ;) .

Post reply on HN