remembering your position in a file


A little useful trick I recently discovered is SavePlace. Adding

(setq save-place-file "~/.emacs.d/saveplace") ;; keep my ~/ clean
(setq-default save-place t) ;; activate it for all buffers
(require 'saveplace) ;; get the package

to your .emacs will make emacs remember where you were in a file, the last time you opened ('visited') it; when you re-open it, it jumps right back to where you
were. The set-default enables saveplace (which is buffer-local) for all
buffers.



There are some more customizations possible, but they seem less useful to me.



SavePlace is the kind of nice convenience that make emacs so nice… at the
same time, it shows that so many of these small conveniences can go unnoticed
for years (saveplace has been part of Emacs since version 19.19 of 1993!).

No comments:

Post a Comment

Followers

Popular Posts