Scroll by paragraphs in EWW
I often highlight the paragraph I'm reading in Firefox, but this is even better.
This commit is contained in:
parent
7a8b510b34
commit
d64f8d37cc
1 changed files with 9 additions and 1 deletions
|
@ -408,6 +408,13 @@ Web pages look pretty good with EWW, but I'm having difficulty getting it to ren
|
|||
(interactive (list (read-string "Name: " (plist-get eww-data :title))))
|
||||
(rename-buffer (format "*eww: %s*" name) t))
|
||||
|
||||
(defun ha-eww-better-scroll (prefix)
|
||||
(interactive "^p")
|
||||
(forward-paragraph prefix)
|
||||
;; (recenter) ... if you want the cursor in the center,
|
||||
;; otherwise, this puts the paragraph at the top of window:
|
||||
(recenter-top-bottom 0))
|
||||
|
||||
(major-mode-hydra-define eww-mode nil
|
||||
("Browser"
|
||||
(("G" eww-browse "Browse")
|
||||
|
@ -441,7 +448,8 @@ Web pages look pretty good with EWW, but I'm having difficulty getting it to ren
|
|||
|
||||
:general
|
||||
(:states 'normal :keymaps 'eww-mode-map
|
||||
"q" 'bury-buffer)
|
||||
"q" 'bury-buffer
|
||||
"J" 'ha-eww-better-scroll)
|
||||
(:states 'normal :keymaps 'eww-buffers-mode-map
|
||||
"q" 'bury-buffer))
|
||||
#+end_src
|
||||
|
|
Loading…
Reference in a new issue