New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for automatic continuation of single-line comments #2084
Comments
This sort of thing is language specific (particularly if you are detecting doc comments in their various forms and doing special things. That sort of thing should be in plugins not in core. Also how do you stop it repeating the comment on the next line when you press return at the end of the comment block? |
Since there is no explicit end of the block (like |
That's true, but in come C++ projects (LLVM, for example) people prefer C++ comments even for comment blocks and Doxygen. |
Yes, multiline So similar to my comment on #2082, this is language specific and either:
So I suggest this is more likely a plugin thing. Plugins should not be thought of as some sort of second class feature, and they have many advantages for developing new features like this, being outside core and because they can be disabled by users if they cause problems, they are not so heavily reviewed, so plugins and changes to them are usually accepted much faster. They can be added to the Geany-Plugins collection and get packaged by distros, and if they become very popular they can become "core plugins" so they are automatically distributed with Geany itself. And all still not in core. Anyway, back to the actual functionality 😁 @danpla your suggestion of having to delete comments to end the block doesn't sound very satisfying, it just swaps having to type the comments with having to delete them. The plugin could have an unbound keybinding that the user could bind, eg to |
@elextr Yes, a key binding may be an option. But I think manual removing is somewhat consistent with the current termination of a block comment, and, in fact, it needs the same number of keystrokes (or even one less if smart Home key is enabled):
Anyway, I understand that such things should be in a plugin, so I close the issue. |
It would be nice to have automatic continuation of single-line comments, as long as such a comment is not inline (that is, there is no code before the comment).
For example, pressing Return after this comment (C++,
|
is caret):Will result in:
One of the reasons why it's useful is writing Doxygen documentation. Along with C-style multiline comments, Doxygen supports C++-style comments in the following two forms:
Currently, writing such comments is extremely tedious, not only because you have to type
///
or//!
every time, but also because the indentation within the comment is lost. Detecting such special cases(
///
and//!
) is easy to implement as long as basic form (//
) is supported.The text was updated successfully, but these errors were encountered: