From 0543fc4bab1100ecf8bb63bc98ef728f8ac451ee Mon Sep 17 00:00:00 2001 From: Kurtis Moxley Date: Thu, 19 May 2022 23:04:42 +0800 Subject: [PATCH] Update vim-lastplace. --- sources_non_forked/vim-lastplace/LICENSE | 2 +- sources_non_forked/vim-lastplace/README.md | 39 ++++++++++++++----- .../vim-lastplace/doc/vim-lastplace.txt | 4 +- .../vim-lastplace/plugin/vim-lastplace.vim | 4 +- 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/sources_non_forked/vim-lastplace/LICENSE b/sources_non_forked/vim-lastplace/LICENSE index 9717040c..0131de0a 100644 --- a/sources_non_forked/vim-lastplace/LICENSE +++ b/sources_non_forked/vim-lastplace/LICENSE @@ -1,6 +1,6 @@ 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 of this software and associated documentation files (the "Software"), to deal diff --git a/sources_non_forked/vim-lastplace/README.md b/sources_non_forked/vim-lastplace/README.md index 507b215c..086755bd 100644 --- a/sources_non_forked/vim-lastplace/README.md +++ b/sources_non_forked/vim-lastplace/README.md @@ -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, svn, and mercurial commit messages are ignored because you @@ -14,12 +14,23 @@ Advantages over the snippets that can be found around the net include: * Opens folds if the last edit position is inside a fold. * Works properly with new file templates and scripts that jump to a specific line in them. -## Installation -You can use [pathogen.vim](https://github.com/tpope/vim-pathogen) or other plugin managers to install and use vim-lastplace. +## Installation +### Vim 8 & Beyond: +You can install vim-lastplace as a vim plugin without any additional tools - cd ~/.vim/bundle - git clone git://github.com/farmergreg/vim-lastplace.git +```bash +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 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, @@ -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. By default it is set to: - let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit" +```vim + let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit" +```` You can 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,nofile,help" +```vim + 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: - let g:lastplace_open_folds = 0 +```vim + let g:lastplace_open_folds = 0 +``` ## Miscellaneous 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 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 - 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)) diff --git a/sources_non_forked/vim-lastplace/doc/vim-lastplace.txt b/sources_non_forked/vim-lastplace/doc/vim-lastplace.txt index 3105c27c..86c92c7e 100644 --- a/sources_non_forked/vim-lastplace/doc/vim-lastplace.txt +++ b/sources_non_forked/vim-lastplace/doc/vim-lastplace.txt @@ -2,7 +2,7 @@ Author: Gregory L. Dietsche License: MIT -Version: 3.1.1 +Version: 3.2.1 INTRODUCTION *vim-lastplace-introduction* @@ -23,7 +23,7 @@ By default it is set to: 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: let g:lastplace_open_folds = 0 diff --git a/sources_non_forked/vim-lastplace/plugin/vim-lastplace.vim b/sources_non_forked/vim-lastplace/plugin/vim-lastplace.vim index 8b2478cb..6ed1becc 100644 --- a/sources_non_forked/vim-lastplace/plugin/vim-lastplace.vim +++ b/sources_non_forked/vim-lastplace/plugin/vim-lastplace.vim @@ -4,7 +4,7 @@ " Author: Gregory L. Dietsche " Licence: MIT " Website: https://www.gregd.org/ -" Version: 3.1.1 +" Version: 3.2.1 " ============================================================================ if exists("b:loaded_lastplace_plugin") || &cp @@ -76,5 +76,5 @@ endf augroup lastplace_plugin autocmd! - autocmd BufWinEnter * call s:lastplace() + autocmd BufRead * call s:lastplace() augroup END