Live data from Hacker News

Sublime Text 2.0 Released

sublimetext.com

211–220 of 358 posts

Re: Sublime Text 2.0 Released

#211
post #174

Earlier quoted context omitted.

I think he's referring to the "column" visual mode, that allows you to make a rectangular selection and delete/insert/replace it.

Yes, in particular the "bulk edit actions" (not sure if they have a proper name) that you can do in Vim in either visual mode. E.g. make visual selection, shift-I = prepend text to all selected lines. This is the same functionality as sublime multi-line editing. The problem is that neither seems to work in vintage-mode (or I'm just too dense to figure out how). Edit: Nevermind, it works now after I started over with…

Maybe I'm not understanding exactly what you're missing, but I do believe sublime can do what you want.

* Search/replace: ctrl-f will do find (and you can use a reg-ex, case insensitive, etc, based on the little toggles to the left of the find bar. Then hit "Find all" on the right, and everything in that file will be highlighted and you'll have multiple cursors. So from there, just type what you want to replace all the words with, or really do whatever you want with your multiple cursors.

* "bulk edit actions": Works just fine for me in vintage mode. Highlight each line you want (or repeatedly press ctrl-l to add a line to your selection), hit ctrl-shift-l to get multiple cursors, and then do what you want from there. Example:

You're in vintage/command mode. Highlight three lines. Hit ctrl-l to flesh out the top and bottom lines (so the whole line is in the selection, and not just where you started and ended your mouse drag). Hit ctrl-shift-l for multiple cursors. Now you have three separate cursors, each in command mode. So you can hit "I", and you will go into insert mode three times simultaneously with three cursors at the beginning of three lines. Type "blah", and it will appear at the beginning of each of the three lines.

Re: Sublime Text 2.0 Released

#212

Hm, Am I the only one who spends hours in vim each day with ~15 lines in my .vimrc and almost zero plugins? At some point I think I realized that no matter how feature-rich my editor was, the main thing stopping me from writing good and fast code was _thinking_, not configuring my text editor.

Obviously not. I stumbled across this same sentiment the other day:

http://utcc.utoronto.ca/~cks/space/blog/programming/FancyPro...

Re: Sublime Text 2.0 Released

#213

I've been really tempted to fork and contribute to MacVim and steal some of the nicer visual things ST2 is doing. Namely, 1) rounded corners on selection boxes 2) nice glowing, fading cursor 3) smooth scrolling with a feeling of velocity/inertia 4) the minimap I tried the Vim plugin, but so many of the motions that I use daily were missing I had to jump ship. But I'd love it for MacVim to have the same level of visua…

one of the things I've found lacking in MacVim recently is smooth scrolling. The rendering engine on OSX doesn't handle large files well at all. It's a shame because otherwise everything work quite well

Re: Sublime Text 2.0 Released

#214

Earlier quoted context omitted.

But so do Vim's t text object (one of the few text objects that Sublime's Vintage mode doesn't implement) and dot command, along with Vim's C-o and C-i cursor history commands.

I guess it's what you are used to – I've never really got into Vim, whereas Sublime looks like a normal text editor until you need more from it.

Using macvim is surprisingly like using a normal editor; even more so after you press "i" and start typing. All the normal copy, paste, highlight, tabs, and other os basics that you would want are there with the power of vim in the background if you want to explore.

Re: Sublime Text 2.0 Released

#215

Earlier quoted context omitted.

But it's not. In fact intelligent completion is incredibly hard for dynamically typed languages. Those IDE that do perform intellisense or autocomplete with dynamic languages do it with very basic ability. In a real world dynamically written code file the editor simply has no way of knowing the members of a class. Or if it is even a "class".

No one's saying it's easy, but enough IDEs have done it that some of us have come to expect it.

I started programming on VB3 and spent many years doing Visual C++ and C# as well as quite a bit of Java with IntelliJ. I depended deeply on IntelliSense/autocomplete. Years later, I don't remember how I ever got anything done with that stupid distracting drop down box. It's just so easy to arrow up/down through that list and hope to stumble upon the correct method to call. On the rare occasion that I type that member accessor dot and don't know what I want, I much prefer full-sized documentation in a browser that I can cmd+f on.

Re: Sublime Text 2.0 Released

#216
post #207

Earlier quoted context omitted.

>It also has a thing to navigate methods, but I have to use something called tags, which means a) I have to figure out what the hell that is Well. I'm not exactly old, but seeing someone say that about tags has made me feel rather ancient. There are better ways to navigate code than tags. For Emacs, for example, my setup uses Rope to navigate Python code.

It doesn't seem like the main issue is age as much as that most people will be coming to VIM from either IDEs or editors that had built-in code-navigation features, so moving to something like vim involves the extra overhead of learning things like tags or rope even.

There's definitely an age-gap here.

People who grew up coding C had to learn to use ctags, whereas, people who start out in interpreted languages are much less likely to encounter such.

>involves the extra overhead of learning things like tags or rope even.

Rope has no learning overhead. It works the same as any IDE. You use the functionality it provides like "go-to definition" or refactoring.

Tags are just a file you generate using a command and the editor uses it to provide a "go-to definition" faculty.

Re: Sublime Text 2.0 Released

#217

Hm, Am I the only one who spends hours in vim each day with ~15 lines in my .vimrc and almost zero plugins? At some point I think I realized that no matter how feature-rich my editor was, the main thing stopping me from writing good and fast code was _thinking_, not configuring my text editor.

It's certainly possible to write code without a good editor, but a good editor simplifies a lot of tasks which get in the way of writing good code.

That makes the erroneous assumption that vim, without heavy customization, is not a good editor.

Vim is capable, out of the box, of everything a more heavyweight editor can do. The only thing really missing is library aware code completion.

Re: Sublime Text 2.0 Released

#218

I've reverted back to Vim (not really ST2's fault, just that it doesn't run in a terminal and I've gotten addicted to split-panes in iTerm), but ST2's a solid editor. Definitely worth your $60. PS: If it got even a basic terminal... EDIT2: ST2 does have split panes, I just can't run a terminal in them.

I've even bought it, then went back to Vim. It looked so promising and I still think it's second best editor around. EDIT: There can be only one!

Do you use the external program to emulate Cmd-T? I don't like that solution :) and it doesn't work in Windows IIRC...

Re: Sublime Text 2.0 Released

#220

Hm, Am I the only one who spends hours in vim each day with ~15 lines in my .vimrc and almost zero plugins? At some point I think I realized that no matter how feature-rich my editor was, the main thing stopping me from writing good and fast code was _thinking_, not configuring my text editor.

I'll bet you don't spend any time editing multiple languages with conflicting notions of whitespace. I split my time between C and Python, and tabs in C (per Linux kernel coding style) and spaces for Python (per PEP-8), and having that be correct is important for my sanity (as well as for the other people I work with - especially those who aren't multi-linugual).
Post reply on HN