博客园  :: 首页  :: 联系 :: 管理

effective emacs中文版[0]

Posted on 2011-07-15 14:47  雪庭  阅读(578)  评论(0)    收藏  举报

10 Specific Ways to Improve Your Productivity With Emacs

十个提升你Emacs生产力的高招

Stevey's Drunken Blog Rants

 

 Emacs is the world's best text editor. It's not just the best for editing program source; it's the best for any kind of text-editing. Mastering Emacs will make you more effective at writing and editing email, documentation drafts, blogs, HTML pages, XML files, and virtually everything else that requires any typing.

Emacs是世界上最好的编辑器(真的有很多人这么认为)。不要以为emacs只是在编写程序时很牛X,其实只要你真正精通了emacs,会发现她几乎在所有用到打字的应用(比如写email啦,起草文档啦,写blog啦,写html/xml文件等等等)时都是最牛的。

 

The tips in this little document are geared towards Emacs power-users. You should be familiar with the basics of launching and editing with Emacs, and you should already know the essentials of copying stuff into your .emacs file, and debugging things (or finding a friendly Emacs Wizard) when something goes wrong.

 本文中所写的招数是面向emacs高级用户(译者看此文时并不是emacs高级用户,同样获益非浅啊)的,你应该熟悉基本的emacs启动编辑操作,你得知道怎么把东东拷到你的.emacs里面,在所拷的东东出现问题时,你得知道怎么调试(或者能找到一个乐于助人的emacs高手也行)。

 

Not all the tips are customizations to Emacs; some of them are changes to your desktop environment to make it work more seamlessly with Emacs. 

这里所列出的招数并非都是对emacs的定制,有些是对你桌面环境的调节,这些调节可以使桌面环境更好地与emacs无缝连接工作。

 

The key to understanding Emacs is that it's all about efficiency, which includes economy of motion. Any trained musician will tell you that economy of motion is critical to becoming a world-class virtuoso. Any unnecessary motion is wasted energy and yields sloppy results.

要想理解emacs的高效,关键是要明白她的所有设计都是出于效率考虑的,这里所说的效率包括“动作的效益”。任何一个老练的音乐家都知道“动作的效益”是成为世界级艺术家的关键一环。在演奏时任何多余的动作都是浪费精力而且会产生不良效果。

 

Using the mouse is almost always the worst possible violation of economy of motion, because you have to pick your hand up and fumble around with it. The mouse is a clumsy instrument, and Emacs gurus consider it a cache miss when they have to resort to using it.

使用鼠标基本上可以说是最违背动作效益的行为,因为你得提起你的手...摸着鼠标...摆正方位...可以说鼠标是个极笨重的设备,emacs高手在不得 不用一下鼠标的时候,都认为这是一次高速缓冲命中失败(学过微机原理的人可能听得懂这句话吧),大大影响的连贯性和速度。

 

Compared to Emacs Wizards, graphical-IDE users are the equivalent of amateur musicians, pawing at their instrument with a sort of desperation. An IDE has blinking lights and pretty dialogs that you can't interact with properly (see Item 6), and gives newbies a nice comfortable sense of control. But that control is extremely crude, and all serious programmers prefer something that gives them more power.

相对于emacs高手,图形化IDE用户就好比业余的音乐家,带着些许郁闷地把玩着自己的乐器。一般IDE都又炫又好看的对话框,让你很难与之交互(这句 话面向的听众是emacs高手,看过下面的条款6就会明白他说什么了),但是却给新手一些操控的快感。可是咧~这种操控是相当粗糙的,真正的程序员需要的 是能给他们更多操控机能的东东。(所以基本上可以说,emacs对真正的程序员来说是世界上最好的编辑器啦)

 

IDEs also offer Refactoring tools, which are all the rage, because they help you automatically fix your screwed-up code. This is fine, as far as it goes, but I'll tell you a secret: Refactoring tools don't understand English. They won't help you one bit when you're doing something that the tools weren't designed to handle. Refactoring tools are cookie-cutter solutions; Emacs offers you a level of fine-grained control over your environment that makes you the equal of any editing challenge.

IDE还具备重构功能,一般什么多人都爱拿这个来吹,因为重构工具可以自动地帮你整理结构不良的代码。没错,在某些程度上来说。但是偶告诉你个秘密喔:重 构工具不懂英文耶(所以更不懂中文啦,55)。重构工具一般只能处理一些特定的文本(前面所说的“某种程度”),当她碰上其它编辑工作时,就无能为力啦。 重构工具只能解决一小部分问题,而emacs却几乎能在你进行任何一类编辑时提供一系列条理清晰的操控能力。

 

However, as I often point out, this has to be seen to be believed, and even if you believe it, you need to make a serious, lifelong commitment to Emacs in order to master it. Mastering it involves learning Lisp and customizing Emacs to the finest degree imaginable. This simply serves to increase your hunger for more control and more automation, so even if you've mastered Emacs,you're never really finished extending it.

然而,正如我常说的,眼见为实,即便你相信,你也得看到实际效果才心甘。那么接下来,你得对emacs做一个严肃的、深远的、长期的承诺,才能真正精通 emacs。精通emacs的过程包括学习Lisp、定制emacs使她最符合你的设想,随着这一过程的,你会更加地渴望有更多定制、更多的自动化,所 以,哪怕你已经精通了emacs,你对她的定制和扩展也不会停息的。

 

So it's not an editor for the faint of heart, and this blog is targeted at people who have already made the commitment, and want to improve their mastery of this elegant, timeless piece of software.

 所以,你看明白了吧?emacs可不是一个给懦夫使用的编辑器,这篇博客文章是给那些下了决心、做了承诺并且想要进一步增强他们对这个优雅的顶级的万古长青的软件的掌握。

 

The rest of you: I think your Eclipse just finished launching, so you can get back to work now.

其他的读者或者听众:我想你的Eclipse应该刚好启动完毕了,你可以调头回去忙你自个儿的啦~