
The story of TextMate, VIM and SublimeText - darthdeus
http://progfu.com/post/16407410728/the-story-of-textmate-vim-and-sublimetext
======
allertonm
Title is incorrect, should be: "A story about me".

This seems kind of grouchy I know, but I am getting a bit tired of these
wildly overblown titles attached to very thin blog posts. I knew what I'd see
when I clicked the link and was just as disappointed as I'd expected to be. I
guess I have a masochistic streak.

The actual stories of those three editors, their authors and how those stories
intertwine would probably be pretty interesting. I guess I'll have to wait for
This American Life to tackle it.

~~~
there
maybe <http://thisdeveloperslife.com/> can do a show about it.

------
gexla
Vim has the keyboard entry conquered. Emacs may come close enough, but if we
are talking photo finishes to races, then I think Vim always edges out emacs
by a hair or more (but still misses a lot which Emacs provides.) We will have
to get a totally different interface for entering text before Vim is knocked
off its perch.

Emacs has a much better Vim mode for me than SublimeText 2, but neither can
really give you Vim. The deeper you are in the Vim rabbit hole, the less
likely you will be to return to try anything else.

Emacs wins out against everyone for scripting.

There is one other reason that I knew would always keep me in the Vim and
Emacs world. At first I couldn't figure out what it was that bothered me about
SublimeText 2. Vim and Emacs is open source! I don't see this point mentioned
in arguments for or against but this is important to me.

~~~
Derbasti
The thing about Emacs is really its extensibility. There is simply no other
text editor out there that can open a single C/C++ source file and
automatically infer all tags (even of included headers) without any kind of
project set up. That is simply awesome and to my knowledge only available with
semantic-mode in Emacs.

Vim can use ctags or cscope or clang, but that is not the same thing. These
are great tools, but they need to be set up with the correct include paths and
they need to be run regularly to be useful.

To my mind, that is what makes Emacs so unique and powerful and that is
something that really, no other program can hope to accomplish in a short time
frame (sorry, Sublime Text).

That said, Vim hands down beats Emacs when it comes to pure text editing
speed. It's keybindings are just a lot more powerful and flexible than
Emacs's. And of course, that is what evil-mode is for. It emulates a subset of
Vim in Emacs. It is by far the best simulation of Vim I have ever seen
(judging from ViEmu, Viper, Vintage, Vico and Vimpulse), but it is not the
real thing. Plus, there are lots of great Vim plugins that do not work in
evil-mode.

I, for one, use Emacs and Evil and I am happy with it.

And I _hope_ that Sublime Text will provide a potent entry-level drug for the
next generation. But really, without open sourcing it at some point, I can't
see it catching up to The Big Two.

~~~
lobster_johnson
> There is simply no other text editor out there that can open a single C/C++
> source file and automatically infer all tags (even of included headers)
> without any kind of project set up.

The SublimeClang plugin for Sublime will do this, pretty much. You may have to
add a few paths to its global or per-project config file, but that's pretty
obvious considering that it needs them to parse referenced files. It works
extremely well, giving you autocompletion of any C/C++ symbol as well as
automatic compilation error indicators.

~~~
Derbasti
That is precisely what I am saying: Other editors interface with some tools,
you configure them, they call some external process, they have to be run
regularly...

Well, Emacs has that stuff built-in, and better. That is precisely the way in
which Emacs is more powerful than Sublime or Vim.

~~~
lobster_johnson
I would rather have just the plugin.

The modularity means that the core application itself is small and simple,
with fewer moving parts than something huge like Emacs. It also means that I
have the freedom _not_ to install something that would otherwise come bundled
with/tangled with the app. Everybody wins.

SublimeClang requires a minimal amount of config, is dead easy to install, and
it relies on external toolset _by design_ , because building everything in
would be insane. I very much prefer that Sublime does _not_ come with this
functionality.

(I don't know what you mean by "have to be run regularly", btw. SublimeClang
can run continuously and transparently.)

~~~
nyellin
You misunderstood the parent post.

Emacs doesn't come with everything built-in. But when you extend Emacs, you
usually do it entirely in Emacs with Elisp. Emacs libraries rarely call
external tools - they usually implement the tools inside Emacs.

~~~
lobster_johnson
I don't think I misunderstood the parent. The parent heavily implies that
Emacs' semantic mode simply works _out of the box_.

I have no idea if that's the case, but if it's not, there is no functional
difference between that and any other editor, where you need to _install a
separate plugin_.

Sublime itself can be extended with Python. To me, that's a better solution
than a proprietary (albeit Lisp-based) language.

Whether those plugins "call external tools" or not is of little importance,
although relying, in a modular fashion, on pre-existing software is more
Unixy.

I'm sure Emacs' tag system is powerful, but personally, I would rather have
something like SublimeClang, which is built on a high-quality, highly
maintained C/C++ _compiler toolchain_ that retain type information and so on,
than some kind of tag system based on a superficial parser designed purely for
code inference.

~~~
Derbasti
You did indeed misunderstand my post. I was not arguing about the relative
merits of clang vs some-other-tool.

