简体   繁体   English

我如何在Emacs中执行此操作?

[英]How do I do this in Emacs?

In the video the guy was able to insert functions and classes by pressing some buttons. 视频中,该人能够通过按下某些按钮来插入功能和类。 How do I set up my Emacs to do that? 如何设置我的Emacs来做到这一点? Did he just use auto insert mode or something? 他只是使用自动插入模式吗?

您可以为Emacs尝试yasnippet骨架或其他几种模板机制。

As suvayu indicated, the guy in that video is mostly using various template mechanisms in Emacs (this is actually not that impressive). 正如suvayu指出的那样,该视频中的人主要使用Emacs中的各种模板机制(这实际上并不那么令人印象深刻)。 If you want your mind to really be blown, have a look at Marco Barringer's SLIME video . 如果你想让自己的思想真的被吹嘘,请看看Marco Barringer的SLIME视频 In it, he demos how to use the Common Lisp SLIME mode in Emacs. 在其中,他演示了如何在Emacs中使用Common Lisp SLIME模式 Along the way, he shows how an expert Emacs user effectively utilizes Emacs to write code. 在此过程中,他展示了专家Emacs用户如何有效地利用Emacs编写代码。 First, just watch the movie. 首先,只看电影。 Then, if you want to know more details about what he's doing, read Peter Christensen's transcript of the movie (I wrote a blog entry just after the movie came out with comments from a number of good lisp programmers who had seen the movie). 然后,如果你想知道他正在做什么的更多细节,请阅读彼得克里斯滕森的电影记录(我在电影出来之后写了一篇博客文章 ,其中有许多看过这部电影的优秀lisp程序员的评论)。 Once you've seen the movie and can understand what is happening in it, attempt to adopt some of the techniques demonstrated in that video using your preferred programming language. 一旦你看过电影并且能够理解其中发生的事情,尝试使用你喜欢的编程语言采用该视频中演示的一些技术。

您还可以查看CEDET包中的 SRecode模块 - 它允许实现上下文相关的模板(例如,一些只在类内部可用,等等),还有一些用于elisp,c ++,java等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM