I'm not sure this is possible, but I'm interesting in making this happen.
Ideally, I would like to map this feature to shift+control+3.
I'm looking for a way to have Vim enter a comment (single line) which corresponds to the syntax of the file I'm editing. If there are multiple single-line comment styles, Vim/I can pick one. If the single-line comment has two parts (/*, */), then pressing shift+control+3 the first time will start the comment, and the second time will close the comment.
Examples:
Python: #
JavaScript: //
C, C++: /* */ or //
I know there are scripts which will insert comments for you, but I haven't seen any that will do this based on the syntax of the file.
Thanks!