Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/misohena/phscroll
Enable partial horizontal scroll in Emacs
https://github.com/misohena/phscroll
emacs emacs-lisp org-mode
Last synced: about 2 months ago
JSON representation
Enable partial horizontal scroll in Emacs
- Host: GitHub
- URL: https://github.com/misohena/phscroll
- Owner: misohena
- Created: 2020-06-02T13:11:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T05:05:45.000Z (over 1 year ago)
- Last Synced: 2023-10-12T21:06:43.243Z (over 1 year ago)
- Topics: emacs, emacs-lisp, org-mode
- Language: Emacs Lisp
- Homepage: https://misohena.jp/blog/2020-06-02-partial-horizontal-scroll-in-emacs.html
- Size: 242 KB
- Stars: 81
- Watchers: 9
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+TITLE: Partial Horizontal Scroll in Emacs
* About
This elisp enables horizontal scrolling in specified parts of buffer even in line-wrapping mode (truncate-lines is nil).
[[file:./phscroll-screenshot.gif]]
* Usage
1. Load phscroll.el (require 'phscroll)
2. Select a region you want to horizontal scroll
3. M-x phscroll-regionOther commands:
- M-x phscroll-delete-all : Delete all scrolling area in the current buffer
- M-x phscroll-delete-at : Delete a scrolling area at point
- M-x phscroll-update-at : Update (redraw) a scrolling area at pointThe following keys are available in scrolling area:
- C-x < (M-x phscroll-scroll-left)
- C-x > (M-x phscroll-scroll-right)
- C-l (M-x phscroll-recenter-top-bottom)
- C-S-l (M-x phscroll-recenter-left-right)* In org-mode
The following elisp enables horizontal scrolling in table parts of org-mode documents. By setting org-startup-truncated to nil, other parts will be displayed in wrapping.
#+begin_src emacs-lisp
(setq org-startup-truncated nil)
(with-eval-after-load "org"
(require 'org-phscroll))
#+end_srcTips:
- To turn off the effect of phscroll, use M-x org-phscroll-mode.
- To scroll the current position of the screen to the left edge, press C-S-l twice.* Known Issues
- Incorrect display when viewing the same area from multiple windows with different widths
- Incorrect display when used with various text properties and overlays.
- Performance degradationphscroll forcibly realizes partial horizontal scrolling, which is not possible originally. It's interesting that it's still somewhat usable, but ideally Emacs should have a text property that controls line wrapping.