objective-c 为什么是 Emacs/Vim/Textmate?Xcode 还不够好吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/649000/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why Emacs/Vim/Textmate? Isn't Xcode good enough?
提问by ivanTheTerrible
Hi I mostly do C++, Objective-C programming. And I found Xcode plus an auto completion/macro plugin (Completion Dictionary) quite adequate.
嗨,我主要从事 C++、Objective-C 编程。我发现 Xcode 加上一个自动完成/宏插件(完成字典)就足够了。
However, all people seem to praise over their pure text editors. I tried Textmate for a bit; liked its simplicity but dislike its files/framework handling.
然而,所有人似乎都称赞他们纯文本编辑器。我试了一会儿 Textmate;喜欢它的简单但不喜欢它的文件/框架处理。
Am I missing something here? Or, do Vim or Emacs have auto-completion as good as Xcode?
我在这里错过了什么吗?或者,Vim 或 Emacs 是否具有与 Xcode 一样好的自动完成功能?
回答by Alan
Pull up a chair son, let me speak on this.
拉起椅子儿子,让我谈谈这个。
Well before the days of Xcode, there was VIM and Emacs. I know it's hard to imagine, but it's true.
早在 Xcode 出现之前,就有了 VIM 和 Emacs。我知道这很难想象,但这是真的。
Many people got accustomed to VIM/Emacs, and thus continue to use it.
许多人习惯了 VIM/Emacs,并因此继续使用它。
Emacs is extremely customizable, and offers pretty much everything you can imagine (including a built in shrink and the towers of hanoi). You can easily call compilers from Emacs, and create your own extensions as needed.
Emacs 是高度可定制的,并且提供了几乎所有你能想象到的东西(包括一个内置的收缩和河内的塔)。您可以轻松地从 Emacs 调用编译器,并根据需要创建自己的扩展。
VIM has incredible regex engine (Emacs does as well) and is very handy because (VI) comes with pretty much every Unix OS, and works fantastically if you don't have arrow keys (yeah yeah, real old school). People are very good with using keys to move around documents, without having to use the mouse.
VIM 拥有令人难以置信的正则表达式引擎(Emacs 也是如此)并且非常方便,因为几乎每个 Unix 操作系统都带有 (VI),如果您没有箭头键,它的工作效果非常好(是的,是的,真正的老派)。人们非常擅长使用按键来移动文档,而无需使用鼠标。
The same is true with Emacs as well, but for me, I find cursor motion much easier on VIM.
Emacs 也是如此,但对我来说,我发现 VIM 上的光标移动要容易得多。
The text editor war is fueled with as much religious zealotry as the Mac vs PC war, and the answer is pick the best that works for you. If you like Xcode, great, continue to use it, however good luck if you're ever forced to work on a PC or Linux machine. Personally, I use Emacs to code, VIM to manipulate text and Firefox to look at lolcats.
文本编辑器之战与 Mac 与 PC 之战一样充满了宗教狂热,答案是选择最适合您的。如果您喜欢 Xcode,那太好了,继续使用它,但如果您被迫在 PC 或 Linux 机器上工作,那么祝您好运。就我个人而言,我使用 Emacs 来编写代码,使用 VIM 来操作文本,使用 Firefox 来查看 lolcats。
回答by remvee
I really don't understand why emacs props up when people talk about text editors. In my experience it's more like eclipse (or one of those other platforms/IDEs) than vi because it isan environment, which happens to be good at text editing.
我真的不明白为什么人们谈论文本编辑器时会支持 emacs。根据我的经验,它更像是 eclipse(或其他平台/IDE 之一)而不是 vi,因为它是一种环境,恰好擅长文本编辑。
As an IDE emacs features version control, live compilation, spell checking, auto completion, debugging, code browsing and lots more for a wide variety of SDKs. For the rest of your computing needs it's an email/news/web/irc/twitter/xmmp client, calendar, organizer, calculator, terminal emulator, remote editing, speadsheets, games etc. etc. etc.
作为 IDE,emacs 具有版本控制、实时编译、拼写检查、自动完成、调试、代码浏览等功能,适用于各种 SDK。对于其余的计算需求,它是电子邮件/新闻/网络/irc/twitter/xmmp 客户端、日历、组织者、计算器、终端模拟器、远程编辑、电子表格、游戏等。
After Dijkstra: "Emacs is no more about text editing than astronomy is about telescopes"
在 Dijkstra 之后:“Emacs 不再是关于文本编辑的,就像天文学是关于望远镜的”
回答by Svante
What you are missing is that Emacs and Vim are actually IDEs.
您缺少的是 Emacs 和 Vim 实际上是 IDE。
回答by dcw
vi is ubiquitous on UNIX systems, and Emacs almost so. AFAIK, Xcode is on one platform.
vi 在 UNIX 系统上无处不在,Emacs 几乎如此。AFAIK,Xcode 在一个平台上。
Having a powerhouse IDE is a great thing, but everyone should have a smattering of skill to keep them functional on any platform they might be dropped into.
拥有强大的 IDE 是一件很棒的事情,但每个人都应该掌握一些技能,以确保它们在可能被放入的任何平台上正常运行。
回答by codingbear
It's all up to your preference.
Some people like to work with lightweight texteditors like (g)vim, emacs, pico, etc.
Others like to work with IDEs like MS Visual Studio, Eclipse, Xcode.
As long as your environment is compatible with the text editing technology, it's all up to you.
这一切都取决于您的喜好。
有些人喜欢使用轻量级文本编辑器,如 (g)vim、emacs、pico 等。其他人喜欢使用 IDE,如 MS Visual Studio、Eclipse、Xcode。
只要您的环境与文本编辑技术兼容,一切都取决于您。
By the way, I like working with Eclipse and vim because they are what I used to learn programming ;)
顺便说一下,我喜欢使用 Eclipse 和 vim,因为它们是我用来学习编程的东西;)
回答by user151339
The main reason you seem to think people like Emacs/Vim is for code completion. People like Emacs/Vim cause they are both MADE for editing text. You have control and options available to you that other editors just don't have. Once you get REALLY good at using one of these programs you want these key bindings / commands available everywhere. Macros, regular expressions, moving around by search/word/paragraph/function, interfacing with version control, complicated undo/redo and copy/paste functions and extension options are just a FEW of the things that these editors do really really well.
您似乎认为人们喜欢 Emacs/Vim 的主要原因是为了代码完成。喜欢 Emacs/Vim 的人因为它们都是为编辑文本而设计的。您可以使用其他编辑器所没有的控制和选项。一旦您非常擅长使用这些程序之一,您就会希望这些键绑定/命令随处可用。宏、正则表达式、按搜索/单词/段落/函数移动、与版本控制接口、复杂的撤消/重做和复制/粘贴功能和扩展选项只是这些编辑器做得非常好的一小部分。
Code completion is just one of MANY things that can make writing programming easier. Emacs/Vim can handle ALL of them (natively or by exntensions).
代码完成只是可以使编写编程更容易的许多事情之一。Emacs/Vim 可以处理所有这些(本地或通过扩展)。
回答by Rook
No, not really. It's a matter of preference really. I liked working in Visual Studio 6, but nowadays the newer versions are just too bloated. So if I can do something outside VS I usually do it without opening the whole IDE box.
不,不是真的。这真的是一个偏好问题。我喜欢在 Visual Studio 6 中工作,但现在新版本太臃肿了。所以如果我可以在 VS 之外做一些事情,我通常不会打开整个 IDE 框。
On windows I like notepad2 and gvim. I've customized vim to the point where it suits my needs perfectly, so I don't have to think about what and where.
在 Windows 上,我喜欢 notepad2 和 gvim。我已经将 vim 自定义到完全适合我的需求的程度,所以我不必考虑什么和在哪里。
But, it's good to mention that (you could also figure that out by yourself by reading these kinda posts) a lot of users uses vim/emacs/... 'cause of the heard-its-the-best/cool-factor/actual-usability. So if it doesn't suit you, don't use it. Nobody's gonna look you the wrong way cause of that.
但是,值得一提的是(您也可以通过阅读这些类似的帖子自己弄清楚这一点)很多用户使用 vim/emacs/... 因为听到了最好的/最酷的因素/实际可用性。因此,如果它不适合您,请不要使用它。没有人会因此而看错你。
回答by Rook
I personally love emacs. I've used vim and a handful of IDEs. Vim and emacs both have great communities where people are willing to code up features for just about any language. I don't know of any IDEs that, say, support Haskell. It all depends on what's important to you. Both have extension languages, though IMO, emacs lisp is the better of the two. The ability to ignore the mouse is the main thing I like as well. So many IDEs also feature emacs and vim compatibilty modes or extensions. They both have a large time investment, but both are worth it. Sooner or later, you will choose which suits you, vim/emacs/IDE, and then stick to improving your skills with it.
我个人喜欢 emacs。我使用过 vim 和一些 IDE。Vim 和 emacs 都有很棒的社区,人们愿意为几乎任何语言编写功能代码。我不知道任何支持 Haskell 的 IDE。这一切都取决于什么对你很重要。两者都有扩展语言,尽管 IMO,emacs lisp 是两者中更好的。忽略鼠标的能力也是我最喜欢的。许多 IDE 还具有 emacs 和 vim 兼容模式或扩展。他们都投入了大量时间,但都是值得的。迟早你会选择适合你的,vim/emacs/IDE,然后坚持用它提高你的技能。
回答by starblue
For me most the two most important features are:
对我来说,最重要的两个功能是:
Emacs key bindings, as that is what my fingers are compatible to.
Open-source, for the freedom it provides. Being tied to one platform is anathema.
Emacs 键绑定,因为这是我的手指兼容的。
开源,因为它提供了自由。被绑在一个平台上是一种诅咒。
These days I mostly use Eclipse for programming (set to Emacs keybindings) and FSF Emacs for reading mail and some occasional LaTeX.
这些天我主要使用 Eclipse 进行编程(设置为 Emacs 键绑定)和 FSF Emacs 用于阅读邮件和一些偶尔的 LaTeX。

