Emacs Remembering Last Editing Positions

How to make emacs remember last editing positions in files. It will be convenient next time I open the same file the cursor automatically moves to the position I was last time editing the same file.

The behavior seems enabled by default in Vim. How to make Emacs do this?

I use the saveplace mode.

Add these lines to your ~/.emacs:

(setq save-place-file "~/.emacs.d/saveplace")
(setq-default save-place t)
(require 'saveplace)

The save-place-file variable identifies the file location where the cursor position information is stored.

My full emacs-config is here: https://github.com/zma/emacs-config

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

One comment:

Leave a Reply

Your email address will not be published. Required fields are marked *