dontrolle / vscode-reflow-lines

Reflow paragraph extension for vscode
3 stars 5 forks source link

Consider comment specific characters #6

Open bergwerf opened 7 years ago

bergwerf commented 7 years ago

I usually use a tool like this to reflow comments. However, this plugin does not seem to handle comment characters, e.g.:

// first line of my comment
// second line of my comment
// and so on

or

# first
# second

or

-- first
-- second

And so on...

One way to easily support this across many languages is to scan for a common line prefix (like // in C and the likes), and preserve that prefix.

dontrolle commented 7 years ago

Hi.

Thanks for the good idea. Probably a simpler and still useful alternative to #1, which I ended up burning a few hours of vacation-time on the Christmas days - without finishing. Since this is a little side-project, it's much easier biting off smaller improvements one-by-one.