Live data from Hacker News

Python in Visual Studio Code

blogs.msdn.microsoft.com

151–160 of 202 posts

Re: Python in Visual Studio Code

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

How does Sublime Text compare to VScode for you? I am curious about the choice between the two, and why one would be better.

I can't Sublime in any way - and I say that having tried TextMate on OSX a decade or so back. Sublime just isn't VIM in so many different ways, it hurts. Neither is VSCode - but the varying tradeoffs are solidly worth it (IMHO).

I've also JetBeans'd (2001-2003) with varying success, and have been trying PyCharm on and off since 2014, just due to the promise. They're not there - or at least not enough.

JetBeans constant need to move my profiles around (literally they change per version) has made my strategy of having revision control sync things throughout a nightmare. Also, due to some files being binary - I just couldn't.

VSCode - and especially now that I have the global tasks plugin has simply blown my mind. Every (python django) repository I have has a wrapper script, as part of my tooling - I simply have vscode call that. Now, I have several commands I used to jump to a terminal for, run within code, in a collapsed terminal. It's great. My #1 use for that is a profiler and runserver. In dev, I always, always want them running.

It's much the same for other languages - and my environment.

Re: Python in Visual Studio Code

#152
post #73

What I'm hoping for, for all langauges and runtimes, is some global opt-in to WSL. If I have node or python installed on WSL, I would love it if the Windows version of VSCode could act as if it were the Linux version.

Not a Windows users but curious about WSL - could you run Linux VSCode under WSL?

with X server

Re: Python in Visual Studio Code

#153
post #147

Earlier quoted context omitted.

Interesting how many people have switched from vi/vim to vscode. Does anyone have stories of making a similar switch from emacs? I currently use intellij for java work (because my employer pays for the license) but for most any other type of editing I use emacs. I'd be interested to see what other emacs users think of vscode.

I am currently switching from emacs to VS Code. I am using an emacs keymap and I must say, it is wonderful. For Python, I can per project easily select the right virtual environment, the "intellisense" like system is working very well, it is pretty fast and you can customize a lot of it. I am expecting to slowly move out of emacs for my coding in the next few months. Emacs will be kept because I have a lot of org-mod…

I have some code that automatically builds virtualenvs for me - in directories (it overrides cd). With vscode, I can change the python interpreter, simply by giving it knowledge of where I store my venvs... with one variable!

I can't even tell you how hard that was with VIM.

Re: Python in Visual Studio Code

#154
Since the 80s and BRIEF (anyone remember that?) I have relied on record/play keyboard macro with every programmer's editor I've used. This fundamental feature is missing in VSCode, sadly it's a complete showstopper for me. I get the impression that VSCode's architecture makes this difficult or impossible to implement as an extension.

Re: Python in Visual Studio Code

#155

Earlier quoted context omitted.

> 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 tak…

Are you sure you're not just running out of heap space? That problem appeared really quickly when we migrated our devs to IntelliJ, and slowed it down to a crawl. The default 750MB are just not enough for projects with 5000+ Classes.

IMO it shouldn't fall on the shoulder of users to manage the application's memory allocation on its behalf.

Re: Python in Visual Studio Code

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

Same here for me, but with Emacs. I've used it for decades and love it. One day I heard that VSCode had an MIT license, so I figured I'd see what all the fuss was about.

Wow. Everything actually "just worked". Python had perfect syntax highlighting out of the box. It noticed that I had pylint installed and started using it. It was trivially easy to set up per-workspace virtualenvs. Its git plugin certainly isn't the awesomeness that is Emacs's magit, but it's totally sufficient for normal day-to-day workflows.

It's now been a couple of months since I fired up Emacs at all, and now most of my coworkers have also switched to VSCode (yay for making it easy to share settings among coworkers within a project!). I am far, far from an MS fanboy, but they hit this one out of the park. Well done, team.

Re: Python in Visual Studio Code

#157
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 have a bunch of docker wrappers for restarting various things. I have some GNU Make targets, flake8, ansible-playbook calls that I run, some django targets. Since I structure things similarly, I'm 100% okay with the idea that a specific command is useless in a specific project (i.e no make for X).

But the idea is that I can than wrap django's manage.py to collect just the commands we write, do something similar for make targets, and selected other things - so that I can just continue working and check on the task later.

In my mind, almost anything other than linting, debugging, profiling, and deploying shouldn't need to interrupt my flow.

Re: Python in Visual Studio Code

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

How does Sublime Text compare to VScode for you? I am curious about the choice between the two, and why one would be better.

I loved Sublime Text for years, but it gave me every impression of being dead on the vine. Since it's proprietary, there's not the option of forking it to add my own features and fixes. I personally find VSCode to be at least as good as ST in every way, and much better in many.

Re: Python in Visual Studio Code

#159

Earlier quoted context omitted.

Could you expand on what "Your way" is? I really really like VSCode for Python and never had the nerve to learn VIM, so I'm wondering what you do that causes it to be a fight.

Well, the setup I mostly use looks like this: https://imgur.com/a/A9b3izE I've tried getting something like that going in VSCode, but even just switching between terminals and compiling and so on is just too confining. Whenever I've tried, there's always some part of it that doesn't let me easily do something, because it expects one to use it some other way. With a shell, tmux, vim and other CLI tools, it's all based…

This is pretty much why I haven't moved fully to VSCode as well. I gave it a try but I realized that my whole workspace is in terminal. Also, like you said the tools I have compliment to one another very well making it very flexible. The only thing I do miss when working in terminal is that whenever I'm working in markdown I wish it had dead simple preview like that in VSCode.

Re: Python in Visual Studio Code

#160
post #109

Earlier quoted context omitted.

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

Ah... copypasta ho. code --install-extension batisteo.vscode-django code --install-extension bibhasdn.django-html code --install-extension Compulim.compulim-vscode-closetag code --install-extension donjayamanne.jupyter code --install-extension donjayamanne.python-extension-pack code --install-extension DotJoshJohnson.xml code --install-extension ecmel.vscode-html-css code --install-extension formulahendry.code-runner…

Over the past year I've cobbled together a few plug-ins for (neo)vim that mostly works for ruby+rails (thanks tpope!) - the one thing missing right now is tag support/"go to definition" for haml/scss on a legacy project.

My question: to you have go to definition/tags setup in va code w/vim - and if so, how have bound the keys to get there?

[ed: looks like a sibling comment answered this in part already]

Tpope has a magnificent tools that allow jumping into gems - and I'm curious if you have something similar for python - allowing you to jump from your code, to pip/egg/package code, to python stdlib code.. And maybe all the way to c source for extensions?

See: https://github.com/tpope/gem-ctags And much more

Post reply on HN