Giter VIP home page Giter VIP logo

centered-cursor-mode.el's Introduction

centered-cursor-mode.el

Makes the cursor stay vertically in a defined position (usually centered) while scrolling. So instead of moving the cursor up and down it moves the page like a pager.

The vertical position can be customized.

The code is still in development (see todo list).

Also see the development branch https://github.com/andre-r/centered-cursor-mode.el/tree/dev which contains several changes. It is faster and has better customization. But it lacks one feature for now: because of performance issues, at the end of the buffer the cursor it is still recentered, so that the text does not align with the end of the window.

Usage

To install using use-package:

(use-package centered-cursor-mode
  :demand
  :config
  ;; Optional, enables centered-cursor-mode in all buffers.
  (global-centered-cursor-mode))

You can activate in a single buffer:

M-x centered-cursor-mode

or enable globally:

M-x global-centered-cursor-mode

Customizable variables begin with ccm-.

Technical

If recentering is triggered after some sort of mouse interaction and you don’t expect it to, this might indicate an incompatibility with some other mode you are using. A quick way to figure out what commands are actually triggered when you interact with the mouse is to use command-log-mode which will show you a stream of the command history as the commands are being evaluated.

If any of the commands triggered on mouse interaction is not included in ccm-ignored-commands, you have found the cause.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.