32

Ever since we got the ability to format comments, I have abused it mercilessly. I put quick code snippets in there all of the time. And I find myself often highlighting a word or two and hitting Ctrl+K, and then quickly mutter, "Ah, dammit," since it didn't do anything.

Can we please have formatting keyboard shortcuts on comments? I promise to make waffles.

Update: Kip made a timely edit of this post (didn't show up in my search, dammit) where this was declined, but there's a GreaseMonkey script. However, my waffle offer still stands.

5
  • 3
    What kind of waffles?
    – random
    Commented Aug 16, 2009 at 4:54
  • 2
    Homemade Belgian. With pure maple syrup. You can choose place of origin: Canadia, Vermont, or Upstate New York.
    – Eric
    Commented Aug 16, 2009 at 4:56
  • Random waffles, of course. :) (Sorry, couldn't resist.)
    – John Rudy
    Commented Aug 16, 2009 at 4:56
  • 1
    Eric, I've always wanted this!!!! Commented Sep 5, 2012 at 15:04
  • Similar request over at TeX.
    – JNat StaffMod
    Commented Oct 27, 2017 at 15:27

5 Answers 5

12

I don't see anything wrong with this. If you are going to allow for the formatting, you might as well allow for the formatting shortcuts (if they are simple enough to implement).

I don't agree that the formatting is being abused or overused. I don't see how you can really have bold/italics/code get overused/abused unless the entire 600 character comment is made up of it.

11

Especially the Ctrl+K would be VERY useful. You know, not everyone has an USA Keyboard where the ` is conveniently placed! Many use a laptop without USA Keyboard and without a "true" numerical keypad, and so they have to fight to do Alt+Fn+M9O (096). I do think this is a localization problem (you program for your keyboard without thinking other persons could have different keyboards). It's like thinking everyone uses the . as a decimal separator.

1
  • 3
    At least do the code formatting: that is rarely abused... except when there is a new user that doesn't know` how to use the site. (But those users shouldn't be using the site in the first place) :D Commented Apr 4, 2014 at 1:25
6

If this gets declined or you can't wait, you can use this Greasemonkey script to add Ctrl + B, Ctrl + I, and Ctrl + K shortcuts when editing comments.

1
  • I use it, however it does have some flaws in it: when you double click on a word to highlight it with a space after it, the script does this: *word_here *. Also, I like that it adds *|* (| = cursor) on the post editor because I have a habit of [CTRL] + [B] → [LEFT ARROW] → text here, so that annoys me sometimes, although I'm getting used to it. Commented Apr 4, 2014 at 1:23
3

German keyboards require an insane keystroke sequence to generate a tick character: Shift-`, Space. Yes, it is true: We need to press the Space key after having released the other two keys.

And adding code formatting to a comment requires doing that twice for every code snippet. I sometimes use the clipboard just for that one character.

2
  • For Italian keyboards, on Windows, it's Alt+96 (on Windows 10, there's also the Italian 142 keyboard which has AltGr+ù for it).
    – CarLaTeX
    Commented Oct 6, 2017 at 3:49
  • Being a user of a German keyboard, I'd say that this is overcomplicating the issue. Simply typing Shift+` and tapping the ` will produce two ` , now simply use an arrow to go back one, and start typing the code part, no need to go through the "space" thing
    – Federico
    Commented Jan 30, 2019 at 8:51
2

Personally, since formatting was added to the comment feature, I think it's been overused in general. Once upon a time (pre-formatting), I thought it would be nice, maybe even helpful (eg, it might make comments easier to read).

I found the exact opposite once it was implemented and people were using it. I've used it a few times myself, but I'm worried that anything which makes it easier to do (keyboard shortcuts, a toolbar with buttons) might encourage others to use them even more.

Why am I down on comment formatting, when even I use it and I was once all in favor of it? Legibility. For some reason, once formatting enters the comment world, I find those comments harder to read onscreen. It might be their reduced font size, or there might be something more to it, but I really find the formatting distracting to the comment.

Of course, I expect very few (if any) in the community to agree with me on this one. :)

3
  • 5
    But it makes comments PRETTY!!! ...okay, I just really only use the code feature...
    – Eric
    Commented Aug 16, 2009 at 5:04
  • 2
    like everything else, it's ok when used sparingly, so I agree with your "let's not make it too easy to do this" Commented Oct 2, 2009 at 10:49
  • Hi @Jeff, it's been 10 years now since it was asked. Can we have it now? Please... Just BOLD, italic and code? Commented Oct 7, 2019 at 18:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .