sponsor Vim development Vim logo Vim Book Ad

vim-lastplace : Intelligently reopen files where you left off.

 script karma  Rating 86/28, Downloaded by 4142  Comments, bugs, improvements  Vim wiki

created by
Greg Dietsche
 
script type
utility
 
description
Intelligently reopen files where you left off.

By default git, svn, and mercurial commit messages are ignored because you probably want to type a new message and not re-edit the previous one.

Advantages over the snippets that can be found around the net include:
* Maximize Context
    - Center the cursor vertically after restoring last edit position.
    - Keep as much of the file on screen as possible when last edit position is at the end of the file.
* Commit messages automatically start beginning of the file. This is important because many version control systems re-use the same file for commit message editing.
* Opens folds if the last edit position is inside a fold.

This plugin is maintained on GitHub: https://github.com/farmergreg/vim-lastplace
 
install details
vim 8 and newer:
----------------------
mkdir -p ~/.vim/pack/plugins/start
rm -rf ~/.vim/pack/plugins/start/vim-lastplace
git clone --depth=1 https://github.com/farmergreg/vim-lastplace.git ~/.vim/pack/plugins/start/vim-lastplace


neovim:
----------
mkdir -p ~/.local/share/nvim/site/pack/plugins/start
rm -rf ~/.local/share/nvim/site/pack/plugins/start/vim-lastplace
git clone --depth=1 https://github.com/farmergreg/vim-lastplace.git ~/.local/share/nvim/site/pack/plugins/start/vim-lastplace
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-lastplace-4.5.0.tar.gz 4.5.0 2024-04-23 7.0 Greg Dietsche Automatically jump to the location of your most recent edit when opening files.
New in this release: the xxd filetype is ignored.
vim-lastplace-4.5.0.zip 4.5.0 2024-04-23 7.0 Greg Dietsche Automatically jump to the location of your most recent edit when opening files.
New in this release: the xxd filetype is ignored.
vim-lastplace-4.0.0.zip 4.0.0 2023-08-25 7.0 Greg Dietsche bugfixes and improvements
vim-lastplace-4.0.0.tar.gz 4.0.0 2023-08-25 7.0 Greg Dietsche bug fixes and improvements
vim-lastplace-3.2.1.tar.gz 3.2.1 2020-01-21 7.0 Greg Dietsche Small enhancements and updated documentation
vim-lastplace-3.2.1.zip 3.2.1 2020-01-21 7.0 Greg Dietsche Small enhancements and updated documentation
vim-lastplace-3.1.1.tar.gz 3.1.1 2017-06-19 7.0 Greg Dietsche Bug Fix Release
vim-lastplace-3.1.1.zip 3.1.1 2017-06-19 7.0 Greg Dietsche Bug Fix Release
vim-lastplace-3.1.0.tar.gz 3.1.0 2017-02-21 7.0 Greg Dietsche You can now configure buffer types to ignore by setting
g:lastplace_ignore_buftype in your vimrc. This is a comma separated list.

By default it is set to:
let g:lastplace_ignore_buftype = "quickfix"
vim-lastplace-3.1.0.zip 3.1.0 2017-02-21 7.0 Greg Dietsche You can now configure buffer types to ignore by setting
g:lastplace_ignore_buftype in your vimrc. This is a comma separated list.

By default it is set to:
let g:lastplace_ignore_buftype = "quickfix"
vim-lastplace-3.0.4.tar.gz 3.0.4 2016-09-07 7.0 Greg Dietsche Added a setting g:lastplace_open_folds to control behavior when the last edit position is inside a fold.
vim-lastplace-3.0.4.zip 3.0.4 2016-09-07 7.0 Greg Dietsche Added a setting g:lastplace_open_folds to control behavior when the last edit position is inside a fold.
vim-lastplace-3.0.3.tar.gz 3.0.3 2016-08-12 7.0 Greg Dietsche Changes to support Debian packaging effort.
vim-lastplace-3.0.3.zip 3.0.3 2016-08-12 7.0 Greg Dietsche Changes to support Debian packaging effort.
vim-lastplace-3.0.2.tar.gz 3.0.2 2016-05-12 7.0 Greg Dietsche Fix problem with files shorter than the window height.
vim-lastplace-3.0.2.zip 3.0.2 2016-05-12 7.0 Greg Dietsche Fix problem with files shorter than the window height.
vim-lastplace-3.0.1.tar.gz 3.0.1 2016-01-17 7.0 Greg Dietsche Fix problems with modelines.
vim-lastplace.zip 3.0.1 2016-01-17 7.0 Greg Dietsche A fix for files with modelines.
vim-lastplace-3.0.0.tar.gz 3.0.0 2015-07-23 7.0 Greg Dietsche Expands folds if the last edit was made inside an area that is hidden inside a fold.
vim-lastplace-2.0.1.tar.gz 2.0.1 2015-01-26 7.0 Greg Dietsche Add gitrebase filetype to the ignore list.
vim-lastplace.tgz 2.0.0 2015-01-22 7.0 Greg Dietsche New features:
1) Center the screen when restoring the cursor position.
2) When at the end of a file, keep as much of it on screen as possible.
vim-lastplace.tar.gz 1.0.0 2015-01-15 7.0 Greg Dietsche Initial upload
ip used for rating: 3.17.79.60

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github