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?

asked Jun 23, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

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

answered Jun 26, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...