emacs .emacs
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.
如何使emacs记住文件中的最后编辑位置。 下次我打开同一文件时,光标会自动移动到我上次编辑同一文件的位置,这将很方便。
The behavior seems enabled by default in Vim. How to make Emacs do this?
该行为似乎在Vim中默认为启用。 如何使Emacs做到这一点?
I use the saveplace mode.
我使用保存模式。
Add these lines to your ~/.emacs:
将这些行添加到〜/ .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.
save-place-file
变量标识存储光标位置信息的文件位置。
My full emacs-config is here: https://github.com/zma/emacs-config
我的完整emacs-config在这里: https : //github.com/zma/emacs-config
翻译自: https://www.systutorials.com/emacs-remembering-last-editing-positions/
emacs .emacs