News for hackers. Stuff that matters.
Re:The story of TextMate, VIM and SublimeText by Derbasti on Monday January 30, 2012 @01:06PM (#3529849)
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.

Re:The story of TextMate, VIM and SublimeText by lobster_johnson on Monday January 30, 2012 @04:41PM (#3530757)
> 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.

Re:The story of TextMate, VIM and SublimeText by Derbasti on Monday January 30, 2012 @05:22PM (#3530893)
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.

Re:The story of TextMate, VIM and SublimeText by lobster_johnson on Monday January 30, 2012 @05:31PM (#3530921)
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.)

Re:The story of TextMate, VIM and SublimeText by nyellin on Tuesday January 31, 2012 @03:08AM (#3532333)
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.

Re:The story of TextMate, VIM and SublimeText by lobster_johnson on Tuesday January 31, 2012 @05:29AM (#3532647)
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.

Re:The story of TextMate, VIM and SublimeText by Derbasti on Tuesday January 31, 2012 @06:18AM (#3532789)
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.

Re:The story of TextMate, VIM and SublimeText by lobster_johnson on Tuesday January 31, 2012 @06:32AM (#3532819)
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.

Re:The story of TextMate, VIM and SublimeText by Derbasti on Tuesday January 31, 2012 @07:49AM (#3533007)
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.