Live data from Hacker News

Turning Sublime Text into a Lightweight Python IDE

cewing.github.io

51–60 of 154 posts

Re: Turning Sublime Text into a Lightweight Python IDE

#51
My path with Python IDEs has been:

- Visual Studio (when I was a student)

- Emacs (when I ceased to be a student)

- PyCharm (when my job paid for a license)

- Sublime Text (when I wanted something comparable to Emacs with some niceties thrown in and a single license cost)

All in all I think PyCharm is the most productive I have used. Minimal setup, the best code inspection I have used, nice integrations with things like git out of the box.

But Sublime Text has my heart at the moment because with the Emacs Pro package it has a very Emacs-y feel with almost identical key bindings (slight differences here and there). The package manager may be a bit "odd" and feel like a sidecar, but coming from Emacs...it feels pretty straightforward.

Sublime Text is also language agnostic so that's a plus.

At the moment I use PyCharm Professional for work and Sublime Text for personal stuff...and I think it strikes a good balance. Productivity where my requirements are strict and cost not a factor and flexibility where I like to try new things and recurring fees don't appeal.

Re: Turning Sublime Text into a Lightweight Python IDE

#52

Earlier quoted context omitted.

Completely agree. I can't use even the best editor if it doesn't provide basic navigation, and debugging functions. 20 years ago, people claimed that IDEs were bad, but now the situation have changed. PyCharm has almost everything that Sublime has, and even more, there's vim mode, which moved editing to a new level.

I totally agree PyCharm's navigation and debugging functionality are fantastic. That said, when I last tried it (about 2-3 years ago), my Python code ran incredibly slow. I have a relatively large but not huge Django based python project (~2M LOC with libraries), but with debugging enabled my Python code practically ground to a halt. It's possible I misconfigured the debugger, and I can't remember how long I spent tr…

They've made some improvements to the debugger recently. Enabling Cython doubles the speed but the biggest improvement is using Python 3.6. They now use the frame eval hook that was added and they claim it's 40x faster.

Re: Turning Sublime Text into a Lightweight Python IDE

#53

Earlier quoted context omitted.

Completely agree. I can't use even the best editor if it doesn't provide basic navigation, and debugging functions. 20 years ago, people claimed that IDEs were bad, but now the situation have changed. PyCharm has almost everything that Sublime has, and even more, there's vim mode, which moved editing to a new level.

I totally agree PyCharm's navigation and debugging functionality are fantastic. That said, when I last tried it (about 2-3 years ago), my Python code ran incredibly slow. I have a relatively large but not huge Django based python project (~2M LOC with libraries), but with debugging enabled my Python code practically ground to a halt. It's possible I misconfigured the debugger, and I can't remember how long I spent tr…

Pycharms 2017 debugger (pydev), is much faster now. You meed to use python 3.6 though. The debugger window suggests to install some bindings. If you do that the debugger runs much much faster.

Re: Turning Sublime Text into a Lightweight Python IDE

#54

Earlier quoted context omitted.

Completely agree. I can't use even the best editor if it doesn't provide basic navigation, and debugging functions. 20 years ago, people claimed that IDEs were bad, but now the situation have changed. PyCharm has almost everything that Sublime has, and even more, there's vim mode, which moved editing to a new level.

I was a big fan of PyCharm, but VSCode is getting there in terms of IDE functionality, especially for Python. It's a decent daily driver for me now.

