重新绑定 Emacs 中的键以更改源代码中的注释样式
我正在尝试使用 Doxygen 记录代码的某些部分。我想使用 javadoc 注释风格即
/**
* My Documentation goes here
*/
现在在 Emacs 中,我可以通过选择某个文本块并按 Meta
+;
来注释掉该文本块。通过在所有选定的行前面放置 //
来注释掉这些行。
由于大多数时候我会在代码中编写注释,并使用 Doxygen 进行记录,因此我想重新绑定 Meta
+;
为我提供 javadoc 风格的注释。
我该怎么做?
I am trying to document certain sections of my code using Doxygen. I want to use the javadoc
style of comments viz
/**
* My Documentation goes here
*/
Now in Emacs I can comment out a certain block of text by selecting it and by pressing Meta
+;
. This comments out the lines by placing a //
in front of all the lines selected.
Since most of the time I will be writing comments in my code which will be documented using Doxygen, I want to rebind the Meta
+;
to give me a javadoc style of comments.
How do I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 doxymacs。您必须根据自己的喜好重新绑定键,但它附带的绑定非常好。
Use doxymacs. You'll have to rebind keys to your taste, but the bindings it comes with are pretty good.
代码不是文档。您不想仅将 javadoc 样式注释用于文档吗?
听起来您实际上想要一个片段/骨架系统来插入您可以充实的 java-doc 模板。如果是这样,我推荐 yasnippet。
Code is not documentation. Wouldn't you want to use javadoc style comments only for documentation?
It sounds like you actually want a snippet/skeleton system to insert a java-doc template that you can flesh out. If so I recommend yasnippet.