I've started splitting my emacs frame into two side-by-side windows, but often I'm unable to tell at a glance which window the cursor is currently in. I've bound the other-window command to a special key, so it's easy to hit that -- would there be a way to flash the cursor maybe three times right after switching to the other window? Or maybe there are better solutions people have thought of?
I find it helps to have emacs highlight the current line.
The minor mode hl-line-mode does that. You can enable it in your current buffer with M-x
Take a look at the Emacswiki: HighlightCurrentLine. It also mentions other minor-modes that might be more in your interest. Edit: While looking through the wiki myself I found the crosshairs-mode. I think I'll try it out myself:
Edit2: I like the horizontal line, but I find the constant vertical line distracting. Luckily To display the crosshair on idle I have this in my config:
But this won't flash on buffer/window switches, unfortunately there are no hooks for that. But at least emacs lisp gives us advising functions, which allow us to extend existing functions. Though that can be quite tricky. This will flash the crosshair after buffer switches:
This should work in most cases (when the switch is done without The window switch is more difficult, since minibuffers (open file etc.) cause some issues. So only flash when we switch to another buffer:
To deactivate the advices use:
I think that covers most cases, though like I said advising is tricky ... | ||||
|