Switch between method or constructor parameters
已回答
Simply put, is there a shortcut that allows one to switch between method or constructor parameters back and forth?
For instance, let us say we have a void method foo that accepts three integers: x, y, and z.
So, a call to such a method would look like so: foo(10, 20, 30);
If my blinking cursor (the one that looks like a vertical, elongated capital i) was on the first 10, how could I 'tab over' to the next parameter (the 20) or 'tab backwards' from the 20 to the 10?
请先登录再写评论。
Ctrl+P (View | Parameter Info) and Tab/Shift+Tab.
See also https://youtrack.jetbrains.com/issue/IDEA-185398.
Hmm... As the linked issue states, the it doesn't switch between parameters. (Also, I am using the Mac version, which uses Command + P. My bad for not mentioning this.)
Additionally, changing the next and previous parameters in Keymap doesn't work either.
The issue is about not working in the method declaration parameters, it works fine in the method call parameters and it's stated in the issue.
For some reason, it does not work in method call parameters for me if values are already there.
Sorry, can't reproduce: https://i.imgur.com/r1BItBk.gifv.
A change in the keymap fixed it. Command + Tab on Mac was conflicting with this. Is there a way to not have to do two shortcuts to tab between parameters?
No, request is welcome at https://youtrack.jetbrains.com/issues/IDEA if you have better suggestions that will not conflict with other actions.