Open FichteFoll opened 11 months ago
There is no reason to discard/add leading comment punctuation. If you ask for joining, then simply just do the joining. If you want to remove the punctuation, that's another thing.
Sure you can, but ST is about productivity.
I often find myself frustrated with needing to manually remove leading comment punctuation, when refactoring comments
With wrap_lines
adding them, it would just be consequent for opposite operation (join_lines
) to remove them.
I like how plugins like Doxygen or MarkdownEditing help create a more convinient feeling when working with higher level constructs (beyound plain text) and save some nasty key strokes.
Productivity is not meant to breaking basic logic: in your cases you need something like "wrap_lines_and_add_leading_comment_punctuation()" and "join_lines_and_delete_leading_comment_punctuation()". Most of time we only something that simply wrap or join two lines no matter what they are.
Another bad example in ST is "replace in selection". Somehow it locks the selection after the operation. For me, it is more productive for some corner cases, but not for more general cases.
So if you say "join_lines", just simply join lines. If you say wrap_line(), simply wrap lines - not more, and not less.
It will only happen if the characters are semantically comments according to the syntax that is active. If the Plaintext syntax is active then it will have plaintext semantics.
Most of time we only something that simply wrap or join two lines no matter what they are.
I disagree (which is also why I created the ticket in the first place). I want ST to make me more productive, as deathaxe mentioned, and I have never found myself in the situation where I would have wanted to keep the comment punctuation of the following line when I join it into the current line.
I also have been using DocBlockr for years (comparable to DoxyGen), which automatically adds comment punctuation when a new line is started from a commented line, but that is a bit inconsistent across languages. Ideally ST could also do this similar to how it can do it when wrapping lines. When I know for sure I don't want the next line to be commented, I can simply use ctrl+enter.
Problem description
Similar to the
wrap_lines
command, thejoin_lines
command should discard any leading comment punctuation characters on the following lines.Preferred solution
When joining these lines, caret indicated by the pipe character:
It should result in the following:
Alternatives
None.
Additional Information
No response