Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Jerry Bindle
May 16, 2003
NetBeans is pretty great if you're writing an application or plugin for the NetBeans platform

Adbot
ADBOT LOVES YOU

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!
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?

bpower
Feb 19, 2011

enthe0s posted:

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?


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.

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

enthe0s posted:

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?
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.

El Marrow
Jan 21, 2009

Everybody here is just as dead as you.
Node.js dev here. I'm utterly in love with WebStorm by JetBrains. It's a fantastic IDE for Node and pretty much all other JS-related development. Aside from WebStorm, gimme Vim all day.

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!

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 :colbert:

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

enthe0s posted:

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.

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.

The core of your complaint seems to be "they do it differently to what I'm used to" - which is a completely reasonable objection (and reason to want to change it), but doesn't mean that their way of doing it is bad.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
If anyone missed it, the EAP for JetBrains CLion (C/C++) came out in September.

Has anyone used it for anything non-trivial yet? I'm giving it a go as a replacement to the Arduino IDE (using Arduino-cmake), and I haven't yet felt the urge to punch myself in the face.

Doh004
Apr 22, 2007

Mmmmm Donuts...
XCode is the best IDE I've ever used in my entire life.

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

v1nce posted:

If anyone missed it, the EAP for JetBrains CLion (C/C++) came out in September.

Has anyone used it for anything non-trivial yet?
It's nice, but I'm seeing some problems where it stops highlighting and pegs a core on several preprocessor macros from a Boost library.

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!

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.

The core of your complaint seems to be "they do it differently to what I'm used to" - which is a completely reasonable objection (and reason to want to change it), but doesn't mean that their way of doing it is bad.

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! :argh:

Volguus
Mar 3, 2009

enthe0s posted:

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! :argh:

On the other hand, it could be argued that commenting code during development is a habit that should go away. With distributed version control systems it is easier than ever to commit anytime you want, revert, commit again, etc., therefore making the deletion of code a much more viable and preferable option, as it reduces the probability of "junk" littering your project.

On the other hand, i don't commit that often either and during crunch "this loving thing doesn't wanna work" sessions, commenting out code comes out more naturally.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Volguus posted:

On the other hand, it could be argued that commenting code during development is a habit that should go away. With distributed version control systems it is easier than ever to commit anytime you want, revert, commit again, etc., therefore making the deletion of code a much more viable and preferable option, as it reduces the probability of "junk" littering your project.

On the other hand, i don't commit that often either and during crunch "this loving thing doesn't wanna work" sessions, commenting out code comes out more naturally.

There's nothing wrong with commenting code for testing purposes while you're actively working on it. Committing it that way is another story.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

enthe0s posted:

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).

When do ever want to toggle whether a particular bit of code is commented out or not? That's not an operation that makes any semantic sense at all.

Sometimes you want to comment a block out. Sometimes you want to uncomment a block that has been commented out previously. It's pretty reasonable to use the same key combination for both operations, but 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.

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!

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.

Look Around You
Jan 19, 2009

enthe0s posted:

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.

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...


e: what behaviour does a contextual one do for something like:

code:
if (x == 5) {
  // x *= 20;
  x *= 3;
  // return x + 3;
  return x + 20;
}
? I've never used that feature before tbh.

Look Around You fucked around with this message at 22:24 on Feb 20, 2015

Volguus
Mar 3, 2009

Jabor posted:

... That seems like more of a muscle memory "it's different to what I'm used to" thing.

But, isn't that the entire thing with IDEs (editors in general)? Nowadays, most IDEs (outside of very specialized ones, like XCode, or Android Studio, or Keil ), have roughly same capabilities. They simply differ in how they allow you to do X. Some people really like to do X in Y way, some people highly dislike the Y way. I personally highly dislike the JetBrains style, but I can get along better with netbeans, eclipse or KDevelop. They have roughly same capabilities (for their specific targets), they just do some things differently. And of course, all have their own quirks, that we learn to live with.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

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...


e: what behaviour does a contextual one do for something like:

code:
if (x == 5) {
  // x *= 20;
  x *= 3;
  // return x + 3;
  return x + 20;
}
? I've never used that feature before tbh.

Intellij does "/" for comment and uncomment, and it really pisses me off. For your code fragment, it would comment that including double commenting the already commented lines.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Volguus posted:

I personally highly dislike the JetBrains style
Could you elaborate? I'm not trying to snark, just curious.

Volguus
Mar 3, 2009

Sagacity posted:

Could you elaborate? I'm not trying to snark, just curious.

I wrote a post in this thread a few pages back elaborating on this, but it essentially it boils down to me disliking the editor's way of working. It doesn't do things the way i want them to be done, and I have no reason to go through the pains of adapting myself to it since there are other IDEs out there that work the way I want them to. Plus they even ask money for things that others have for free (while not providing anything to justify the price). Of course, this is my opinion, based on Idea 12-13.x, since i haven't tried yet the latest version. Maybe my opinion will change in the future when I'll be forced to use Android Studio let's say, or some other jetbrains IDE. If you are happy with it ... more power to you.

Volte
Oct 4, 2004

woosh woosh

KernelSlanders posted:

Intellij does "/" for comment and uncomment, and it really pisses me off. For your code fragment, it would comment that including double commenting the already commented lines.
That seems like the correct action to me. A toggle-able commenting action should be fairly trivially invertible. If you select a block of code and use the comment toggle, it should make a best-effort attempt to comment it out in the way that makes the most practical sense and can be immediately reversed by invoking the command again. To me, that means commenting the entire block out unless every line is already commented out, in which case uncomment. It doesn't nail every use case but in most cases that's what I would want. If you want a command that uncomments all commented lines within a selection, that's an uninvertible command and I feel like it should be a separate thing from the usual 'toggle comment' command.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

Volte posted:

That seems like the correct action to me. A toggle-able commenting action should be fairly trivially invertible. If you select a block of code and use the comment toggle, it should make a best-effort attempt to comment it out in the way that makes the most practical sense and can be immediately reversed by invoking the command again. To me, that means commenting the entire block out unless every line is already commented out, in which case uncomment. It doesn't nail every use case but in most cases that's what I would want. If you want a command that uncomments all commented lines within a selection, that's an uninvertible command and I feel like it should be a separate thing from the usual 'toggle comment' command.

I agree that's the right behavior given that's it's a toggle action. I'd rather it not be a toggle action and have one command for comment and another for uncomment.

Blue Footed Booby
Oct 4, 2006

got those happy feet

Serious bikeshedding ITT

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!

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:



e: what behaviour does a contextual one do for something like:

code:
if (x == 5) {
  // x *= 20;
  x *= 3;
  // return x + 3;
  return x + 20;
}
? I've never used that feature before tbh.

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.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Bonfire Lit posted:

It's nice, but I'm seeing some problems where it stops highlighting and pegs a core on several preprocessor macros from a Boost library.

It's a Jetbrains IDE, so working as intended.

  • Locked thread