1
0
Fork 0
mirror of synced 2024-12-25 08:13:20 -05:00

Update vim-lastplace.

This commit is contained in:
Kurtis Moxley 2022-05-19 23:04:42 +08:00
parent 5608a81ee4
commit 0543fc4bab
4 changed files with 35 additions and 14 deletions

View file

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015 - 2017 Greg Dietsche Copyright (c) 2015 - 2020 Greg Dietsche
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -1,4 +1,4 @@
# vim-lastplace v3.1.1 # vim-lastplace v3.2.1
Intelligently reopen files at your last edit position. By default git, Intelligently reopen files at your last edit position. By default git,
svn, and mercurial commit messages are ignored because you svn, and mercurial commit messages are ignored because you
@ -15,11 +15,22 @@ Advantages over the snippets that can be found around the net include:
* Works properly with new file templates and scripts that jump to a specific line in them. * Works properly with new file templates and scripts that jump to a specific line in them.
## Installation ## Installation
You can use [pathogen.vim](https://github.com/tpope/vim-pathogen) or other plugin managers to install and use vim-lastplace. ### Vim 8 & Beyond:
You can install vim-lastplace as a vim plugin without any additional tools
cd ~/.vim/bundle ```bash
git clone git://github.com/farmergreg/vim-lastplace.git 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
```
### Pathogen:
You can also use [pathogen.vim](https://github.com/tpope/vim-pathogen) or other plugin managers to install and use vim-lastplace.
```bash
cd ~/.vim/bundle
git clone git://github.com/farmergreg/vim-lastplace.git
```
### Preventing Conflicts:
Depending on which Vim package you're using, Vim may be preconfigured with Depending on which Vim package you're using, Vim may be preconfigured with
last-edit-position logic that doesn't work quite as well as vim-lastplace. last-edit-position logic that doesn't work quite as well as vim-lastplace.
If so, you may want to disable that in favor of vim-lastplace. For example, If so, you may want to disable that in favor of vim-lastplace. For example,
@ -32,18 +43,24 @@ You can configure what file types to ignore by setting
g:lastplace_ignore in your vimrc. This is a comma separated list. g:lastplace_ignore in your vimrc. This is a comma separated list.
By default it is set to: By default it is set to:
```vim
let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit" let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit"
````
You can configure buffer types to ignore by setting You can configure buffer types to ignore by setting
g:lastplace_ignore_buftype in your vimrc. This is a comma separated list. g:lastplace_ignore_buftype in your vimrc. This is a comma separated list.
By default it is set to: By default it is set to:
```vim
let g:lastplace_ignore_buftype = "quickfix,nofile,help" let g:lastplace_ignore_buftype = "quickfix,nofile,help"
```
Folds are automatically opened when jumping to the last edit position. If you Closed folds are automatically opened when jumping to the last edit position. If you
do not like this behavior you can disable it by putting this in your vimrc: do not like this behavior you can disable it by putting this in your vimrc:
```vim
let g:lastplace_open_folds = 0 let g:lastplace_open_folds = 0
```
## Miscellaneous ## Miscellaneous
This plugin is complete and stable. Please do not be afraid to try it even This plugin is complete and stable. Please do not be afraid to try it even
@ -53,6 +70,10 @@ a bug, please submit a pull request that fixes whatever problem you're having.
## Version History ## Version History
vim-lastplace uses [semver](http://semver.org/) to manage version numbers. vim-lastplace uses [semver](http://semver.org/) to manage version numbers.
### 3.2.1
- Re-center screen when opening folds
- Documentation fixes and updates
### 3.1.1 ### 3.1.1
- Add 'nofile' and 'help' to lastplace_ignore_buftype. (Issue [#14](https://github.com/farmergreg/vim-lastplace/issues/14)) - Add 'nofile' and 'help' to lastplace_ignore_buftype. (Issue [#14](https://github.com/farmergreg/vim-lastplace/issues/14))
- Do not jump when a new file is created (Issue [#15](https://github.com/farmergreg/vim-lastplace/issues/15), [#16](https://github.com/farmergreg/vim-lastplace/issues/16)) - Do not jump when a new file is created (Issue [#15](https://github.com/farmergreg/vim-lastplace/issues/15), [#16](https://github.com/farmergreg/vim-lastplace/issues/16))

View file

@ -2,7 +2,7 @@
Author: Gregory L. Dietsche <https://www.gregd.org/> Author: Gregory L. Dietsche <https://www.gregd.org/>
License: MIT License: MIT
Version: 3.1.1 Version: 3.2.1
INTRODUCTION *vim-lastplace-introduction* INTRODUCTION *vim-lastplace-introduction*
@ -23,7 +23,7 @@ By default it is set to:
let g:lastplace_ignore_buftype = "quickfix,nofile,help" let g:lastplace_ignore_buftype = "quickfix,nofile,help"
Folds are automatically opened when jumping to the last edit position. If you Closed folds are automatically opened when jumping to the last edit position. If you
do not like this behavior you can disable it by putting this in your vimrc: do not like this behavior you can disable it by putting this in your vimrc:
let g:lastplace_open_folds = 0 let g:lastplace_open_folds = 0

View file

@ -4,7 +4,7 @@
" Author: Gregory L. Dietsche <vim@gregd.org> " Author: Gregory L. Dietsche <vim@gregd.org>
" Licence: MIT " Licence: MIT
" Website: https://www.gregd.org/ " Website: https://www.gregd.org/
" Version: 3.1.1 " Version: 3.2.1
" ============================================================================ " ============================================================================
if exists("b:loaded_lastplace_plugin") || &cp if exists("b:loaded_lastplace_plugin") || &cp
@ -76,5 +76,5 @@ endf
augroup lastplace_plugin augroup lastplace_plugin
autocmd! autocmd!
autocmd BufWinEnter * call s:lastplace() autocmd BufRead * call s:lastplace()
augroup END augroup END