This question already has an answer here:
How to change Intellij CamelHumps behavior as it was in 2017.1?
(1 answer)
Closed 3 years ago.
In IntelliJ, when I double click on a variable like initImage, the IntelliJ only selects either "init" or "Image".
How do I make IntelliJ select the whole variable/function name instead of a word in it?
Check to see that you do not have the CamelHumps words setting turned on.
Under Editor->Smart Keys->Use CamelHumps words (or just search the settings for CamelHump).
Deselect it and that should resolve the issue.
Related
Am trying to shift multiple lines of code in intellij IDEA by a single space using Tab shortcut but it always shifts by 4 spaces rather than a space. I have tried Edit > Convert Indent > To spaces but to no avail.
How do you shift multiple lines of code by a single space without messing with the default configuration for the file?
As #Andrey already suggested, I would use the Multi Cursor feature that has been around since intellij idea version 13.
I like the Add selection on Next Occurrence feature very much. It helps me to edit multiple lines very fast.
This screenshot shows the action in the Settings -> Keymap screen.
Is there a way to add multiple environment variables in IntelliJ? When one sends me a list of variables I can add them one by one by clicking + in this window
But it's quite annoying to do for 10 or 20 variables every time. I can copy all variables from Environment variables field but we cannot paste there. Is there any way to do it?
Yes, it's totally possible to paste all environment variables at once in this screen but they need to be in a specific format.
Click on the ... button to the right of environment variables to show the dialog you have in your first screenshot.
Now you can use the Paste button but the values in your clipboard have to be in a specific format for pasting to work. In your case that clipboard info would be something like this:
APP_PORT=8080
DB_URL=jdbc:mysql...
DB_USER=javausers
DB_PASSWORD=javausers
APP_LOGGING_LEVEL=DEBUG
Try copying the value above and use the paste button (not Ctrl+v). If you don't have your data in this format you can try formatting it using a text replace tool online.
Also if you select all of the values in that dialog and click the copy button you can get the values in the same format that will work with importing. Warning: clicking Ctrl+c will not copy the values in the same format as the copy button in the dialog.
You could use "Paste" button at the bottom of the variables list.
Yes, just:
Click on the three dots (...) button of the Environment variables option. On the Windows version, the button is a little folder icon.
Select all the variables on the showed popup (name and value) and click on the "Copy" button. Close the popup.
Choose the other configuration, open his Environment variables option and click on the "Paste" button.
I am not sure if the (...) option is available in the community edition also.
This is how i was able to add them to the configuration. Just select the environment variables you want to import into the desired configuration.
E.g: If you have variables like
min_instance_count: 1
max_instance_count: 2
min_memory: 2
max_memory: 2
Replace the colons/other delimiters with = :
min_instance_count= 1
max_instance_count= 2
min_memory= 2
max_memory= 2
Now import the variables by copy-pasting (the clipboard sign).
You can simply paste a ; concatenated list of environment variables (and their values) into the Environment Variables dialog box.
E.g. paste in:
AWS_DYNAMO_ENDPOINT=http://localhost:4569;AWS_REGION=us-east-1;sample_var=sample
and get:
I'm an IntelliJ user since years and I work on a Mac.
For a long I was able to execute like an automata the following procedure:
select a portion of a text in a file using the mouse
pressing a combination of keys
seeing the selected text in the find & replace bar of the IDE.
Now, I can't remember how to do it.
I have search through the docs of the search & replace in a file, but I cannot see that option.
Just to avoid confusion, the toolbar I'm talking about is the following
I am using IntelliJ on linux (Keymap : Default for xwin) and to select text I use Ctrl+W or Mouse double click. Then ctrl+R will put this text in replace text box
Probably it's a kind of bug. It should work by selecting the text and pressing cmd+r.
Cases when it works:
I select a piece of text in a line and I press cmd+R.
I select the whole line (including white spaces/tabs at the beginning)
Case when does not work:
I select a line from the first character to the last.
More context. I use IntelliJ 2017.2.5 on Mac Os Sierra.
This question already has answers here:
How To Get Control Property by "String Name"?
(6 answers)
Closed 9 years ago.
Is there some way in Visual Basic/Studio to find an object using a string?
I want to use it so that i can find objects by concatenating a variable with it.
Something along the lines of:
[Variable & "Main"].Visible = true
Just to elaborate, I don't want to use a table that iterates through all the objects in the form.
This is in VB.net. Any help?
Yes there is a way
Me.Controls(Variable & "Main").Visible = true
See Control.Controls property on MSDN
I don't have any official posting from a Microsoft website, but in my experience this is not possible. I would equate it to trying to use a string as a table name in SQL Server. One option is that you could iterate through the controls on the page (I'm guessing by the .Visible = true that you are dealing with controls) and look for a matching control ID. If found you will then have access to the properties for that control. Let me know if you would like to see an example. I'm not at a pc with Visual Studio so it would not be until tomorrow.
Is there any way (Plugin, Script) to add quotation marks (or square brackets or parentheses) at the beginning and the end of selected text via a keyboard shortcut in the Kate editor?
I think of something like selecting a word and then pressing Ctrl-U (this would upcase the selected word). Is there something similar for quotation marks?
The "Configure Shortcuts" menu does not provide this option.
This should be possible to do by using Kate's Javascript plugin system: http://docs.kde.org/stable/en/kde-baseapps/kate/advanced-editing-tools-scripting.html.
By finding the word at the current cursor position and inserting text before and after, you could create a “surround with quotation marks” function.
For an example of a Kate script, see here: http://kucrut.org/move-cursor-to-next-prev-paragraph-in-kate/.
One solution would be the following:
Go to Settings > Configure Kate > Editing
Activate the Auto brackets option
Now you are able to wrap the selected text with brackets.
Though there is one drawback. The Auto brackets option is "always on", meaning that once you type "(" the corresponding ")" also comes up.