Git Product home page Git Product logo

pdf-continuous-scroll-mode.el's Introduction

A minor mode for Emacs that implements a two-buffer hack to provide continuous scrolling in pdf-tools

This mode works only from Emacs 27 (see here). It includes keybindings to just work also on Spacemacs.

Probably this minor-mode will get updated a few times over the next days so keep your eyes on it, or install it using a Quelpa recipe. Spacemacs users can install the package (using Quelpa) by adding the following lines to the list of additional packages in their .spacemacs file:

(pdf-continuous-scroll-mode :location (recipe
                                       :fetcher github
                                       :repo "dalanicolai/pdf-continuous-scroll-mode.el"))

Then when you open a file in pdf-tools you can just toggle the mode on and of using M-x pdf-continuous-scroll-mode. If you like to to start pdf-tools with the minor mode activated then add a hook by placing the following lines in your dotfile:

(add-hook 'pdf-view-mode-hook 'pdf-continuous-scroll-mode)

Of course any feedback is welcome (possibly by opening an issue in the repo). pdf-continuous-scroll-demo.gif

Keybindings

EmacsSpacemacsFunction
C-njpdf-continuous-scroll-forward
C-pkpdf-continuous-scroll-backward
nJpdf-continuous-next-page
pKpdf-continuous-previous-page
C-dC-jpdf-view-scroll-up-or-next-page
(works on single buffer, but handy for skimming)
C-uC-kpdf-view-scroll-down-or-previous-page
(idem as previous)
M-g g/M-g M-gg tpdf-cscroll-view-goto-page
M-<g gpdf-cscroll-first-page
M->Gpdf-cscroll-last-page
QQpdf-cscroll-kill-buffer-and-windows
C-flpdf-cscroll-image-forward-hscroll
C-bhpdf-cscroll-image-backward-hscroll
TMpdf-cscroll-toggle-mode-line
Mpdf-cscroll-toggle-narrow-mode-line
C-c C-a lSPC m a l (, a l)pdf-cscroll-annot-list-annotations

Comments

If you like to scroll using the mouse-wheel then you might want to get rid of the mode-line using pdf-cscroll-toggle-mode-line, or in vanilla Emacs you might prefer to just narrow down the mode-line using pdf-cscroll-toggle-narrow-mode-line.

Related: double page layout

In this comment the user apnewberry posted code to realize a double page layout (and apparently he suggested this pdf-continuous-scroll-hack before)

Related projects

Show djvu annotations within Emacs (extending djvu.el). There is also a Spacemacs djvu layer which additionally implements smooth scrolling in djvu.

A package to create and attach Table of contents to pdf and djvu documents. There is also a toc-layer for Spacemacs

A super nice calibre frontend within Emacs

pdf-continuous-scroll-mode.el's People

Contributors

dalanicolai avatar yangsheng6810 avatar

Watchers

James Cloos avatar

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.