Live data from Hacker News

Sublime Text 2 Beta released with Auto-complete and Improved UI

sublimetext.com

121–130 of 156 posts

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#121

It makes me sad that the best tools available for writing code in so many otherwise exciting languages are still resorting to text-based autocompletion. And blogging about it as though it's something to be proud of. This is certainly a pretty editor. But at its heart, it's still a text editor. And what I do for a living is edit code . Code has a lot more information about it than text. I can imagine looking at a line…

At least from my experience working in Python, if you don't know which instance `item` is, it's a problem with your code— not the editor. Automatically taking you to that class's method is another story, but I don't think you should depend on your IDE to figure out your logic for you.

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#123
post #121

It makes me sad that the best tools available for writing code in so many otherwise exciting languages are still resorting to text-based autocompletion. And blogging about it as though it's something to be proud of. This is certainly a pretty editor. But at its heart, it's still a text editor. And what I do for a living is edit code . Code has a lot more information about it than text. I can imagine looking at a line…

At least from my experience working in Python, if you don't know which instance `item` is, it's a problem with your code— not the editor. Automatically taking you to that class's method is another story, but I don't think you should depend on your IDE to figure out your logic for you.

What about parameters to functions?

  def spam(eggs):
      eggs.
Should autocompletion go find all callers of spam() and see what they are passing in in order to determine what should be available at that point?

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#124
post #85
post #17

My favorite feature (already added in an earlier development release, but now finally in the beta track): On OSX, if you are editing a file you don't have write access to and you want to save it, Sublime now asks for authentication than then saves the file. This is very convenient and not having this was the reason for still having TextMate around.

That's one annoyance out of the way. Is there a decent way to work with remote files yet? This is always the killer for me.

On OS X, I highly recommend Dripbox. It automatically SCP's files that change on your local filesystem to a remote location.

https://github.com/epall/dripbox

I use it every day, editing files locally in Sublime Text 2, and then cmd-tabbing to Terminal to run tests. It's fast enough that I never even think about the delay.

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#125
post #25
post #13

Earlier quoted context omitted.

> Jump the the function/method definition for scripting languages, define a function as concatenated string in eval(), how could you find the function definition, without actually run the script for once? Even if you run the script once, what if there is a delete_file() function you accidently called? So do we need to implement a sandboxed VM in order to find definition, theoretical perfectly speaking?

That's such an edge case. I've never seen anybody defining functions in evals, especially as concatenated strings.

I've done it.

Use case involves a class wrapping python's xml-rpc stuff to talk to Drupal.

Drupal's xml-rpc interface is not the most pleasant thing to work with, as you have to pass in a session id and auth token on every request, and then all the "actual" parameters go in as an array.

My wrapper class would query the remote interface for available methods, and then dynamically generate, via eval, a function object that used a closure to store the sess/auth tokens, and that took a variable number of arguments to pass as the 3rd array argument to the function. The eval'd function object was then bound as a method to the connection object.

It also did a bit more magic, such as on error logging the arguments to a file. ALl in all it made writing web-service clients a lot more pleasant.

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#126
Still no block cursor. :(

I've found/modified a little plug-in to simulate it, but it's not ideal.

I love Sublime, and I'm sure it seems trivial to most folks, but as a developer with poor eyesight, this is the one feature I want the most.

At least fonts can be larger now.

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#127
post #121

It makes me sad that the best tools available for writing code in so many otherwise exciting languages are still resorting to text-based autocompletion. And blogging about it as though it's something to be proud of. This is certainly a pretty editor. But at its heart, it's still a text editor. And what I do for a living is edit code . Code has a lot more information about it than text. I can imagine looking at a line…

At least from my experience working in Python, if you don't know which instance `item` is, it's a problem with your code— not the editor. Automatically taking you to that class's method is another story, but I don't think you should depend on your IDE to figure out your logic for you.

Ah, but the issue isn't you knowing which 'item' you're dealing with. It's that the IDE doesn't know, and therefore can't jump you there instantly if you ask it to.

Instead, you have to open the file in question and go find the method using one of the fiddly text-based methods that the article mentions.

So no, we're in agreement that the entire codebase belongs in your head. It's just nice to have your IDE also have the entire codebase in its head, in the actual configuration it is, rather than just knowing about a bunch of text files containing words that have no meaning to it.

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#128
post #8

What I really miss in all these fast small editors is the quick-jump features that actually analyze the code and let me do things like 1) Jump the the function/method definition (even if it's in a different file) when I press Ctrl and click on the function name. Eclipse does this. 2) Quick find of the function/method definition across the whole project. Eclipse does this as well (Ctrl + R). I don't use Eclipse that m…

I use SublimeRope and I'm quite happy with it (It's for python only though.): https://github.com/JulianEberius/SublimeRope

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#129

Still no block cursor. :( I've found/modified a little plug-in to simulate it, but it's not ideal. I love Sublime, and I'm sure it seems trivial to most folks, but as a developer with poor eyesight, this is the one feature I want the most. At least fonts can be larger now.

Using the vintage mode without the block cursor is annoying. It's really hard to see when you are in command mode and when in insert. I'm using this block cursor plugin https://github.com/netpro2k/SublimeBlockCursor but it has some bugs where the cursor remains as a block until you write something.

Re: Sublime Text 2 Beta released with Auto-complete and Improved UI

#130
post #11

I'm confused, doesn't it already have auto-complete? Mine's been doing that for a while now. What's new about this?

Previously the auto-complete required you to press tab. Now it shows a list of possible completions as you type, from which you can select the correct one.
Post reply on HN