I really want to use VSCode, but the one HUGE thing holding me back is lack of a hot key to show/hide VSCode. I use iTerm and am used to opening/closing it with Ctrl + `. Having to use Cmd + Tab and then making sure I actually choose VSCode and note another application that I was just in really slows me down.

Re: Turning Sublime Text into a Lightweight Python IDE

#55
post #25

Sublime Text comes with a great system for Package Control. [...] To install a plugin using Package Control, open the command palette with shift-super-P (ctrl-shift-P on Windows/Linux). The super key is command or ⌘ on OS X. When the palette opens, typing install will bring up the Package Control: Install Package command. Sublime doesn't actually come with Package Control and Package Control itself is a confusing usa…

True.. I have never bothered to find out how the ST community grew so much. It's a paid product and somehow people have built plugins for a package manager that is not even part of the core IDE. Does anyone know the history here?

When Textmate stalled between versions for years on end, Sublime came in with Textmate compatibility and simply scooped up a huge userbase who wanted something like Textmate on other platforms or were tired of waiting on Textmate to release a new version. Sublime is a Textmate clone that outdid the thing it was cloning but worked with all the existing Textmate bundles. That's how.

Re: Turning Sublime Text into a Lightweight Python IDE

#56
post #8

Earlier quoted context omitted.

A colleague of mine really likes VSCode for Node, as it's more of an IDE than Sublime text. However, for text editing, outside of vim itself, I haven't encountered anything remotely as good as sublime text. Really. Why would I use Atom with all its slowness for most text editing tasks? And VSCode has more features than I need for text editing. Is it particularly pleasant to open a bunch of XML, JSON, YAML, etc files…

When was the last time you used atom? I switched from sublime a few months ago and have been quite happy. The only thing I really miss is an easy Node.js build system. I probably just haven't figured out the atom equivalent.

I haven't tried Atom since one of its earlier releases. I haven't tried it again since the slowness seems to be the number one complaint. I figure when it's not the most common complaint, maybe it'll be worth another shot; I suppose if everyone is doing this and makes comments like my previous one, no one will actually ever try it again.

Re: Turning Sublime Text into a Lightweight Python IDE

#57
I have mixed feelings about this.

I love Sublime Text. But it's also a real pain to get set up correctly. I want to like PyCharm . . . but it's also a real pain to get set up correctly, and it's slow as junk.

Then again there's straight up Visual Studio with Python tools, which is also a real pain in the ass to get set up and ready for use. And slower than I want it to be.

And vim, which is great when you get it going, but is also a huge pain in the ass to get set up.

Are we seeing a trend here?

I am. And the trend is that comprehensive IDEs really just take a lot more work with dynamically typed languages than they do with statically typed ones. Code introspection and completion is just a lot harder when you're guessing about stuff.

I don't know. I haven't found the sweet spot, and I prefer to spend my time getting things done instead of configuring tools.

My instinct is to choose the tools that are fast. Vim, Sublime Text. But fast has limitations. I have a pro license for PyCharm on my own dime, but I've always just given up when it comes to configuring it to something that makes sense.

Blargh.

This situation is a thing that makes me just a tiny little bit envious of the C# crowd. Visual Studio + Resharper is basically the best in class of coding tools. Yeah, you're going to spend some time with setup, and you are not going to edit shit on the fly on a server.

That tooling really works and works well. And SSMS is the gold standard for SQL IDEs. The open source Python part of me is incredibly jealous of the Microsoft tooling stack.

Some of the limitations with Python are by nature of the language, and some are because we just seem to be willing to settle for good enough.

But damn, I really miss Visual Studio environment when working with Python and Postgres instead of C# and SQL Server. I'm actually playing with C# and SQL Server for toy projects sometimes just because the tools are so good. If you happen to have a Windows box laying around. Which, you do, if you play any games.

PyCharm is the closest thing to that experience, but it's so gross, I just kind of can't stand it. Every time I sit down and decide, "Okay, I'm going to make this work for me. Today." I just give up. Fuck it. I'll just go back to vim and Sublime Text. They are good enough.

Re: Turning Sublime Text into a Lightweight Python IDE

#58
post #33
post #16

i'd just rather use pycharm. https://www.jetbrains.com/pycharm/

5 minutes to start

I've never had it take 5 minutes on a ~3 year old Intel i5 with a cheap SSD. Maybe 10 seconds. Scanning a large project might take 30-60 seconds. 5 minutes would be painful. What kind of set up do you have and what size project?

Re: Turning Sublime Text into a Lightweight Python IDE

#59
post #46
post #40

Earlier quoted context omitted.

Of course the creator of Package Control now works for the creator of Sublime Text and the install is automated from a menu item. I wouldn't be surprised if it gets integrated further, especially now that they've started to cleanup the UI and icon.

I hope you're right, it just seems like a very long way to go, given the starting point. You've got this: http://i.imgur.com/xMiyCN4.png But what you probably wanted was this: http://i.imgur.com/x9JzYAU.png

Yeah, it's a mess. For what it's worth though, it's a far sight better than ELPA in my experience. Though I stick mostly to JetBrains products because the experience is very nicely integrated.

Re: Turning Sublime Text into a Lightweight Python IDE

#60
post #48

> The final requirement for a reasonable IDE experience is to be able to follow a debugging session in the file where the code exists. > There is no plugin for SublimeText that supports this. But there is a Python package you can install into the virtualenv for each of your projects that does it. This drives me batty whenever I see "turn XYZ into an IDE for (foo)." The author of this post at least lists debugger inte…

That's because your definition is flawed.

When it's all said and done, all that matters is that you're able to get the work done. Take vim, for example. You can quite often use CLI tools to get the work done due to vim's integration into the surrounding ecosystem, and this includes things such as debuggers.

For a language like C#, you're never going to find as integrated an experience as you will with Visual Studio. It's just not going to happen.

But for everything else, you absolutely can be as productive in something like vim, the workflow is just different.

Post reply on HN