Skipping through lines
Hi there,
is there a way to quickly skip through lines? I usually do that with ALT+LEFT or ALT+RIGHT but that's not quick enough for me..
For examples when you create a template you can switch from one variable to the next. That's what I want! :)
Best thing would be if the words would be selected so that you can quickl overwrite them!
Cheers,
Tapete
Please sign in to leave a comment.
Hello,
I'm afraid I don't quite understanding what exactly do you mean under 'skip through lines'. It's possible to quickly scroll the document up/down via PgUp/PgDown buttons. If that is what you want?
About selecting words - there is a dedicated action - 'Select word at caret' (invoked by 'Ctrl+W' by default). Also you may check other available approaches.
Denis
Hi Denis,
thanks for the reply.
What I mean by skipping through lines is rather skipping through the elements of one line of code.
For example let's say I have this line:
Now, when I want to add and EventListener for a second button bt2 I just duplicate the line and change bt1 to bt2 and clickButton1 to clickButton2.
The quickest way right now is to use the mouse and doubleclick. But I'd rather do it with the keyboard.
The quickest way with the keyboard is skipping with Alt+Arrow but I'd like to just tap Tab for example 4 times and have clickButton1 selected..
It's quite hard to explain expecially when english is not your native language. ;)
But what I want is pretty similar to the red square thing that comes up when you use a live template.
Oh, I see your point now, thanks.
The actions called after Ctrl+LeftArrow/RightArrow pressing are 'Move Caret to Previous Word'/'Move Caret to Next Word', so, you can configure their hotkeys as necessary. However, I don't think that it is convenient to setup them to single symbol (e.g. tabulation symbol) because you wouldn't be able to type that symbol to the document.
Denis
Thanks for the answer,
"Move Caret to Next Word" is what I meant by ALT-ARROW on my Mac.
But it's too slow for me.Because it doesn't really skip through the elements but parts of words or values.
For examples it stops three times at "addEventListener" or two times at "my_mc" or three times at "0.5". And it stops at every brace and comma..
This is what I want (red means selected):
bt1.addEventListener(MouseEvent.CLICK, clickButton1);
- TAP -
bt1.addEventListener(MouseEvent.CLICK, clickButton1);
- TAP -
bt1.addEventListener(MouseEvent.CLICK, clickButton1);
- TAP -
bt1.addEventListener(MouseEvent.CLICK, clickButton1);
- TAP-
bt1.addEventListener(MouseEvent.CLICK, clickButton1);
Can I change the settings somewhere to achieve this? Or is it more likely a feature request?!
You can switch off the following option in order to avoid inner-words navigation - 'IDE Settings -> Editor -> Smart Keys -> Use "Camel Humps" words'.
It's not possible to configure IntelliJ IDEA skip dots, braces and commas during caret change (as your example mentions). Moreover, it's not worth to do so because that is pretty possible that the user wants to navigate to particular brace/comma/dot etc.
Denis
Okay thanks! I think it would be a great feature though.. would make me lightning fast.
;)
However, disabling camelHumps doesn't seem to have an effect..
Am I right understanding that the caret positions are as mentioned below even after the mentioned setting is turned off?
Denis
Ah I had to restart IntelliJ. Now it works. And it even ignores the underscores! :)
Glad to see that you got desired behavior.
However, it's not necessary to restart the IDE to have the setting change to be applied. I.e. you're expected to open settings dialog, perform target changes, press 'Ok' button and that's it. It is a serious bug if the new setting value is not applied after pressing 'Ok' button. Can I ask you to check that one more time, i.e. change 'Use "Camel Humps" words' setting value and examine if its applied to the editor?
Denis
Hm, well now changing it works immediately. Don't know what it was.
Maybe I've done something wrong.. or it's a not reproducable serious bug. :p
Could it be that it only comes up when you change it for the first time?!
:)
I don't think so
In IDEA10, when parameter pop-up is displayed with Ctrl+P, you can jump between call arguments with Tab/Shift+Tab.
Cool, thanks for the hint!
Automatic selection of the text would be even better.