gpt4 book ai didi

emacs - emacs 中带星号的注释 block

转载 作者:行者123 更新时间:2023-12-04 14:51:03 25 4
gpt4 key购买 nike

需要执行哪些设置和命令才能在 emacs 中进行这样的注释:

  /**
*
* something here
*/

谢谢。

最佳答案

一个简单的方法是定义你自己的命令来插入这个
评论。将此添加到您的 .emacs 文件中:

(defun insert-doc-comment () (interactive)
(insert "/**\n * Brief description. Long description. \n * @param \n * @return \n * @exception \n * @see \n * @author \n */"))

然后将新命令绑定(bind)到您喜欢的键:
(define-key global-map [(S-f1)] 'insert-doc-comment)

现在按下 Shift-F1 将插入一个注释 block ,如下所示:
/**
* Brief description. Long description.
* @param
* @return
* @exception
* @see
* @author
*/

关于emacs - emacs 中带星号的注释 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6578227/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com