简体   繁体   中英

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? 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). If you want your mind to really be blown, have a look at Marco Barringer's SLIME video . In it, he demos how to use the Common Lisp SLIME mode in Emacs. Along the way, he shows how an expert Emacs user effectively utilizes Emacs to write code. 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). 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等。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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