|
So I'm starting out with Visual Studio for the 1st time and I'm wondering if anyone can give me a good reason as to why the comment/uncomment hotkeys are so idiotic. I'm coming over from SublimeText where 'Ctrl + /' either comments/uncomments based on whether or not the currently selected lines are commented or not. In VS, you have to start a "chord sequence" with 'Ctrl + E', and then if you follow that up with 'C', it will comment out the currently selected lines, but if you follow up with 'U', it will uncomment them instead. Why did anyone think this is a good idea?
|
# ¿ Feb 17, 2015 22:49 |
|
|
# ¿ May 13, 2024 00:37 |
|
bpower posted:Nope, but its trivially easy to reassign keys via keyboard option menu. In the quick launch window (cntl+q) type keyboard, and go from there. Sweet, I'm doing this ASAP. Bonfire Lit posted:My best guess is that they only wanted to use letters for shortcuts because depending on the keyboard layout, you might have to use a modifier to type other chars (for example, you have to hold shift to type numbers on AZERTY, and / is shift-7 on QWERTZ), and they ran out of letters so they had to use chords. That's fair, but I'm still wondering why they wouldn't just use the same letter ('C') to toggle comments on and off instead of putting it on two different keys. Maybe they wouldn't have run out of letters if they simplified
|
# ¿ Feb 18, 2015 16:58 |
|
Jabor posted:Because then you have to contextually decide whether the particular selection is currently "commented out" or not? I know I find it annoying when I want to uncomment a section, but Eclipse decides to add another layer of comments because one of the lines I selected wasn't already commented out. So I'm coming over from SublimeText, and it has never had a problem trying to figure out if it should comment/uncomment depending on the context of what's highlighted. I'm not averse to change, that's not my core complaint. My core complaint is that the very commonly used action of commenting/uncommenting code is no longer one hotkey, but now rather a hotkey followed by one of two modifer keys for a very binary operation (if commented -> uncomment, if uncommented -> comment). I think it's bad because it requires the user to not only press more keys, but it also requires them to stop and make a secondary decision of remembering which key to press depending on what the current state of the code is (commented/uncommented). It's like having Caps Lock be on Ctrl + C, U for uppercase and Ctrl + C, L for lowercase. It's explicit and it makes sense, but there's not much gained here than if the hotkey was just Ctrl + C and it was smart enough to toggle between the two depending on context. I'm just trying to save my keystrokes and put off RSI for as long as possible man!
|
# ¿ Feb 19, 2015 20:19 |
|
Jabor posted:I honestly don't buy that you select a block of text and then have to remember whether you're wanting to comment or uncomment it. That seems like more of a muscle memory "it's different to what I'm used to" thing. Sorry, I think I was unclear in my explanation. I'm not saying that I just forgot what I wanted to do after selecting a block of code, I'm saying that I have to remember which key combination to press depending on whether the selected block is commented or not ("Is this block commented? Ok yeah, I need to press U. Is it uncommented? Oh, I need to press C instead). It's way better when I don't have to think about which hotkey I have to use and I just know that the same key will perform both actions. But you're right, I think after doing it for a while muscle memory would take over so it becomes a non issue.
|
# ¿ Feb 20, 2015 21:55 |
|
Look Around You posted:But Comment starts with 'C' and Uncomment starts with 'U'? I mean I'd agree if it was like 'T' for comment and 'M' for uncomment or something like that, but I mean it's not... The followup keys are intuitive, but it's the fact that it's 2 separate keys is the issue. Look Around You posted:
So if you highlight that entire block, Sublime comments all of that out, resulting in double commenting exactly like VS, which is fairly expected. If you highlight an uncommented line, it will comment with Ctrl + /. If you highlight a commented line, it will uncomment with Ctrl + /. Same hotkey, different result.
|
# ¿ Feb 25, 2015 02:15 |