TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learn Emacs: Keyboard Macros

61 点作者 binarysoul超过 13 年前

5 条评论

drblast超过 13 年前
There have been various times in my programming career that I've wanted an emacs macro with arguments, so that it would do things like concatenate a number in each line. Things like this in C:<p><pre><code> #define a 0 #define b 1 ... #define l 10 #define m 11 </code></pre> Usually I take that as a sign that I need to write some other program to generate the lines of the C program, but for some tasks that's overkill and I want an automated way to create a list of sequential things so I don't have to type 1 down 1 down 1 down 1 down 2 down 2 down 2 down...<p>Surely this is a solved problem.
评论 #3220654 未加载
评论 #3220548 未加载
评论 #3220961 未加载
评论 #3220534 未加载
评论 #3220890 未加载
评论 #3221202 未加载
评论 #3220727 未加载
评论 #3220568 未加载
评论 #3224389 未加载
评论 #3221491 未加载
ryanwatkins超过 13 年前
Each time I consider trying another IDE, I turn on the sometimes available "use emacs keybindings" feature.<p>Then I quickly remember I use the macro feature constantly and back I go to Emacs.
hollerith超过 13 年前
Long-time Emacs user here. (When I search for a string, read, send or reply to an email, or set a timer to tell me when my eggs are ready, I use an Emacs command I wrote.)<p>I just want to say that if you plan to learn how to write commands in Emacs Lisp, you do not need to learn how to define or use keyboard macros. In my experience, it is always easier just to write some lisp.
评论 #3221749 未加载
agumonkey超过 13 年前
On the tangent, this may be the 10th article of this kind i've seen, the 1st time it was nice to discover macro shortcuts, now I feel something is wrong.<p>Emacs documentation is large and well written, yet we discover features with google, it's not even centralized, let's avoid duplication of efforts and reinforce emacswiki. Maybe integrating emacswiki with the standard emacs distribution in some way ? (if it's not done already.. which would render this little rant finally funny)
评论 #3221767 未加载
评论 #3220904 未加载
binarysoul超过 13 年前
disclaimer: I'm the author<p>Any suggestions for other emacs topics I should blog about?<p>Thanks for your interest.
评论 #3220878 未加载
评论 #3220852 未加载