How can I change how VS Code indent multi-line comments? - visual-studio-code

When I auto re-indent my code in VS Code, multi-line comments are indented with the asterisks not vertically aligned. I would like them to be aligned so that I can comply with jsdoc-format.
How can I force it to align the asterisks vertically?
Here is an illustration:
/**
* How VSCode indents it
*/
/**
* How I want it
*/

Related

In Visual Studio code version 1.64, MarkdownString with 4 leading spaces is displayed as blank in Hover

Our Visual Studio Code Extension uses the HoverProvider API to show custom hovers on the editor. We are using MarkdownString for the hover content with 4 leading spaces for each line to enable syntax coloring. Till version 1.63, this was working fine. But on using vscode version 1.64, hover shows empty tooltips.
Turns out that the issue is resolved once the leading spaces are removed. But the syntax coloring does not show up if there are no leading spaces. Is there a change in the behavior of MarkdownString, or is there a different way to enable syntax coloring for the data type?
I think the preferred way is to use this:
const markdownString = new vscode.MarkdownString();
const codeBlock = `const a = 12;
if (a) return;`; // any preceding tabs will be rendered in a template literal, so flush left
// const codeBlock2 = `const c = 12;\nif (c) return;`; // works, alternate form with newline
markdownString.appendCodeblock(codeBlock, "javascript");
markdownString.isTrusted = true;
return new vscode.Hover(markdownString, new vscode.Range(position, position));
Also the <pre> and <code> tags are supported in markdownString's:
content.appendMarkdown(`<p><b> Some label: <code>${value}</code></b></p>`);

Visually show lists - indent after line break in bbEdit

I am using bbedit 12 in a markdown document.
I have enabled Soft Wrap Text at Page Guide as it makes the document easier to read.
As can be expected, itemised lists looks like this:
* some reallllllly long
text
* and another loooooong
paragraph
but I would like them to be shown as follow:
* some reallllllly long
text
* and another loooooong
paragraph
Is there a setting to indent the lines in one item on the display?
Thanks.
The Reverse option for soft-wrapped line indentation seems to work for me. But I don't completely understand how it operates, so it may not work in all cases.

I'm having trouble escaping a unicode reference in JavaDoc

I want to put an example in JavaDoc:
/***
* This will filter out symbols like:
* Waving White Flag U+1F3F3 {#literal "\uD83C\uDFF3"} in Miscellaneous Symbos and Pictographs.
* …
*/
I've tried #code, #literal, and <pre> none of which seem to keep it, but it'd be nice if it was legible both in the doc and source. I also can't seem to put "\uD83C\uDFF3" into those for the fixed width rendering.
I'd like it to read like:
This will filter out symbols like: Waving White Flag U+1F3F3 "\uD83C\uDFF3" in Miscellaneous Symbos and Pictographs. …
Encode the backslash as \u005C to hijack the unwanted encoding, and use <code></code>:
/**
* This will filter out symbols like:
* Waving White Flag U+1F3F3 <code>"\u005CuD83C\u005CuDFF3"</code> in Miscellaneous Symbos and Pictographs.
* …
*/

M-RET to make text into same-level headline in org-mode

In org-mode < 8 M-RET at the beginning of non-headline text will make that text into a headline with the same level as the one above.
Example:
* Headline
Text
If the cursor is in the beginning of 'Text' then M-RET will produce:
* Headline
* Text
In org-mode > 8 this behavior has changed. The same action will produce:
* Headline
*
Text
What would be a way to easily make text into a headline like in the < 8 versions of org-mode?
(C-* comes close but will produce a headline one level below the above:
* Headline
** Text
)
(NB: It isn't the same as this issue which I guess has been fixed. Anyways I'm not getting that in org-mode 8.2.5h-dist)
M-RETruns org-meta-returnin my old org-mode. And according to the docs that runs org-insert-heading. You could perhaps try that command or have a look at the code for it.

Eclipse: How to change color of javadoc comment and to remove extra blank

In the picture below how can I
change the color of comments between /** and */ ( entire thing including *)
remove that single black space that I marked in red (before */)
1) Look on the appropriate Syntax Coloring preference page.
2) It's part of the vertical ruler, space reserved for the folding controls.