Hacker News new | ask | show | jobs
by auslegung 1593 days ago
This looks great, nicely done! I didn’t know I needed this :)

Does anyone know if this exists for Emacs? I use both nvim and Emacs but primarily Emacs and would love to have this on both.

1 comments

Well you can hide the rest of the buffer and focus on a specific part of a file with the narrow-to-* functions (defun, region, or page).

However, this plugin seems to be a little fancier and instead creates different buffers for each selection. The analogous feature set in Emacs are indirect buffers. Try binding a key to run the clone-indirect-buffer and narrow-to-region commands in sequence.

This library might help too: https://www.emacswiki.org/emacs/NarrowIndirect