How to select the word "Second" in the text "FirstSecondThirdFourth" when the keyboard pointer is placed on the word "Second" (or at the beginning of the word "Second" - between 't' and 'S')? Is there any shortcut? It would be very helpful when changing the name of the function or variable.
Make sure Use "CamelHumps" words option is enabled in Settings(Preferences) | Editor | General | Smart Keys;
Use Main menu | Edit | Extend Selection action and corresponding shortcut.
At least in Android Studio, you can get close by adding a key mapping. In Settings/Keymap, look for Editor Actions/Move Caret to Next Word with Selection in Different "CamelHumps" Mode.
Related
Example:
Author author = new Author("Jack", "Daniels");
In Exlipce when filled "Jack" and pressed "enter" - it automatically went to second parameter and let me fill second one. In Intellij I always have to click with mouse, or use arrow keys.
Is there a shortcut in Intellij to make it quicker? I can't find one myself.
Since IntelliJ 2018.2
You can now jump outside the closing bracket or quote with Tab.
(from: https://blog.jetbrains.com/idea/2018/07/intellij-idea-2018-2-macbook-touch-bar-java-11-breakpoint-intentions-spring-boot-version-control-and-more/)
Basically it means if you have:
Author author = new Author("Jack<cursor>");
And you press Tab, the cursor is placed like this:
Author author = new Author("Jack"<cursor>);
Note: it doesn't matter where the cursor is initially, as long as you are somewhere inside the quotes when you press Tab the cursor is moved outside and placed behind it. If you want to enter the next parameter you have to manually type the comma and String.
The option can be found under: Settings -> Editor -> General -> Smart Keys and is called Jump outside closing bracket/quote with Tab
There are some other useful options there as well like insert pair quote and insert pair brackets.
If you want to go more advanced you can have a look into Live Templates.
A very minor annoyance of mine as this is something I need to do regularly, therefore it could speed me up considerably over time. Say I have the following four lines:
File.join(root,
'setup',
'pre-suite',
'install.py'),
If my cursor was resting before 'File' I can use CMD+SHIFT+Right arrow to highlight part of the line or the full thing, I can even move this line down the list by using the down arrow instead of the right arrow. However, I want to select all four lines using the keyboard only, is this possible? If so how?
Here on Windows Shift + Up/Down expands selection to include the line above/below.
Since you are on Mac (based on Cmd in your shortcuts) ... just use Preferences | Keymap and look what shortcut you have got there for Editor Actions | Up/Down with Selection actions.
Another idea - use Edit | Extend Selection few times in a row (how many -- depends on context and caret position). Try it -- it does wonders; especially useful when invoked in the middle of such code block/statement.
When I'm coding in VB.Net in VS2015 I would like to use CTRL+SPACE to select Intellisense proposal when coding. Currently I have to use SHIFT+SPACE and I see no way to change it.
In the preceeding example screenshot it is visible that I have 3 potential options to autocomplete. I can select any of them with key up/down but in order to select the proposal I have following options:
Press 'SHIFT+SPACE' - this will accept the proposal and position the
carret right after the word enabling me to press '(' or whatever else
I want
Press 'SPACE' - this will accept the proposal but it will also
add a white space at the end which is ok for properties/fields but
not good for methods
Press '(' - this will accept the proposal but it
will also add a '(' character at thend which is ok for functions/sub
but not good for properies/fields
Press 'CTRL+SPACE' - this actually does not do anything :(, CTRL on its own makes the Intellisense menu gray-out
In the key configuration window I found the Edit.CompleteWord command:
However this command already has CTRL+SPACE assigned it but it simply does not work. In addition SHIFT+SPACE is not mentioned as one of the keybindings.
Note:
VS2015 does have a flag 'Toggle Completion Mode' but I actually see no difference if this option is checked or not.
you can Use Tab and this will accept the proposal and position the current right after Tab Use space it well show You next Complete Word .
In Sublime Text preferences, there is a "word_separators" property that allows you to specify a set of characters that separate different words.
"word_separators": "./\\()\"':,.;<>~!##$%^&*|+=[]{}`~?"
This allows you to control what is selected when you double click on a certain piece of code.
Is there something similar for WebStorm? I would like to remove the hyphen from the list so a string such as "my-hyphen-word" is entirely selected when it is double-clicked.
No, there are no such settings; please vote for IDEA-155523.
Note that there is a 'Select whole CSS indentifiers on double click' option (Settings | Editor | General | Smart Keys) that controls the double-click behavior in CSS
I always run into this situation: cursor is on line 5 and I want to select everything down to line 16. I have to resort to shift-arrow, arrow, arrow, or use the mouse.
NetBeans has "go to line" (Control-G) but you can't hold down shift while doing that, so no good for selecting. There's also "bookmarks," but same problem.
Anyone know of a cool trick that solves this problem?
I'm open to alternate tool suggestions for OS X.
You can use Shift-PgDn or Shift-PgUp to select the next "page" of information.
The only thing that comes to mind is to create an editor macro.
Eg:
Tools > Options > Editor > Macros
Click "New" Enter a name:
Enter a name for the macro: select-5-down
For the macro code enter:
selection-down
selection-down
selection-down
selection-down
selection-down
Click "Set Shortcut" and assign a key binding. I used Alt-M.
Now each click of Alt-M extends the selection by 5 more lines.