I'm guessing I'm missing some of the functionality. Is there a tutorial anywhere to show me what I'm missing?
How have you learned about ST2 features (rather than just repeating your old editing habits in a new program)?
I'm guessing I'm missing some of the functionality. Is there a tutorial anywhere to show me what I'm missing?
How have you learned about ST2 features (rather than just repeating your old editing habits in a new program)?
1. Multiple cursors. This is the only reason I ever use ST2 now. They're sort of like vim's visual block mode, except on steroids. For example, if you have multiple cursors, you can start typing and each cursor will behave as in insert point. Each cursor can also move independently, which means you can do things like moving word-wise or line-wise over lines which are not heterogeneous. Using Cmd + D, you can add selections, and then they're multiple cursors. This ends up replacing things like find-replace for me, because it's so fast and easy.
I should make a video of me using multiple cursors, because I feel I'm not explaining it well at all.
2. Cmd+p/goto-anything. Suppose I want to go to the getUser method of the auth class. All I have to do is hit Cmd + p, then type “Au@getUser”. As I type, a window appears with filenames, so first I type, “Au”, and then seeing that “Auth.php” is at the top, I type an @, which tells ST2 I'm now looking for a method, it then starts searching for methods within Auth.php.
Now, with vim I use Cmd-T, but that only gets me to the file, and it's kind of a bitch to get it working. 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 and b) I have to fiddle with getting it all setup. All that time could be spent programming. Mmmm, programming. I understand ctrlp makes some of this better, but I haven't tried it yet.
3. Better platform integration. With vim, there's a bunch of weird shit I have to do to get the clipboard working properly (including recompiling vim o_O), and the mouse seems janky. I mostly never use the mouse anyway, but the clipboard issues are annoying.
4. Python API vs vimscript. I wrote a couple of small plugins for ST2, which was nice and easy, because everybody knows python, and the API is modern and well thought out. With vim, I feel like it's a whole different matter, starting with learning a new programming language.
I'd love to have this explained better with good examples of where it's useful, other than just changing variable names.
I understand this is one of the most used features but I have a hard time seeing a lot of use for it, but that's probably because I come from a single-cursor editor background.
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.
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.
I'm talking specifically about tags, because it's the tool I'd need to use to get goto-anything functionality in vim using command-t or ctrlp.
Whenever there's a debate about something like ST2 or an IDE vs vim/emacs, the argument is always “well you can do all that stuff with vim, just install x, y and z plugins", and I was making the point that with ST2, the out-of-the-box goto-anything functionality is really excellent. I love vim, and can't see myself ever going back on that, but I certainly appreciated with ST2 that the baked-in, absolutely-zero-effort-required goto-anything functionality was really excellent.
That might be true for vim, but it isn't for Emacs. Most of what you need is built-in, with the occasional plugin only coming in when you want hardcore IDE functionality or something uber language specific. It supports virtually every language, VCS, use-case, etc. out of the box though.
Has it ever occurred to you that people who've been programming for decades have a reason for putting forth the advantages of editors like Emacs and vim?
Of course--I stated clearly that I'm a vim user and that I love it, and couldn't see myself going back. But I still appreciate the out of the box functionality and ease-of-use of ST2.
You can bolt vi/vim on top of it if you really want the modal editing though.
Edited my comment to better reflect the content and mood I wanted to convey.
Thanks for the feedback.
1. The linting plugin support was woefully broken and often hung up the editor, that may be better now, but it seems to be a single thread for all plugins. For Vim I use syntastic and find it works great.
2. Visual mode (using vintage) isn't great, block selection pretty much didn't work. There was a plugin that could do multiselect based on regex, but for the most part that wasn't what I needed.
3. Speed wasn't great but it was a beta, I'm tempted to give it another go. To be honest though, at least for RoR work Rubymine seems like a better editor if you are looking for IDE features. It had a pretty decent Vim mode too, no worse than Vintage.
4. Split panes were not great either, I need good keyboard shortcuts to open into vertical and horizontal splits quickly and easily or they are basically useless. Almost every new editor fails at this and makes me wonder if the developers have ever used a decently powerful editor.
If editor developers are not going to learn from the "good parts" of Vim and Emacs then I'm afraid we will never really move away from them.
I don't even use a fraction of the power available to me from Vim yet, but to switch editors I have to be able to find sufficient functionality to make up for what I do use. Believe me I'd love to find an editor other than Vim that works for me.
That one made me laugh!
Edit: This was posted above... https://news.ycombinator.com/item?id=4162210. Somebody is apparently writing an ebook and the 1st chapter is available.
Though it does have some good parts. Map view Speed Multi-select
There's brilliant plugins for decent linter & auto-complete; If you didn't install package manager you didn't spend enough time with sublime.
Stating find & search is sub-par in my opinion means you must have honestly spent less than a day utilizing the program.
Search:
Ctrl+P
Ctrl+shift+p
ctrl+f
ctrl+shift+f
ctrl+shift+f alt+r (Supports regex)
ctrl+h
Separate console window? As in you can't remove it from the sublime window? Else ctrl+`
As a text editor, ST2 is great. The editor has a project system where you just add whichever directories you care about, which is simple but effective for many jobs.
As an IDE replacement, I don't think the combination of available packages is even close to sufficient yet. If you want to start looking at things like code navigation, code completion, refactoring, and integration with external tools for build/test/analysis/source control, you need a bit more flexibility than the default project system. The catch is that for this kind of tool, it has to be done so that it plays nicely with arbitrary plug-ins in arbitrary languages, and without descending into the kind of abomination that is configuring a project in most IDEs.
That's a very tough problem to solve well. If you work on projects using multiple programming languages, I'm not sure anyone has actually solved it yet. But for single languages, IDEs do a lot more than what ST2's default project system can support, and if anyone has built a plug-in that gets anywhere near what I think would be necessary, I've never found it so far.