11 ms·
Turning Sublime Text into a Lightweight Python IDE
- pvg 9y agoSublime 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 usability nightmare. It's a fine and snappy cross-platform editor but the whole extensibility thing has unfortunately turned out ugly and unpleasant.
- giancarlostoro 9y agoI always thought that was a little odd. Not sure why it's not just "preinstalled" already. I doubt the author of ST doesn't use plugins? If he wanted it to be optional he should make it opt-in as a default that you could take off if you didn't want it....
- pvg 9y agoI'm not really sure what it is, perhaps the authors of Sublime want to keep to a very basic minimal core and leave a lot of the other stuff as an exercise for the extension mechanism. VS Code seems to strike a good middle ground on this - it's all still a pile of JSON config files but the UI for managing it doesn't make you want to run away from home and become an itinerant chartered accountant.
- jolux 9y agoOf 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.
- pvg 9y agoI 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 http://i.imgur.com/xMiyCN4.png But what you probably wanted was this: http://i.imgur.com/x9JzYAU.png http://i.imgur.com/x9JzYAU.png
- jolux 9y agoYeah, 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.
- hpaavola 9y ago> Part of the reason is allowing it to have a different release cadence, but also to not default to making outbound network connections without a user opting in. https://news.ycombinator.com/item?id=12553484 https://news.ycombinator.com/item?id=12553484 wbond is the guy behind Package Control and he also develops Sublime Text.
- newsat13 9y agoTrue.. 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?
- oblio 9y agoI think it got really popular, especially in the Rails community, because of the flashy multi-cursor demos on the site. I believe it was the first CUA/mainstream editor with multiple cursors.
- bronson 9y agoPretty sure you're thinking of TextMate. RailsCasts probably sold thousands of TextMate licenses, and DHH's screencasts thousands more. No doubt some Rails devs use Sublime but it's nowhere near as popular as Vim.
- oblio 9y agoI could be mixing them up, it's been a while. But I do remember some spiffy videos demoing the multi-cursor thing and I don't think TextMate supports (supported?) those. I also vaguely remember that most of these demos were on Macs and they were showing off editing of Ruby code. But as I was saying, it's been a while :)
- wingerlang 9y agoFor starters you can use it for free indefinitely. The package manager might not be in the core product, but I recall it was bought by Sublime so it's official. Also a really really solid editor.
- pvg 9y agoI really have no issue with paying for it and have easily got my money's worth out of it. I just had some naive hope it might develop into something emacs-like (in terms of extensibility) but less crufty and it's mostly become less-than-emacs-like but just as crufty.
- jacobsimon 9y agoSlow news day?
- wyqydsyq 9y agoWait — People are actually still using ST in 2017? And here I was thinking Atom and VSCode had dominated the IDE/Editor environment
- ryanar 9y agoAtoms too slow, and I have never felt lacking for using ST, plugins give you linters, autocomplete, autoformatting (yapf, prettier), you can integrate git, though I prefer CLI. ST just works, is blazing fast and I love its jump to and multiediting shortcuts
- phalangion 9y agoPeople are still using Vim and Emacs, too.
- djanatan 9y agoSome of us even use both.
- tanilama 9y agoPycharm is very popular.
- jjawssd 9y agoThe 2017 refresh is especially blazing fast and high optimized for low latency input >Zero-latency typing is now on by default: typing latencies for PyCharm 2017.1 are lower than those for Sublime Text and Emacs https://blog.jetbrains.com/pycharm/2017/03/pycharm-2017-1/ https://blog.jetbrains.com/pycharm/2017/03/pycharm-2017-1/
- tanilama 9y agoRemote deployment is the killer feature for me at this moment.
- 9y ago
- mylons 9y agoi'd just rather use pycharm. https://www.jetbrains.com/pycharm/ https://www.jetbrains.com/pycharm/
- solomatov 9y agoCompletely 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.
- seanp2k2 9y agoI 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.
- heyoni 9y agoThe debugger in vs code is nearly on par with pycharms. It's crazy how right they got it from the getgo
- ren01r 9y agoDevelopment tools were a strong suite of Microsoft from the beginning. But, VSCode is really great and admirable.
- stickperson 9y agoI 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.
- coldtea 9y ago
- throwaway324237 9y agoEmacs.
- pfarnsworth 9y agoPyCharm is better for pure Python development, but I still use Sublime because of inertia. It does most of what I need it to without changing much regardless of which language I'm currently programming in so I'm pretty happy with it. Plus I spent $80 or whatever the cost was to pay for it myself so I have more incentive to use it.
- ya3r 9y agoI have used similar setups in Sublime Text for Python development, the main issue is instability and inefficiency. Installing these set of packages in sublime makes things slower and more unstable. Multiple times while editing large files my editor would slow down or crash.
- cantcopy 9y agoA lot of unjustified negative comments. Sublime Text is a nice fast IDE for python. So is PyCharm. CWWFY (Choose what works for you)
- duiker101 9y agoIndeed. I use both. If I have to do something quick, I just open it in Sublime(chances are I have it already open because it's also my notepad) but if I need the full env I just fire up IntelliJ.
- gocolts23 9y agoSublime Text is a nice text-editor with bolted on pieces that bring it closer to an IDE, but it's not really "integrated" -- PyCharm does this all much better.
- gitonup 9y ago> 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 integration as part of the IDE experience, but comparing against actual full fledged commercial / non-plugin-composite IDEs? I haven't seen one article for turning Atom/ST/Vim/etc into an "IDE" that comes close (edit: that is, close to a reasonable debugging experience, in an integrated way) capability-wise. There's nothing wrong with taking that approach, but if you need to shim on GDB and use a plugin to just follow along in source (forget setting watches, gutter-click breakpoints, conditional breakpoints, etc., from Sublime Text), that's pretty definitively not integrated into Sublime.
- braveo 9y agoThat'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.
- gitonup 9y agoMy definition of what? I literally said there's nothing wrong with taking that approach. I quite purposely did not argue productivity. My issue is with the acknowledgment by the author that the standard for "IDE" includes debugging capabilities and then goes on to provide a plugin that provides follow-along only via running GDB, which would need to be configured (I assume, since the author does not specify) the normal ways. If you want to argue UNIX is the IDE I can get behind that definition, but the debugger is absolutely not integrated into Sublime (or Vim or Atom or N++ or ...) in any meaningful way.
- gshulegaard 9y agoMy 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.
- cjauvin 9y agoI have had a similar path, except for VS. I have been happy (and still am) with Emacs for a very long time (in particular, I really like how easy it is to have some code in the left window, which I can easily send to an IPython REPL in the right window), but recently, for a new job, I picked up PyCharm Pro, and I must say that it's been pretty transformative. Three aspects stand out IMO: - It's a fantastic tool to explore and understand big, industrial codebases - The testing and debugging support is stellar - The Emacs binding emulation is great (so it's easy to feel relatively at "home")
- wonderfool 9y ago> I really like how easy it is to have some code in the left window, which I can easily send to an IPython REPL in the right window This sounds pretty great. Would you mind explaining how that works? Is it specific to Emacs?
- cjauvin 9y agoIt's actually quite easy, as it comes pretty much out of the box with recent versions of Emacs (24+) and python.el (not to be confused with the older python-mode.el). I could not find a nice web source for python.el's documentation, but it turns out that directly reading its code is not so bad in this case: https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/python.el https://github.com/emacs-mirror/emacs/blob/master/lisp/progm... In particular, you need to set the `python-shell-interpreter` variable to "ipython" (which must be in your path preferably). You can then invoke `run-python` to start a REPL, and C-c C-c to send a buffer to it. There are a couple more interesting commands with this mode, see: https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/python.el#L323-L329 https://github.com/emacs-mirror/emacs/blob/master/lisp/progm...
- ianamartin 9y agoI 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.
- therealmarv 9y agoNo mentioning of Anaconda for Sublime? It has many of this features out of the box. But the best IDE experience (beside PyCharm) is really using VSCode + the most popular Python extension https://github.com/DonJayamanne/pythonVSCode https://github.com/DonJayamanne/pythonVSCode This setup is a total replacement for PyCharm for me. Code Refactoring, code definition jump, IntelliSense suggestions and help, linting, virtualenv support, code formatting etc. etc. And last but not least VSCode and this extension are both free, open source... unlike Sublime and PyCharm.
- philsheard 9y agoMy biggest problem with VSCode was the loss of ST's support for working across multiple project folders. When I'm working with Django I'll break code out into reusable apps but find it difficult to work concurrently on these separate folders of code. Would love to hear if there's a setting I was missing as I'd like all the other features in VSC.
- dchest 9y agoI have each project open in a different VSCode — is that what you're asking for? You can do File > New Window and then open another project in it or just set "window.openFoldersInNewWindow": "on" to always open directories in a new window.
- jsmeaton 9y agoMy only issue with vscode and the python plugin is the debugger. It's completely broken for django projects even if you can manage to figure out the special incantations from piecing together information from the wiki and 5 or 6 issues (some closed) in the repo. For those interested: * expose the right port (if remote debugging) * install ptvsd into the virtualenv * ptvsd.enable_attach(..) # in manage.py * ptvsd.wait_for_attach() # in manage.py * run the debug server in single threaded mode * run the debug server with noreload PyCharm debugging is really top notch, but I don't like the editing experience nearly as much as in sublime or vscode. The keybindings and shortcuts feel so much better in vscode that I'd rather use ipdb in a terminal when I need to debug.
- jrimbault 9y agoJust my two cents, I prefer to use syntax specific settings instead of global user settings in Sublime Text. I think it is more flexible.
- spapas82 9y agoI am using Notepad++ (I'm a windows user) for more than 5 years for python/django development. Never regreted it - never found something better. I stuck to Notepad++ even when I was using a Mac for some months (through Wine) - I couldn't find something better or faster. Everything else is way too slow (Atom, VS Code, pycharm) or way too inefficient (Vim / Emacs - inefficient for me they may be great for you) to replace Notepad++. An IDE is not really needed with python - it's not java - If you want to debug something just add a breakpoint to drop directly to your program (I have actually written a tutorial for that https://spapas.github.io/2016/06/07/django-werkzeug-debugger/ https://spapas.github.io/2016/06/07/django-werkzeug-debugger...) - you'll then have a full repl to do whatever you wish! I really think that notepad++ is a great editor (at least for windows users) and should get more traction. I had tried sublime text a bit and the only feature I found usefull that notepad++ lacks is the quick switch to file - but I can live without it, especially since Notepad++ is Open Source!
- mcintyre1994 9y agoDid you try sublime on OS X? I like notepad++ too, I'd say it's pretty interchangeable with sublime on Windows - but I'd be surprised if it on wine is better than sublime native.
- spapas82 9y agoNo I didn't try it on OS X - I didn't have a license and, because I was going to use OS X for some months (not permanently) I'd bitten the bullet and went the wine-way. Probably you are right though, if I was using OSX as my main OS I'd definitely consider buying a sublime license since there were some problems with the Notepad++ (mainly with its filesystem integration).
- stinos 9y agoI'd say it's pretty interchangeable with sublime on Windows Depends on usage maybe? Haven't used NPP in a while anymore, but IIRC it lacked built-in functionality or plugins for go to definition/got to anything/PEP8/Flake8/GitGutter/... which work as good as Sublime's?
- 9y ago
- roystonvassey 9y agoI'm confused. I've been using Jupyter as my go-to Python IDE. It has auto-code completion, nice charting abilities and even nice tools to convert my notebooks into presentations for execs. What am I missing by not having PyCharm or the other IDEs mentioned here? Thanks
- danpalmer 9y agoJupyter is probably much better if you're doing what it's suited for. I work on web application development in Python and Jupyter is not suited to that at all, however my colleagues who work on business intelligence/analytics/data-science/etc love it.
- roystonvassey 9y agoMakes sense. I use it for analytics and data-science projects. Will check PyCharm out though; this thread's got me curious about what it can do.
- josteink 9y agoMaybe I'm the exception, but I can't see why people, why programmers, bother investing their editing-skills in a closed-source editor and toolkit. Sublime is closed source. When it croaks up and dies, all the skills you've built up will be wasted, and you'll have to rebuild them elsewhere. Why not invest in something open instead? There's more options than ever before, and they're all good. For me, VS Code seems to provide pretty decent Python IDE capabilities almost out of the box. For those a little more deeply invested, Emacs with elpy and realgud gives me all I need: code-completion, docs, debugging, breakpoints, etc. And it's something I as a programmer can adapt to my needs and build on. Sublime? None of that. So what's the appeal?
- foepys 9y agoThe appeal of Sublime is that you have more than 3 hours of battery life. All Electron applications are battery killers.
- RobAley 9y agoI don't get these comments. I use Atom on my Chromebook (via Ubuntu/Crouton) and the other day I did a 9-hour stint switching between atom (~80% of the time) and Firefox, from full charge. At the end of the 9 hours I still had 8% left in the battery. Perhaps you are doing something very different with electron apps than me, but for bog standard coding and doc writing, my battery lasts longer than I do!
- ctrl-j 9y agoWhich Chromebook do you have!? 9 hours of browser usage + wifi isn't anything to sneeze at for most laptops, not even considering Atom usage!
- swah 9y agoFast, beautiful, open source: pick two. (considering the ones you cited)
- Philipp__ 9y ago
- sunstone 9y agoJust try Geany. If it doesn't meet your needs then go looking.