help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlighting current window


From: Michael Heerdegen
Subject: Re: Highlighting current window
Date: Sun, 01 Jul 2012 03:56:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

> There is also crosshairs.el, which extends hl-line+ by adding a
> vertical line through point.  So it is easy to see where the cursor is
> (e.g. when you move your attention to another window).  Typically you
> use the crosshairs display temporarily.
>
> http://www.emacswiki.org/emacs/CrosshairHighlighting

This indeed works very well for this purpose.  You see which window is
selected, as well as the position of point in that window at the same
time.

I use a setup like the following (just as an example):


--8<---------------cut here---------------start------------->8---
(add-hook   ;flash selected window when changing window config
 'window-size-change-functions
 #'(lambda (_)
     (when
         (memq last-command
               '(split-window-vertically
                 split-window-horizontally
                 delete-window icicle-delete-window
                 delete-other-windows))
        (crosshairs-flash))))

(global-set-key [S-next]
                (lambda () (interactive)
                  (other-window  1) (crosshairs-flash)))
(global-set-key [S-prior]
                (lambda () (interactive)
--8<---------------cut here---------------end--------------->8---


Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]