需要执行哪些设置和命令才能在emacs中执行此类注释:
/**
*
* something here
*/
Run Code Online (Sandbox Code Playgroud)
谢谢.
一种简单的方法是定义自己的命令以插入此注释。将此添加到您的.emacs文件:
(defun insert-doc-comment () (interactive)
(insert "/**\n * Brief description. Long description. \n * @param \n * @return \n * @exception \n * @see \n * @author \n */"))
Run Code Online (Sandbox Code Playgroud)
然后将新命令绑定到您喜欢的键上:
(define-key global-map [(S-f1)] 'insert-doc-comment)
Run Code Online (Sandbox Code Playgroud)
现在按下Shift-F1将插入一个注释块,如下所示:
/**
* Brief description. Long description.
* @param
* @return
* @exception
* @see
* @author
*/
Run Code Online (Sandbox Code Playgroud)