在Emacs教什么初学者? [英] What to teach a beginner in Emacs?

查看:165
本文介绍了在Emacs教什么初学者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 
启动emacs:emacs如果你有一个10分钟的动手会议来教人们Emacs,
...
退出emacs:Cx Cc

还有什么让他们在启动和退出Emacs之间当你站在他们身后的时候?

解决方案

如果我只有10分钟,我根本不会教他们任何捷径。所有常见的快捷方式都可以在菜单中相应的命令旁边找到;用户可以自己发现的那些。



最重要的事情是让用户自己发现/学习的东西:




  • 可以使用 Cx Cc 或File-> Quit退出Emacs。卡住时,应键入 C-g ,如果不起作用,则 ESC ESC ESC 。 [这可能是一个最有用的建议,以防止Emacs的完全失望,相信我。]


  • 教程:Help-> Emacs教程或code> Ch t 。 [这不是一个非常有用的 的快捷方式。考虑到在一个人的生活中阅读教程的次数多少...]


  • Emacs中的每个按键都绑定到一个函数的概念, Emacs所做的一切都是执行功能。有更多的功能可能绑定到键,而没有按键的功能可以使用 Mx function-name


  • 可以通过 Ch k [keystroke] 发现特定键调用什么函数。让用户走过几个(包括有趣的事实,打字不是特殊的,只是调用 self-insert-command ,所以如果有人想,可以绑定字母z以发送电子邮件:D)


  • 可以使用 Ch a

  • code>(或 Mx apropos-command ),例如 C-h段落显示了与段落有关的所有命令,包括快捷方式将在段落的结尾处开始。而 C-h w command-name 会告诉你命令是否绑定到一些按键。 [让他们走过这一步,发现撤消的关键是 - 通常他们会尝试Cz,它会产生烦人的东西:)]


  • 您可以阅读有关使用 Mx describe-function Chf )。 Emacs有关于大多数事情的伟大文件;和 Mx apropos-documentation Ch d )是发现东西的好方法。


  • 这个设置存储在.emacs中,即使不了解Emacs Lisp,也可以通过查看该文件来收集一些内容。


  • 通常可以通过在其后键入 Ch 来查找完成一组特定键的所有按键,例如'C-x C-h'将显示所有以C-x开始的快捷方式; C-h C-h 特别有用; Cc Ch 对于模式特定的命令非常有用,例如在java模式或c ++模式或LaTeX模式下等等(嗯,模式...)


  • 卡住时,可以在 http://www.emacswiki.org/ 。 (或在Freenode的#emacs IRC频道中提出问题,或者发布到 gnu。 emacs.help 。)




这应该是10分钟,这是最重要的东西,我认为。我不会超载太多的捷径来记住;这是无意义的 - 如果用户知道如何发现快捷方式,他们会找到他们最常用的任何捷径。让他们写下这些命令的名字,还有关于Emacswiki等。



重要的是向他们展示Emacs的强大程度,以及它的模型如何普及是(所有那些关于它作为操作系统的笑话不只是笑话)。如果您只是展示了一大堆奥术快捷方式,可以在其他编辑器中做出这些事情,Emacs似乎并不值得所有的麻烦。本着同样的精神,我也完全支持Anton Nazarov的答案,告诉他们Emacs可以做什么(AucTeX如果他们使用LaTeX等)来他们的具体目的。然后他们可以自己判断Emacs是否值得学习,并学习使用上述所有内容。


If you had a 10 minute hands-on session to teach someone Emacs, what would you show them?

Start emacs: emacs
 ...
Quit emacs: C-x C-c

What else would you have them do between starting and quitting Emacs, while you stood behind them?

解决方案

If I had only 10 minutes, I would not teach them any shortcuts at all. All the common shortcuts are available next to the corresponding commands in the menus; those the users can discover for themselves.

The most important things to teach are those that will enable the users to discover/learn by themselves:

  • That one can quit Emacs with C-x C-c, or File->Quit. When stuck, one should type C-g, and, if that doesn't work, ESC ESC ESC. [This is probably the single most useful advice to prevent total frustration with Emacs, trust me.]

  • The tutorial: Help->Emacs Tutorial, or C-h t. [This is not a terribly useful shortcut to remember; given how few times one reads the tutorial over the course of one's life...]

  • The concept that every keystroke in Emacs is bound to a function, and all that Emacs does is execute functions one after another. That there are more functions than can possibly be bound to keys, and functions without a keystroke can be invoked with M-x function-name.

  • That one can discover what function a particular key invokes with C-h k [keystroke]. Make the user walk through a few of those (including the amusing fact that typing a letter is not special and just invokes self-insert-command, so if one wanted, one could bind the letter 'z' to send email instead :D)

  • That one can search for possibly useful functions with C-h a (or M-x apropos-command), e.g. C-h a paragraph shows all the commands to do with paragraphs, including what shortcuts will take one to the end/beginning of a paragraph. And that C-h w command-name will tell you if the command is bound to some keystroke or not. [Make them walk through this to discover what the key for undo is -- usually they'll try C-z and it does something annoying :)]

  • That you can read detailed documentation about what a function does with M-x describe-function (C-h f). That Emacs has great documentation about most things; and M-x apropos-documentation (C-h d) is a great way of discovering stuff.

  • That one's settings are stored in .emacs, and that one can glean some things by looking at that file even if one don't understand Emacs Lisp.

  • That one can usually find all keystrokes that "complete" a particular set of keys by typing C-h after it, e.g. 'C-x C-h' will show all the shortcuts starting with C-x; C-h C-h is particularly useful; C-c C-h is useful for mode-specific commands such as when in java-mode or c++-mode or LaTeX-mode, etc. (Hmm, "modes"...)

  • That when stuck, one can search on http://www.emacswiki.org/. (Or ask a question in the #emacs IRC channel on Freenode, or post to gnu.emacs.help.)

This should fit in 10 minutes, and it's the most important stuff, I think. I wouldn't overload with too many shortcuts to remember; that's pointless anyway -- if the users know how to discover shortcuts, they'll find out shortcuts for whatever they use most frequently. Do have them write down the names of these commands, though, and also about Emacswiki etc.

The important thing is to show them how powerful Emacs is and how universal its model is (all those jokes about it being an operating system are not just jokes). If you just show a bunch of arcane shortcuts to do things they can already do in other editors, Emacs won't seem worth all the trouble. In the same spirit, I also wholly support Anton Nazarov's answer of showing them what Emacs can do (AucTeX if they use LaTeX, etc.) for their specific purposes. Then they can judge for themselves whether Emacs is worth learning, and learn using all the above.

这篇关于在Emacs教什么初学者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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