Is there a way to disable mouse action on codemirror? - codemirror

How can I disable mouse usage in codemirror.
I want it to behave like vim editor where the user cannot move anywhere using the mouse.
Thanks in advance.

How about using pointer-events: none; on the editor container?
.CodeMirror {
pointer-events: none;
}
Demo!
See also
pointer-events reference on MDN
The feature's compatibility matrix on caniuse.com

You can register handlers for the mouse events (mostly mousedown), and simply .preventDefault() them to prevent CodeMirror from handling them further.

Related

How to cancel focus() of Grav build-in CodeMirror editor

I would like to add my custom WYSIWYG-editor with my plugin over Grav build-in editor without removing the last.
I append my editor as a divider with contenteditable="true" to .CodeMirror-lines > div as the container where is also build-in .CodeMirror-code editor divider. And my editor is above as layer (z-index is higher).
But when I click the area, the build-in editor is focused and not mine.
I've viewed the codes of both user/plugins/admin/themes/grav/js/admin.min.js and user/plugins/admin/themes/grav/js/vendor.min.js to find the row(s) which is(are) responsible for such focusing, but I can't.
Could someone help to cancel this focusing?
Ok, to resolve the problem it's enough to append my editor not to .CodeMirror-lines > div, but to .grav-editor-content divider

Can the focused part of Visual Studio Code be outlined?

I avoid using the mouse for navigation as much as possible. Sometimes when I go back into VSCode via spotlight/raycast the focus will be on some element in the sidebar, or the terminal, or the vim cursor is just immediately obvious. Is there a way to enable some sort of obvious outline on the part of the UI that currently has focus so further navigation can be easier? I perused the settings but didn't see one that immediately stood out.
You can change the usual blue focus border (like you get with tabbing around the window elements) to another color, like red, with this setting in your settings.json:
"workbench.colorCustomizations": {
"focusBorder": "#ff0000"
}
For some elements like those that border on the window edge it doesn't help much. For others it helps.

How do I turn off notifications globally in visual studio code

How do I turn off notifications globally in visual studio code. Not individual notifications from plugins, but every notification.
These are the popups that slide in from the top, displaying Error/Info/Upgrade/Activity messages.
It would be nice if this is system wide setting.
Couldn't find a simple way to do this through VSCode's configuration. One way to hack this temporarily that seems to work though is cmd-p, enter > developer choose options with toggle developer tools. Chrome inspector opens. To disable all toasts set the style .notifications-toasts to display: none.
You can also try:
/* append this to Microsoft VS Code/_/resources/app/out/vs/workbench/workbench.desktop.main.css */
.monaco-workbench > .notifications-toasts.visible {
display: none;
}
.notifications-toasts {
display: none;
}
If you are referring to the "This extension has an update... etc" toasts that pop up from the blue status bar:
Right-click the bell icon and select 'Hide Notifications' from the menu.
It looks there will be a Do not Disturb mode in vscode v1.69 (it is in Insiders now). It turns off all the notification pop-ups (warnings, info, etc.) but not for errors.
command: Notifications: Toggle Do Not Disturb Mode (unbound by default)
or
click the bell icon in the lower right and click on the slashed-bell icon in the pop-up to enable Do Not Disturb mode. Same to disable the mode.
There is also a setting to determine how Zen Mode and this Do Not Disturb mode will interact, see the setting:
Zen Mode: Silent Notifications
Add this to settings.json:
"update.mode": "none",

Is it possible to turn off the pop-up window on mouse hover on a collapsed code block in PhpStorm?

(see screenshot as an example)
I've only found this in the original documentation:
When you hover your mouse pointer over the collapsed code fragment,
its preview is displayed in a pop-up window.
But nothing about disable it... Anyone knows if is it possible?
Thanks in advance.
Not possible, please vote for IDEA-126440

Flash Builder - Disable highlighting of all instances of a word in code editor?

In Flash Builder, for objects, properties, variables and such where your cursor is on it, the editor highlights all instances of that name in the code with a grey box. This can be very distracting and I was wondering if there was a way to turn it off or if there is a hot key to disable it.
Another things that is very distracting are the mouse hover popups, although apparently there's no way to disable those :
Flash Builder + Eclipse: disable mouse hover popup?
I have been annoyed by this as well, and finally found something that helps. You need to turn off "Mark Occurrences" by clicking the button in the IDE that looks like a highlighter.
Here is a link to where I found that answer:
http://jwopitz.wordpress.com/2008/02/22/flex-builder-3-annoyance-code-highlighting-how-do-you-turn-this-thing-off/