你如何学习正确的 Emacs? [英] How do you learn proper Emacs?

查看:21
本文介绍了你如何学习正确的 Emacs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我即将学习 Emacs,已完成教程并借用了 O'Reilly 的 Emacs 书籍.但问题仍然是 - 您如何学习良好的 Emacs 工作流程?我想,您不会像以前那样使用 Emacs,例如 Vim.

I am about to learn Emacs, have been through the tutorial and borrowed the O'Reilly book on Emacs. But the question still is - how do you learn good Emacs workflow? I guess, you don't use Emacs as you'd use, for example, Vim.

这个问题似乎与我有关:- 在哪里可以找到专业人士使用 Emacs 的视频?

This question seems revelant to mine: - Where can I find a video of a professional using Emacs?

推荐答案

我不敢相信没有人提到过这一点,但阅读 Emacs 捆绑的信息页面是了解晦涩功能的好方法.每当您需要暂停编码时,点击 M-x info 并随机选择一个页面进行阅读.你的 emacs 能力会以惊人的速度提升.

I can't believe nobody has mentioned this, but reading the info pages bundled with Emacs is a great way to learn about obscure features. Whenever you need a break from coding, hit M-x info and pick a random page to read. Your emacs ability will improve incredibly quickly.

了解 emacs 的自文档化如何帮助您工作也很重要.例如,您想知道如何缩放字体大小.与其打断你的流程并在此处、IRC 或 Google 上提问,你可以问 emacs!只需点击C-h a(M-x command-apropos)并输入搜索词,在我们的例子中是scale.如果有匹配的函数,它们的名称、键绑定和文档将出现.有,现在您刚刚发现了 text-scale-increasetext-scale-decrease.

It is also important to realize how emacs' self-documenting-ness helps you work. Say, for example, you are wondering how you can scale the font size. Instead of interrupting your flow and asking here, or on IRC, or Google, you can ask emacs! Just hit C-h a (M-x command-apropos) and type a search term, in our case scale. If there are matching functions, their names, keybindings, and documentation will appear. There are, and now you've just discovered text-scale-increase and text-scale-decrease.

还有其他自文档功能很好学,C-h m 会告诉你在当前主要和次要模式下有哪些键绑定和命令可用.这是发现您不知道存在的功能的好方法.

There are other self-documentation functions that are good to learn C-h m will tell you what keybindings and commands are available in the current major and minor modes. This is a great way to discover features you didn't know existed.

通过渗透学习"的另一种方法是为您经常使用的模式M-x定制组.(customize 是几乎所有模式都支持的交互式配置编辑器.)

Another way to "learn by osmosis" is to M-x customize-group for the modes you use regularly. (customize is the interactive configuration editor that almost all modes support.)

最后要做的是学习 Emacs Lisp.使用现有工具很好,但有时您需要自己的工具.如果你试图避免学习 Lisp,你将总是被一些不太正确的事情所困扰,这是一种耻辱.

The final thing to do is to learn Emacs Lisp. It is nice to use existing tools, but sometimes you will need your own. If you try to avoid learning Lisp, you will always be stuck with things not quite working right, and that's a shame.

Emacs 是一个很好的自定义环境.Emacs 包括两个 Lisp 手册,可以通过 M-x info 查看.它是自文档化的,所以你可以说 C-h fM-x describe-function 来获取任何函数的文档.您甚至可以按 TAB ENT 跳转到该函数的源代码,看看它是如何实现的.当您认为我希望我有类似 foo 的东西,但只是略有不同"时,这很棒.您可以阅读 foo 的实现方式,在 *scratch* 缓冲区中进行更改,然后查看您是否喜欢更改.没有编辑/编译/测试周期.您按下一个键,您的 emacs 会话立即具有您刚刚编写的功能.

Emacs is a great environment for customizing itself. Emacs includes two Lisp manuals that are viewable via M-x info. It is self-documenting, so you can say C-h f or M-x describe-function to get the documentation for any function. You can even press TAB ENT to jump to the source code of that function, to see how it's implemented. This is great when you think "I wish I had something that worked like foo, but just slightly different." You can read how foo is implemented, make your change in the *scratch* buffer, and then see if you like the change. There is no edit/compile/test cycle. You press a key and your emacs session immediately has the feature you just wrote.

你在学习 emacs 上付出的努力越多,emacs 就会做的越多,让你的工作更轻松.

The more effort you put into learning emacs, the more emacs will do to make your work easier.

这篇关于你如何学习正确的 Emacs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