When I use 'highlight-regexp', highlighting is only applied to current text. So, the newly added text isn't highlighted at all, though it contains the same regular expression. How can the newly added text be highlighted automatically by 'highlight-regexp'?
Related
When copying and pasting using the Context menu (on a Macbook Pro), the paste doesn't work as expected when pasting to a new line. The text is inserted at the end of the previous line. Has anyone observed this behavior and, if so, have you found a fix?
Here's what I'm seeing:
Go to the latest "demo" TinyMce page (https://www.tiny.cloud/docs/tinymce/6/)
Add at least two lines of text but leave one or more blank lines between the two lines of text.
Copy (using the context menu) some text from the line following the blank line.
Click on the blank line.
Paste the text using the context menu.
I would expect the text to be inserted after the linefeed.
Instead, it appears that the linefeed is overwritten by the text in the paste buffer because the blank line is deleted and the pasted text appears at the end of the previous line.
The cmd-V shortcut doesn't exhibit this behavior
I have the following requirement (sorry, but I'm quite new to JavaFX).
I need to have a custom TextArea that supports not only entering text but also entering a kind of macro.
This Macro has a unique ID and an associated text. The text should be displayed in the TextArea but with an e.g. light grey background. This is because it should behave as a unit.
You should not be able to click inside the macro and add a char there. The cursor should be placed behind the macro. And is you press just backspace the complete macro should be deleted.
If you call something like getRawContent() of the custom TextArea you should get a placeholder for the macro and not the associated text like:
getRawContent()
==> "This is text part one MACRO:132 This is text part two"
If the macro 132 has the following text associated "XXX123XXX", you will see inside the custom TextArea:
This is text part oneXXX123XXXThis is text part two"
But the text XXX123XXX has a light grey background to show that this text is associated with a macro and could be deleted, copied, and so on as a whole unit. Could be italic as well as in the above line. Should be only a bit different to the generic text.
Could someone assist me?
My Custom Control works now. I used an Eventfilter to prevent the internal Eventhandler to process the keypressed events in order to set the caret position behind a macro or delete the complete macro when DEL or BACKSPACE is pressed, this works.
And I use a Mouselistener to prevent that someone clicks and set caret position inside a macro.
So now I have only the problem left to mark the text somehow that the user can see what is normal text and what macro content.
Maybe I close here and open a new question.
I'm on OSX and running Version 1.42.0 of Visual Studio Code. I have noticed that when I single click a word it will highlight. But if I copy CMD + c and then paste CMD+v, the full line will be in the clipboard. This causes problems from time to time, when the screen has given me every indication that I have only selected a single word. Is there some setting that I can set that will make the default behavior to select a word on a single quote and never ghost select a full line?
What it looks like when I single click a word:
And what it looks like after I've copied and pasted:
After filing an issue, it turns out that this behavior is by design.
The word the cursor is on (from a single click) is highlighted along with every occurrence of that word. The word is not selected (that would be a deeper blue).
By default copying without a selection copies the current line.
This in my opinion is an Accessibility issue, as there are strong visual clues that a word is selected. I have found that the behavior can be made more intuitive if you set these to settings.
// Controls whether copying without a selection copies the current line.
"editor.emptySelectionClipboard": false,
// Controls whether the editor should highlight semantic symbol occurrences.
"editor.occurrencesHighlight": false
With these two settings the word the cursor is on will not be highlighted (nor any other occurrences of that word). And if you do happen to copy, with an empty selection, the editor will behave similar to how other applications behave and not copy the current line.
Is there any to revert/disable the newest change for the untitled tab name (https://code.visualstudio.com/updates/v1_42#_untitled-editor-improvements)
I would prefer to the untitled-1 than the first sentence line.
As your link says:
Note: If the first line is empty or does not contain any words, the
title will fall back to Untitled-* as before.
I don't think there is a way to disable it other than to have that first line blank until you do give it a name.
The request for a setting to disable the current functionality is tracked here: https://github.com/microsoft/vscode/issues/90378 (Config to limit/disable the new Untitled tab auto-naming) or https://github.com/microsoft/vscode/issues/90495
you could upvote that issue.
---------- update, coming in v1.43:
A new setting workbench.editor.untitled.labelFormat lets you control
whether untitled editors should use the file contents as the title or
not. Possible values are content or name. Configure
'workbench.editor.untitled.labelFormat': 'name' for the previous
behavior, where untitled editors would have a short title, such as
Untitled-1.
When pasting text into an untitled editor, VS Code now automatically
tries to detect the language mode from the first line of text. For
example, pasting XML will set the XML mode automatically upon paste if
the first line contains the typical XML header .
Most of the time after typing "new" I press Ctrl-space to quickly choose the necessary class. I want Eclipse to show the tooltip automatically, like VS+Resharper does.
If you do not have any hesitation in typing a single whitespace, you can add the whitespace character to the list of characters that will trigger the content assist dialog. The default character is the dot (.) character, to which you can add other characters.
I haven't found a way to avoid specifying any trigger character, and still get the content assist dialog. So, with the whitespace character in the list, you have to type in new instead of just new, and you can get what you desire (or more than what you need, as the dialog pops up on every space entered).