Live data from Hacker News

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

sublimetext.com

141–150 of 156 posts

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

#141

Earlier quoted context omitted.

Vintage mode is a killer feature for people (like me) who are wired for Vim's modal editing. The fact that it works reasonably well (somes bugs here and there but it's an alpha so understandable) is what made me even consider Sublime in the first place. Now, after having been using Vim for about 8 years now, after a few weeks of trying Sublime, I'm pretty much ready to pony up for SublimeText 2 whenever the final ver…

Using 'vip' to select the current paragraph didn't work for me on osx (instead it went into insert mode with the 'i'), so I gave up on my very brief trial. Did I give up too soon? Or is that oversight typical of other quirks I'll run into?

Could be a bug - I looked at the Vintage source when it was in alpha - they had implemented text objects for many delimiters but I also found some bugs with , for example 'ci{'.

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

#142

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…

Seems to me that the ducked-typed nature of Python makes it pretty much impossible to determine this information in a text editor.

    class A(object): def read(): return 'A'

    class B(object): def read(): return 'B'

    def doit(i):
        if i==1: obj = A()
        else: obj = B()
        return obj.read()
When you put your cursor over the .read() in obj.read(), where does it point to?

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

#143
post #87

How do people deal with remote files? I love Sublime, but always end up reverting back to VIM as it is so slow when accessing files over a network connection. I've tried the SFTP plug-in, but find it really clumsy. Ideally I'd just love to be able to add a remote folder over SFTP the same way you do local ones.

Macfusion is sometimes finicky, but works for me most of the time. And it's free (unlike Expandrive).

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

#144

Doesn't the new auto complete and the plug-in SublimeCodeIntel do the same thing? One of my concerns is that say you are using a plug-in for a feature that is later implemented into Sublime, now you haven't read the what's new so you have no idea. What happens then?

Not the same. The editor itself supports almost all file types with basic auto-completion. SublimeCodeIntel supports a few scripting languages with more intelligence. SublimeClang doing same smart job for C/C++/ObjC.

It's just based on your work pattern to decide which one to use. For me, all 3 of them are all very useful everyday.

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

#145
post #26

Anyone using this editor should install this plugin first: http://wbond.net/sublime_packages/package_control It's fantastic and gives you a simple in-editor way to add/remove other plugins, direct from their github repos, without needing to leave or restart the editor. It also automatically keeps them all up to date. Once it's installed, you can just use the command palette (ctrl+shift+p) to install any of these plug…

I feel SublimeClang is a must have for C/C++/ObjC developers

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

#146

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…

Seems to me that the ducked-typed nature of Python makes it pretty much impossible to determine this information in a text editor. class A(object): def read(): return 'A' class B(object): def read(): return 'B' def doit(i): if i==1: obj = A() else: obj = B() return obj.read() When you put your cursor over the .read() in obj.read(), where does it point to?

You're not thinking big enough. Imagine a rewinding debugger that records a complete execution of your program. Then whenever your cursor moves, the debugger could step to a point when that line of code was executing and give you autocomplete suggestions based on the state of the program at that time.

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

#147

Earlier quoted context omitted.

Seems to me that the ducked-typed nature of Python makes it pretty much impossible to determine this information in a text editor. class A(object): def read(): return 'A' class B(object): def read(): return 'B' def doit(i): if i==1: obj = A() else: obj = B() return obj.read() When you put your cursor over the .read() in obj.read(), where does it point to?

You're not thinking big enough. Imagine a rewinding debugger that records a complete execution of your program. Then whenever your cursor moves, the debugger could step to a point when that line of code was executing and give you autocomplete suggestions based on the state of the program at that time.

Doesn't solve the problem.

The same function can get called a 1000 times and take different paths each time. Which method is your hypothetical rewinding debugger going to show? (Leaving aside the big gaping hole of how your program is executing while you are typing it out).

The problem of deciding which method actually gets called by static analysis in a text editor (and it would have to be static analysis) is literally impossible for dynamic languages - pretty much by definition.

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

#148
post #32

Earlier quoted context omitted.

Maybe you should take a look at the Rails sourcecode.

Rails only does that to optimize certain function calls. eval() is used as a method to compile/inline certain functions. Most code in Rails does not use eval.

https://github.com/rails/rails/blob/2-3-stable/actionpack/li...

Try getting your editor to find that definition of method "accept_language" or "cache_control". :-)

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

#149

Earlier quoted context omitted.

You're not thinking big enough. Imagine a rewinding debugger that records a complete execution of your program. Then whenever your cursor moves, the debugger could step to a point when that line of code was executing and give you autocomplete suggestions based on the state of the program at that time.

Doesn't solve the problem. The same function can get called a 1000 times and take different paths each time. Which method is your hypothetical rewinding debugger going to show? (Leaving aside the big gaping hole of how your program is executing while you are typing it out). The problem of deciding which method actually gets called by static analysis in a text editor (and it would have to be static analysis) is litera…

You are far too pessimistic; a few very simple heuristics would work great in most cases. It doesn't have to be perfect. Something imperfect would be miles better than nothing, which is what we have now for dynamic languages.
Post reply on HN