Live data from Hacker News

Python in Visual Studio Code

blogs.msdn.microsoft.com

91–100 of 202 posts

Re: Python in Visual Studio Code

#91
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…

> Overall, I do agree that there's stuff that can improved, but it kinda hurts to see people call them "atrocious"

Sorry :( I hate to be harsh and I don't want this to get you down, because I have a lot of admiration for the work you do (and this goes to any open source work I've ever criticized, really). So, thank you for your work.

But... the usability is really bad. They would be completely fine in a vacuum if vim didn't exist, but the point of comparison exists and it's vim and vim is just crazy fast compared to vscode-vim, it's like comparing a racer... to a fighter jet.

> What's the bug that you have with `2d}`?

That only deletes one paragraph (like 1d}) instead of two. 3d} only deletes two, and so on. It's not consistent with vim.

> There shouldn't be any reason that it reruns save upon entering/exiting insert mode

shrug, I filed an issue about this a couple weeks ago after a decent bit of debugging.

> I suspect your main issue with VSCodeVim is really the "slowness" issue

ish, it's definitely the primary pain point but there's also lots of small bugs and inconsistencies with vim. And I understand that competing with vim itself is hard, but the other comparison point is for example pycharm's vim plugin and vscode's is far behind.

Edit: And just to echo tdfx's point, without your bindings I wouldn't even be on vscode, so there's that :)

Re: Python in Visual Studio Code

#92
I'm using VSCode for my FE work and love the tooling, integrations and marketplace. Happy with the vim plugin, formatting support and terminal support within the IDE. Not a surprise here coming from Visual Studio. In the past I've considered splurging on JetBrains' Webstorm IDE. Glad I didn't.

Will give it a whirl for the BigData/ML related scripts. Nice to see one IDE being the GoTo for different lines of work.

Having said that, with the latest update (1.26.1), I'm seeing a significant lag in keystrokes. Not sure whether a plugin is the culprit.

Re: Python in Visual Studio Code

#93
post #78

Earlier quoted context omitted.

What vim plugin(s) do you use? I remember installing one but the emulation did not quite work for jumping into code definitions and back (it'd jump, but going back wouldn't work correctly), so I moved back to pycharm for the time being (vim emulation worked better there for me).

A tonne of them, all managed by pathogen. I actually have a chunk of my bashrc that automatically reinfects my vimdir. Below are the ones I can easily grab. I also have a tonne of homebrew over the years, and a love/hate relationship with Jedi, YouCompleteMe and friends. https://github.com/noahfrederick/vim-skeleton vim-skeleton https://github.com/majutsushi/tagbar tagbar https://github.com/tmhedberg/SimpylFold Simpy…

Thanks, but, my bad (I also use some of those with native VIM). I was talking about VS code VIM plugins.

Re: Python in Visual Studio Code

#94
I love using VSCode and find that I have less need for any other IDE with each new release. This one might finally eliminate one of my remaining needs for pycharm.

I can't help but feel sorry for Jetbrains though, who seem to be in a similar position to Opera back in the late 2000s, a small software company up against a behemoth that can afford to subsidize the development of an open-source alternative to their bread and butter.

Re: Python in Visual Studio Code

#95

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...?

I prefer Pycharm because of multiple reasons.

1. Same key bindings and similar functionality out of the box across a lot of languages.

2. Language injection, i.e, have a string in your python function containing sql or html or js or anything.

3. Generally better than the competitors. For python that may not be true, as python is highly dynamic and not possible to do too much static analysis, but Pycharm does a good job.

4. All jetbrains products are very well integrated with the ecosystem. e.g, virtualenv, jinja2 out of the box.

Re: Python in Visual Studio Code

#97

Updated to the August release of VSCode this morning and discovered that debugging python in the editor is broken. The editor refuses to recognize PYTHONPATH specified in the environment or a .env file. (This refers to VSCode on Windows 10). The hack to work around this is to specify it in the launch.json file. Otherwise I absolutely love VSCode and particularly the Python extension.

Please file a bug at https://github.com/microsoft/vscode-python/issues

Re: Python in Visual Studio Code

#98

Earlier quoted context omitted.

What vim plugin(s) do you use? I remember installing one but the emulation did not quite work for jumping into code definitions and back (it'd jump, but going back wouldn't work correctly), so I moved back to pycharm for the time being (vim emulation worked better there for me).

I use this: https://marketplace.visualstudio.com/items?itemName=vscodevi... You can also have it use neovim as the backend as well: https://marketplace.visualstudio.com/items?itemName=vscodevi...

Thanks!

Re: Python in Visual Studio Code

#99
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 don't think the undo feature is built out well enough for it to be a great idea for you to switch to it. I tried to build an undo tree and saw that there is a granularity mismatch between the internal stack and yours. I think the API should be redesigned so that plugins can manage the undo stack but the team seems pressed on time so I gave up for the time being. The issue is still open so I'm hopeful they might come back to it.

Re: Python in Visual Studio Code

#100

I love using VSCode and find that I have less need for any other IDE with each new release. This one might finally eliminate one of my remaining needs for pycharm. I can't help but feel sorry for Jetbrains though, who seem to be in a similar position to Opera back in the late 2000s, a small software company up against a behemoth that can afford to subsidize the development of an open-source alternative to their bread…

Opera was a one trick pony, Jetbrains seems to be decently diversified in the products they offer that covers a large number of developer users and development stacks. That's not to say it doesn't hurt but their situation isn't as dire as Opera's was.
Post reply on HN