|
From: | Andreas Röhler |
Subject: | Re: What's the hook that's about cursor movement? |
Date: | Fri, 29 Apr 2016 14:26:28 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0 |
On 29.04.2016 13:16, Phillip Lord wrote:
Shiyao Ma <i@introo.me> writes:Hi, I want to add a function to a hook to achieve effect that, whenever the cursors moves by K lines, or goes to another buffer, then center the cursor on the screen. So, what's the related hook?I'm not sure that there is one directly -- post-command-hook is called after any command, though which covers all of the things that you have mentioned (but also others). Phil
Just to add: as beacon-mode deals with similar issues, the stuff at the end of beacon.el should provide some hints:
https://github.com/Malabarba/beacon/blob/master/beacon.el
[Prev in Thread] | Current Thread | [Next in Thread] |