I am using regex101.com to learn regex.
There will be cases where I want to insert a Tab character within the TEST STRING field of regex101.com.
However, when I have the TEST STRING field selected and press the tab key on my keyboard, it doesn't enter the tab character within the TEST STRING field, but rather it just moves me on to the next selectable feature within the browser page.
I note I have done a bit of googling but so far haven't been able to find the answer to how to add a tab character within the TEST STRING field. Although I know for sure it is possible to do this given that I have seen a few videos where the presenter successfully adds a tab character into the field.
I note that I am using Windows 10 and my browser is Google Chrome.
Would greatly appreciate if anyone could provide an answer to this.
Appears regex101 can enable the tab key to be translated by the editors
instead of being pass-through to the system where it changes focus to the
next control in the tab order.
Just uncheck the box in Settings .
Apparently preference gets saved in your browser session cookies.
Typing a Tab into a text editor and copy-pasting (Ctrl + c / Ctrl + v) it into the browser form is an easy solution. Just make sure your editor is not configured to auto-replace tabs with spaces.
Another way would be using a keyboard combination to enter the ASCII or Unicode character code (see this superuser post). For Windows, that should be Alt+ 0 + 9 (Note: apparently the numbers need to be entered on the numpad).
Finally, depending on the browser you use, there might be browser extensions that facilitate what you want. There used to be one called Tabinta for Firefox and one for Chrome called chrome-textarea-formatter, but I believe neither of them is still maintained.
Related
After doing a little research, I found out that eclipse hides its settings in multiple levels. So, I think, I got all the levels covered here.
Here I have set eclipse to insert spaces instead of tabs. And eclipse even acknowledges there that I have indeed set it up to insert 4 spaces instead of a tab (See the text under Tabulators: it says, "The current indentation size is 4, using spaces").
Then for the general text editor, I have also set it up to insert spaces instead of the tabs.
And eclipse couldn't have gotten things more wrong even if it had tried!
Unfortunately, despite all those settings, when I press tab, eclipse inserts 2 spaces. Then, I press tab again, and it inserts 2 spaces. Why 2 spaces? Are there still more hidden settings somewhere?
Anyways, this broken system works a bit, until I have one level more of indentation, for example, for a for-loop or an if-block. If I press, tab again, instead of adding 2 more spaces, it converts the 6 spaces into a tab.
And a tab which is not even 4 spaces wide, but instead a tab which looks like a 6- or 8-spaces wide tab.
Ctrl + I also adds tabs, not spaces.
The formatter is also setup as #Neuron suggested in his answer.
So, where else is eclipse hiding more settings?
I fixed it by going to..
Window ⟶ Preferences ⟶ C/C++ ⟶ Code Style ⟶ Formatter
There you need to edit the currently set profile. Click "Edit..." (top right-ish). Now go to Indentation (already open) ⟶ General Settings ⟶ Tab Policy and change this from "Tabs only" to "Spaces only".
If you still have the default profile, give your profile a new name.
Why is this so weird and convoluted? I don't know.
In Sublime Text there's a way to highlight all similar strings by setting a cursor to every one of them, and then you can just type something, and this text will be printed in every highlight area. In rus version it's called "multicursor".
Is there something like that in CodeRush?
I know about "Replace all" function in Visual Studio. But this approach is not as convenient as the approach described earlier.
Something like that you can see in Rename feature of CodeRush.
Documentation:
When the Rename is activated, it turns all references to the selected
variable into the linked identifiers.
Linked identifiers are related sections that are kept synchronized. If
you change the text within one of them, all others get updated
accordingly.
There are also the Multi-Select feature which allows you to select separate text blocks by pressing CTRL + ALT + ENTER, but this feature does not allows you to edit every highlight area:
in django textarea, it need four spaces to highlight.
i want to use a tab to replace it .
but it jumps to another tags,
I wonder if there is any solution to it.
That would require a JavaScript widget that captures the input event. What happens when a key is pressed is up to the browser (that is, totally out of your control), so without writing a key capturing widget of your own the default behavior (that is, "move to next control") is what will happen.
It is useful to keep in mind that the web is not actually an application platform (its a document publication platform) and browsers are not actually window managers (they are document viewers).
I'm building a VCL c++ builder application. I would like to see if anyone knows of a component that can load data in the lookup upon drop down only after a user has typed a few letters to limit the rows queried? Preferably after pressing Tab, or Enter.
What I would like best is to get a behaviour similar to what Linux command line has, but that might be wishful thinking. The way it would work is to drop down the combo list after user presses tab only if there is multiple options available, and to fill in additional text till the point where characters are not the same anymore, then if user presses tab again, drop down list.
The next best would be if the drop down would only allow drop down if user has typed a few letters, then pressing a specific button opens the dataset with the parameter of the typed text so far, then drops down the combo.
Does a component like this exist?
You can check out TMS Software. I'm not sure if it has something exactly for you, but their components are quite flexible. And you can send a feature request to them - to consider for next update. If you are lucky they might add it to next release.
My app uses standard single-line Edit Box controls. Is there any way to accept a multi-line "paste", discarding carriage return / linefeeds?
Notes
I don't want to use multi-line controls
My app is VS2010 C++ with WTL (not MFC or ATL)
The reason I want this is because actual input is normally quite short, but could in rare circumstances be hundreds or even thousands of characters. In which case users might well want to build the string using NotePad or whatever, then just cut & paste it in.
This is not possible as the user is pasting himself/herself. An alternative is to use a multi-line Edit Box and displaying all the data into one line by managing the pasted data into OnChange function for your control (basically disregading new lines).