Emacs or Vi? Why the answer is neither.
Jesse Phillips
jessekphillips+d at gmail.com
Sat Jun 11 11:51:35 PDT 2011
On Thu, 02 Jun 2011 17:49:52 +0100, Bruno Medeiros wrote:
> It seems to be article season, and I'm on a bit of a punditry mood, so
> here's a blog post I wrote recently:
>
> http://pureconcepture.blogspot.com/2011/05/emacs-or-vi-why-answer-is-
neither.html
>
> It's not about D, but it's a software development issue that has popped
> up several times here in the NG... :)
I'm sorry but your conclusion is something I cannot agree with on many
points. The big thing you miss is that most code is text. I can agree
that Vim (I will not speak for Emacs) is not a good IDE and is bad at
understanding the semantics of a language. But to dismiss a text editor
for writing code because it is textual...
Personally I don't like working in Java without Eclipse and in C# without
VS or MonoDevelop. But many times I will open the file in Vim or just
copy and past a section of code in Vim just so I can have a text editor
to edit my text. I miss Vim in my terminal.
I don't claim to know the ins and outs of an IDE, but you haven't
convinced me. Vim's understanding of the code is zero, the closest thing
it has is the ability to navigate tags which are generated by ctags. It
only works for navigation and those languages supported by the program
(just like an IDE). But some things, like a Type Hierarchy and Outline
should be created by the documentation generator.
Some other items are very nice, but are not common during a days coding.
I rename variables all the time, but usually these are local in scope and
and can be done with a quick search and replace on a selection or file.
Extracting a method is common and the ability to identify needed
parameters is certainly very nice. Parameter modification is going to be
more of a find all calls to this function then a "I'll do it for you."
and the Content Assist (more than just auto-complete). And to this I
generally just miss Vim more than these features, but are still the
reasons I keep and IDE one it is available.
The strangest credit you gave an IDE, "navigate to member/element above/
below - Ctrl-Shift-Up/Down), word navigate (Ctrl-Left/Right)" This is Vim
territory here. And you left off search, that one is simple in any
editor, but with Vim you can be selecting text and search to where you
want to end the selection. There are tons of ways to navigate in vim.
Using * to find the next instance of a word, w to jump a word, % to
navigate to the matching paren/bracket/etc.
I'd like to leave you with a thought experiment. The next time you need
to change a word (not rename a variable), or change all the content
inside quotes and think to yourself, this would be easier in Vim. You
don't have to believe it, but I bet you if you remember to tell yourself
this you'll see how common it is. I've done this very thing except mine
was "If I could just remember that command to do this."
More information about the Digitalmars-d-ide
mailing list