digitalmars.D.learn - Automatic insertion of D-style multiline-comments in Emacs
- =?UTF-8?B?Tm9yZGzDtnc=?= (11/11) Nov 12 2017 Have anybody added logic to Emacs' `comment-dwim` that
- =?UTF-8?B?Tm9yZGzDtnc=?= (3/5) Nov 12 2017 Posted also here:
- Basile B. (7/18) Nov 12 2017 my IDE AST tool does this and even more (detection of parameters,
Have anybody added logic to Emacs' `comment-dwim` that 
automagically inserts a (Ddoc-style) multi-line comment like
/** ...
  */
void foo
{
}
if the cursor is currently in front of a (function) definition 
(or declaration)?
I realize that the challenge here is context detection; perhaps 
`beginning-of-defun()` could be used?
 Nov 12 2017
On Sunday, 12 November 2017 at 12:52:48 UTC, Nordlöw wrote:Have anybody added logic to Emacs' `comment-dwim` that automagically inserts a (Ddoc-style) multi-line comment likePosted also here: https://stackoverflow.com/questions/47249052/automatic-insertion-of-multiline-declaration-comments
 Nov 12 2017
On Sunday, 12 November 2017 at 12:52:48 UTC, Nordlöw wrote:
 Have anybody added logic to Emacs' `comment-dwim` that 
 automagically inserts a (Ddoc-style) multi-line comment like
 /** ...
  */
 void foo
 {
 }
 if the cursor is currently in front of a (function) definition 
 (or declaration)?
 I realize that the challenge here is context detection; perhaps 
 `beginning-of-defun()` could be used?
my IDE AST tool does this and even more (detection of parameters, 
return section and throw section):
https://github.com/BBasile/Coedit/blob/master/dastworx/src/ddoc_template.d
https://www.youtube.com/watch?v=VEVqSItCKfo&index=11&list=PLzk8A0LUvEOV-OMdz09jfOahwnKoA2na_
though you would need a bridge to interpret and use the output in 
Emacs.
 Nov 12 2017








 
  
  
 
 =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com>
 =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> 