I was simply saying that Emacs can open a C++ file and have all tags and
completions right there, no setup required. No external application required
either. That is the power of Emacs and that is a power not available to
Sublime Text (unless you write your own C++ parser in Python).

You see, clang is an awesome tool and I'm sure its integration in Sublime Text
is very good. But by its design it can not look for headers in appropriate
locations without someone explicitly telling it to do so. Also it can not
parse partially erroneous code. Both these actions are just not sensible
actions for a compiler.

And that is why no external tool can ever provide the integration and
practicability of a tool purposely built just for parsing code for Emacs in
the same way cscope can not match the integration of Visual Studio's C# parser
in Visual Studio.

~~~
lobster_johnson
I am not arguing the merits of Clang versus some other tool, either.

I am arguing against the claim that a monolithic app like Emacs that bundles a
specific tool is somehow qualitatively superior to any other tool which does
not bundle a specific tool.

> But by its design it can not look for headers in appropriate locations

I think that's a perfectly valid design. I would rather want to spend 10
seconds adding a path to my project's config file than spend an eternity with
just ctags. :-)

> Also it can not parse partially erroneous code.

Of course it can. Clang recovers from partially invalid code just fine.

For example, if I do something like "typedef enum { a, b, 3 } foo bar;"
(constituting two syntax errors), it will still correctly autocomplete "foo"
as well as its values, even though the type is strictly incomplete.

~~~
Derbasti
Emacs is anything but monolothic. I think that is what our argument boils down
to.

Emacs is a Lisp virtual machine and someone happens to have implemented da
rather splendid text editor in it. Claiming that Emacs is monolithic is about
as meaningful as calling the assorted programs that make up a Unix environment
monolithic.

------
beggi
I am a former user of both TextMate and Sublime Text.

The TextMate story everybody knows, it was good at first but got stale with no
updates. I feel Sublime Text is fantastic, but after reading some article on
Janus (<https://github.com/carlhuda/janus>) I switched over to MacVim.

After fiddling around with Vim for a while I can honestly say I'll need some
serious convincing to switch to another editor. I've always stayed away from
Vim except through occasional need for text editing through SSH or something,
because out of the box it doesn't feel quite right. But after Janus sets up
some sane defaults it feels great, and after putting a few hours in to learn
all the shortcuts and study plugins I have never felt as productive.

I feel like Janus is sort of training wheels though cause it has a lot of
plugins I don't use etc, but it's great to start and as I use Vim more I
reckon I will start to manage my own .vimrc.

P.S., bcvi is so awesome.

~~~
darthdeus
The good thing about janus is that it also provides a simple framework for
customizing your plugins, even if you change all of the original settings.

I've made my own fork (<https://github.com/darthdeus/janus>) and basically
removed 90% of the default plugins and settings and repalced them with my own,
but I still use it for the Rake task and nice directory structure.

------
Derbasti
This could be my story, even though in the end (after Textmate, then Vim),
Emacs tempted me more than Sublime Text and I eventually switched back to it
from Sublime Text 2.

There is too much accredited awesomeness in Emacs (and to a somewhat lesser
extent, Vim), to be overthrown by a newcomer. That said, Sublime Text is very
worthy competition and given a few years, it might actually live up to those
two dinosaurs.

------
IgorPartola
Fast fuzzy search across your entire project is called grep. Why do we keep
rediscovering tools that have existed for such a long time?

Edit: I suppose people keep rediscovering these tools because even if they use
vim, they often times insist on running it as a stand-alone GUI application,
rather than in a terminal emulatir where the built-in task
switching/multitasking makes it very easy to run complex shell commands, move
files around, use your VCS and switch back to your editor. Another benefit is
that now you can have the exact same work environment over ssh as locally.

~~~
danieldk
First, grep requires specify intermediate characters. For instance, to match
SublimeText, you need the regular expression 'S.*B', while in Sublime you
could just type 'SB'. (Neither is better, they just serve different purposes.)

Second, grep is not comparable, it's a different tool. For instance, if you
would want to open the openCorpus function in the file MainWindow.cpp, in
Sublime you'd just type "MWcp@opC", and you are there. While typing the pane
and window dynamically update, allowing you to narrow down the 'search space'
quickly.

Grep is for searching for text strings in files in the shell or shell scripts.
Sublime's Goto Anything is for searching files and symbols in a text editor.

Edit: I like and use both vim and ST2, but neither grep, ctags, nor Peepopen
provide the smooth experience of 'Goto Anything'. Of course, conversely vim
also has many things to like over ST2 (such as modeful editing that is
definitely better than ST2's Vintage).

------
acabal
SublimeText is great, but after using it for a few weeks I went back to Komodo
Edit. The reason is because I do a lot of PHP work, and Komodo Edit by far has
the best PHP autocomplete I've found.

There's a plugin for SublimeText that supposedly imports the same autocomplete
engine that Komodo uses. In my experience, however, it was slow, rarely worked
right, and was actively broken for CSS autocompletes (which I also need
frequently).

So it's back to Komodo Edit for me, at least until SublimeText gets its
autocomplete act together. Which is a shame because I really liked ST as an
editor.

------
nyellin
If the author could switch that easily to SublimeText, he wasn't properly
using Vim.

~~~
Chirono
Care to elaborate on that? I'm fairly entry-level when it comes to vim and I'd
be interested to hear some good examples of what it can do over something like
sublime.

~~~
nyellin
I'm fairly proficient with both Vim and Emacs and I can _feel_ it when I'm not
using either editor. For example, I'm using a browser on Windows and I want to
jump to a line's end. In Emacs (or on OS X which uses Emacs shortcuts), that's
Ctrl-E and in Vim that's $. On Windows, I fumble with the arrow keys or start
reaching for the mouse.

When you really know a fundamental text editor, that sensation of helplessness
gets worse and worse when you can't use the shortcuts that are burned into
your fingers.

If you don't know what I'm talking about, I suggest reading the StackOverflow
answer "Your problem with Vim is that you don't grok vi."

<http://stackoverflow.com/a/1220118>

~~~
beza1e1
That just means that you don't know the hotkeys, does it? It does not suggest
that Emacs or Vim is objectively better.

~~~
gchpaco
The conventional end-of-line hotkey for Windows applications is the End key,
which on a fairly traditional keyboard like the one I am typing this on
requires that my right hand move several inches to the right and find that key
on the island; I can't touch type this effectively and it compares poorly to
C-e or even $ (itself not especially a convenient operation). Gnome and the
Mac don't have this problem because both of them largely retain the simpler
Emacs style keystrokes; Firefox does have this problem (at least here) and it
pisses me off every time.

------
tylerlh
I can't recommend Sublime Text 2 enough to do it justice. Such a fantastic
editor.

------
chj
I would like to try any of these if I am not so addicted to org-mode. I can't
live without emacs despite that I hate its slowness very much.

~~~
darthdeus
I used to be really addicted to hardcore code completition and refactorings
for Java in IntelliJ, it just felt like there is no other way. I had the same
feeling when I was considering Sublime while using VIM, I thought there's no
other way to edit text than the way VIM does it. And both time it paid off
that I gave another editor a try :)

~~~
Derbasti
Learning a new tool is learning a new way to think. It always pays off.

------
Derbasti
He talks about the Destroy All Software Screencasts. Are they worth it?

~~~
darthdeus
If you're into TDD and Ruby, then they're probably the best ones you can find.
But if you don't like testing, then I would suggest saying away :) There's a
free one that you can check out here
<https://www.destroyallsoftware.com/screencasts> on the bottom of the page ...
and see if you like it.

------
dgalling
Has anyone else experienced the slowness the author described with Vim? I
think it's possible he may be experiencing slow terminal update time (the OS X
terminal is really slow in the scenario he described) instead of Vim being the
culprit. MacVim, for example, doesn't have this problem, in my experience.

