Live data from Hacker News

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

sublimetext.com

131–140 of 156 posts

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

#131

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…

For C and C++, the sublime text plugin 'sublime clang' ( https://github.com/quarnster/SublimeClang ) , does exactly this, as well as check code for errors as you type. I only started using it a couple of days ago, and I already can't imagine being without it.

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

#132
post #121

Earlier quoted context omitted.

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?

Why not? IntelliJ can do exactly that for Java code -- right-click on a variable and choose "dataflow to here". Even in large projects, it's practically instantaneous. Of course, in Java you don't need that much information for autocompletion since you can just look at the static types.

The same kind of global dataflow analysis would have to be approximate in a dynamic language, but I'd still expect it to be better than nothing.

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

#133
post #121

Earlier quoted context omitted.

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…

I suppose it was a misunderstanding. I took this

>knowing that my codebase has half a dozen classes that expose a .hide member. I hesitate even to ctrl+click on it in this editor, because I know it'll either do nothing or take me to the wrong definition.

to mean you were relying on your IDE to tell you which .hide() method you were calling.

As others have pointed out elsewhere, I think giving that functionality to ST2 would push it too far into the realm of IDE.

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

#134
post #40

Earlier quoted context omitted.

I think you are looking for the CodeIntel plugin. It takes a few minutes to index large projects, but after that, it's really fast and Alt + Click will take you to the definition of things. I switched completely from TextMate. Take a look: https://github.com/Kronuz/SublimeCodeIntel

Is SublimeCodeIntel working well again/yet? I tried it a few months ago on Mac and it caused major slowdowns all throughout ST2 - even just typing text was slow when it's installed. I've heard other such reports on the forums, and a co-developer had the same problem last week.

I had the same problem, until I took the recommendation of using the nightly version a couple weeks ago. Now it works great. http://www.sublimetext.com/dev

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

#135
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.

TextMate 2 has `rmate` which lets you edit a remote file from a terminal session: http://blog.macromates.com/2011/mate-and-rmate/

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

#136
post #57
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…

Number 2) is included in Sublime Text (same shortcut, too). And it's fuzzy!

No, that only lets you jump to files, not to functions/methods.

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

#137
I love Sublime, but I'm not really a fan of the new theme. It tends to be lighter in areas where the previous version was dark, especially in the tab-bar when using a theme like SpaceCadet.

Anyone know if it's possible to change the default tab background color for themes that don't support it?

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

#138

I love Sublime, but I'm not really a fan of the new theme. It tends to be lighter in areas where the previous version was dark, especially in the tab-bar when using a theme like SpaceCadet. Anyone know if it's possible to change the default tab background color for themes that don't support it?

I think you can theme the UI as well as the syntax theme. Here's an example: https://github.com/buymeasoda/soda-theme

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

#139

I love Sublime, but I'm not really a fan of the new theme. It tends to be lighter in areas where the previous version was dark, especially in the tab-bar when using a theme like SpaceCadet. Anyone know if it's possible to change the default tab background color for themes that don't support it?

I think you can theme the UI as well as the syntax theme. Here's an example: https://github.com/buymeasoda/soda-theme

Nice! I didn't know it was possible to theme the sidebar either. Soda Dark seems pretty good, thanks.
Post reply on HN