On Mon, Aug 04 2025, Sacha Chua <[email protected]> wrote:

>   - Emacs configuration:
>     - [James Dyer: View-Mode - Emacs's Hidden Modal Editing Gem?]
> (<https://emacs.dyerdwelling.family/emacs/20250731123820-emacs--discovering-view-mode-emacss-hidden-modal-editing-gem/>)

After trying a few different external Emacs package to have a *reading*
mode which I could use for read-only buffers, I /also/ settled down on
‘view-mode’, with a few modifications to keybindings.  Here are a few
notes:

* One may prefer a ‘GNU Less’ like keybinding; it is, of course,
  a combination of Vi and Emacs keybindings.  As with Less pager, there
  may not be much reason to bind any key for character or word movement;
  one just want to /read/ in View mode, after all; not caring about the
  exact position of the cursor.

* Binding ‘d’ and ‘u’ to ‘View-scroll-half-page-forward’ and
  ‘View-scroll-half-page-backward’ follows the default behaviour of
  ‘Less’.  Also, using other ‘View-*’ specific commands for scrolling
  (like ‘View-scroll-page-forward’, ‘View-scroll-page-backward’) has the
  advantage of being able to set (with ‘z’ or ‘Z’) a fixed number of
  lines as the page size to scroll and using that afterwards.  (Oh you
  talked about it later on your post.  Very well then.)

* I have ‘(setq view-read-only t)’ for a long time, it doesn’t hurt.

* ‘<space>’ and ‘S-<space>’ is used for scrolling pages forward and
  backward in web browsers, terminal pagers, and frequently by
  other programs.

* This having ‘read-only’ and ‘view-mode’ turned on, on file-visiting
  buffers, works very good with ‘cursor-undo’ mode (from ‘cursor-undo’
  package).

-- 
English is not my native/mother language.  I can read and understand
English well, but I have problems expressing my thoughts in it.
Please, bear with me.  Sincerely, Pyromania.

PGP fingerprint = 2B24 291E 0637 4D2E 0D14  9EFC D7B3 10D4 5C9D 5892

()  ASCII ribbon campaign - against HTML e-mail
/\  www.asciiribbon.org   - against proprietary attachments

---
via emacs-tangents mailing list 
(https://lists.gnu.org/mailman/listinfo/emacs-tangents)

Reply via email to