~~~
eridius
Did he edit the article? I don't see anything about vim being slow.

------
JonnieCache
Also worth noting that ST2 has a vim emulation mode, called "vintage" mode.
IIRC it's just a native ST2 plugin in python.

~~~
llimllib
As a long-time vim user, I found it to be obviously incompatible within
moments.

~~~
nuclear_eclipse
As another long-time vim user, it's more of a vi-compatible mode, and isn't
anywhere near perfect, but it's good enough that I get modal editing with the
majority of movements and commands that I use in day-to-day editing. Most of
the "missing" vi/vim features just don't have appropriate command-mode
bindings, so it's simply a matter of getting used to the default ST2 bindings
for those, or doing some leg work to make those vintage bindings that you
really care about.

I've only been using ST2 for a few weeks on a Python project, but I feel that
the end result is better for me than trying to patch together a chain of vim
plugins. I gladly give up a few of the more esoteric vim features for the
integrated project editing features of ST2.

~~~
llimllib
> I gladly give up a few of the more esoteric vim features for the integrated
> project editing features of ST2.

Right, I just wanted to point out that it's not a very vim-compatible vim mode
so people aren't surprised if they try it out.

------
raingrove
I must say I am really impressed by the speed and performance of SublimeText
2. If they can get the vintage mode (vim mode) right, I might really consider
switching. At the moment it's nowhere near perfect.

------
hackada
All this is fine, but I definitely need a debugger with a gui

------
g3orge
PeepOpen supports Vim as well.

------
maidenvoyag3
This is actually my first post ever on HN. It is in fact not very often that I
post anywhere on the interwebs. But I have to speak up.

Can. We. Stop. Posting. About. F __ __ng. Text. Editors.

Please.

Imagine a room where you teleport in computer greats (in no order of
importance, and I am probably forgetting tons of worthy people in my pang of
internet angst) such as Gates, Torvalds, Ritchie, Thompson, von Neumann,
Knuth, Turing, Carmack, ..., Joy, Berners-Lee, Babbage, Stroustrup, Dijkstra,
Norvig, Moore, Noyce. I don't think these guys would start talking about text
editing, so why should we?

~~~
hwiechers
"When art critics get together they talk about Form and Structure and Meaning.
When artists get together they talk about where you can buy cheap turpentine."
\- Pablo Picasso

~~~
Jimmie
"I don't trust un-cited quotes on the internet anymore" - Gandhi

