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
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.
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.
Given the following two examples:
<div>First Name</div>
<p>Long string of text that might even bleed off the edge of my IDE window so that I can't see it</p>
Is there any shortcut, modifier key, etc which I can use to select all the text within the element?
At some point I think I remember some option where if you hold CTRL and hover it will highlight entire strings? This might help but I cannot find it.
I found that "Extend Selection" (CTRL+W) can be used, but it is not exactly what I had in mind. Depending on what is selected already, this may take 2 or 3 presses to select the desired text.
I want to make bold just the "name" in the string, how to do it?
Dim name As String = Environment.UserName
LabelWelcome.Text = "Welcome " + name + ", ...!"
I don't believe this is do-able on default labels since there is no style formatting.
I suggest to use 2 labels or a rich text box control.
You can use two labels and put them side by side. One having the bold part and other having the simple text.
You can use the OnPaint() method for custom drawing also
I found this : http://pastebin.com/L4xScMjZ [Not made by me]
It's a class that highlights part of a label for you. It doesn't bold it, but you can highlight the important part in red or any color you want.
I'm sure you could turn this to make the highlighted part bold as well.
To use it, you create a new class and put that code in.
Build your project and there should be a new control called "Scrolling Label"
You can add that control to your project and edit the properties :
Highlight : # --> how many characters you want it to highlight from left to right
HighLightText --> The color of the highlighted text
This is a bit buggy so you might want to add "DoubleBuffer = True" in your form Load
For those who still Google this: You can make a function which replaces your characters with some unicodes. You can use most of WorksheetFunction.Unichar(119808) to WorksheetFunction.Unichar(120831)