Is there a way to highlight all instances of the variable under the cursor?

Many code editors (such as MATLAB’s) can highlight all occurrences of the variable which is under the cursor. Is this possible in Mathematica?

For example I create a variable, then I use it many times, and when I place the cursor in that variable, then every place where I use it, it highlights. So, you can see the variable where I use it in all code.

Techniques for cursor snap-to-vertex in WebGL or OpenGL?

What’s a technique for snapping the mouse pointer to vertices in WebGL or OpenGL? All I need is the vertex position, no other info.

Ideally, I’d like to do this without needing to keep positions and indices arrays in memory outside of the GPU. BTW, I have already a surface picking technique that uses GPU-resident geometry, which works by sampling the depth buffer at the mouse coordinates and combining that with the unprojected mouse coordinates.

One vague idea: use a vertex colors buffer, that fills triangles with fragments that somehow each encode the position of their nearest vertex position. The fragments could have the absolute position of their nearest vertex, or a vector with length, pointing towards their vertex position. Picking a color on the triangles would provide the nearast vertex position. Though I can’t imagine a way to set up that interpolation on WebGL or OpenGL ES.

Any tips appreciated!

Firefox 72 not displaying CSS Custom Cursor from SVG file

I’m currently experimenting with CSS custom cursors:

cursor: url(' [... URL HERE...'), auto; 

and I’m finding that Firefox 72 is not happy with either SVG cursors or GIF cursors (though it is entirely happy with PNG cursors).

According to: Can I Use CSS property: cursor: url() there shouldn’t be a problem.

But clearly there is.

Can anyone shed any light on what the issue is here, please?

Is it that:

  • Firefox does not support SVG cursors and caniuse.com is misinformed ?
  • Firefox does support SVG cursors and I am doing something else wrong?

Added:

Oh. That’s odd. Not working on Chrome 79 either. No idea what’s up then.

Should non editable text have the default cursor on hover?

I’m seeing more and more website adding a global CSS body {cursor: default} for the cursor to be default when hovering non editable text.

I’m guessing the goal is to make a difference between selectable and editable text (given the fact that all text should be selectable), even if field should already have visual affordance to mean editable.

But the idea of having the text cursor means editable text instead of selectable text actualy sounds like relevant to me.

In OSes for example, most of the time, text in interface is selectable (kinda), but the cursor does not change. And everywhere else (but on a website / in a browser), I don’t see a text cursor meaning selectable.

Pros and cons?

Black Screen with cursor blinking when started Ubuntu on VirtualBox

Ubuntu on my Virtual Machine was running fine when I restarted then suddenly it starts showing a black screen. I googled and tried multiple solutions like:

  1. by disabling the “Enable 3D acceleration” on virtualBox settings
  2. Enabling the “Intel Virtualization Technology” from BIOS

Please note, when I used backup Ubuntu, it works fine. My host system is Ubuntu 18.04.3 LTS. VirtualBox Version 6.0.12, Ubuntu guest OS in VirtualBox is 18.04.2.

I will appreciate if you can help to address the issue

Force specific cursor for an application

I’m currently using termite (a VTE based terminal emulator) on my desktop. Because of my monitor being rather large I switched to using a high visibility red cursor.

But as soon as I open up a terminal, the displayed cursor switches to a text selection cursor.

On the one hand, this totally makes sense, on the other hand, I never select text using the cursor, so the other cursor just makes it harder for me to read the text.

Reading through the emulators doc, there is no option to change the displayed cursor. Is there a xorg / gtk way (whichever is responsible for drawing the mouse cursor) for forcing a specific cursor for an application?

Or should I look into using a different emulator which has this option builtin?

Thanks for the help in advance.

Upgrade to Ubuntu 19.04 on HP Elitebook 840 G1 results in blinking cursor after bootloader

I used to dual boot Windows (on dev/sda1) and Ubuntu 18.04, on my HP Elitebook 840 G1 (SSD). I also have a third partition for most of my files (I believe on dev/sda2 named D:/).

I tried upgrading to 18.10, which worked, after which I wanted to upgrade to 19.04. GRUB still finds the boot options I want, but when I try to boot into Ubuntu, I get a blinking cursor (after the ubuntu logo). Also going into “advanced options” in GRUB and selection 4.15.0-55-generic gives me the blinking cursor (after the ubuntu logo).

I wanted to know if anyone had managed to solve this? I have tried:

  • booting from a stick with Ubuntu 19.04 (most of the times it doesn’t even boot into the stick, and when it does, I also get a flashing underscores)
  • boot into recovery mode and change the GPU settings as proposed by heynnema (gdm3 display manager hangs after booting with Ubuntu 18.10)

The fact that even booting from stick gives an error maybe indicates that it indeed is a graphic error?

How to navigate the terminal with the cursor keys

I’ve done an internet search for ubuntu terminal navigation keys but it didn’t return anything helpful to me. In Windows (command prompt or GUI), you can go to the next or previous word by pressing Ctrlright or Ctrlleft respectively, but these keys don’t work in the Ubuntu terminal.

The only navigation keys I know that work are Home and End. What are the navigation keys to quickly jump between words in Ubuntu’s terminal?