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

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

问题描述

我正在学习Emacs,一直通过教程,借鉴了O'Reilly的Emacs书。但问题仍然是 - 您如何学习Emacs工作流??我猜,你不要使用Emacs,例如 Vim



这个问题似乎对我来说是显而易见的:
- Where我可以使用Emacs找到一个专业的视频吗?

解决方案

我不敢相信没有人提到这个,但阅读与Emacs捆绑在一起的信息页是了解模糊功能的好方法。每当你需要编码中断时,点击 M-x info 并选择随机页面进行阅读。您的emacs能力将非常快速地提高。



同样重要的是要了解emacs的自我档案能否帮助您工作。比方说,你想知道如何扩大字体大小。而不是中断您的流程并在这里询问,或在IRC或Google上,您可以询问emacs!只需点击 Ch a Mx command-apropos ),并键入一个搜索项,在我们的例子中尺度。如果有匹配的功能,它们的名称,键盘和文档将会出现。有,现在你刚刚发现了 text-scale-increase text-scale-reduced 。 p>

还有其他自学文件功能很好学习 Ch m 会告诉你可以使用什么键绑定和命令目前的主要和次要模式。这是发现您不知道存在的功能的好方法。



另一种通过渗透学习的方式是 Mx自定义组为您定期使用的模式。 ( custom 是几乎所有模式支持的交互式配置编辑器。)



最后要做的是学习Emacs Lisp很高兴使用现有的工具,但有时您需要自己的工具。如果你试图避免学习Lisp,你总会被困在不正常的事情上,这是一种耻辱。



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



您更加努力学习emacs,更多的emac将使您的工作更容易。


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.

This question seems revelant to mine: - Where can I find a video of a professional using 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.

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.

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.

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.)

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 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.

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

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

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