|
| 1 | +# vim-lastplace v3.1.1 |
| 2 | + |
| 3 | +Intelligently reopen files at your last edit position. By default git, |
| 4 | +svn, and mercurial commit messages are ignored because you |
| 5 | +probably want to type a new message and not re-edit the previous |
| 6 | +one. |
| 7 | + |
| 8 | +## Advantages |
| 9 | +Advantages over the snippets that can be found around the net include: |
| 10 | +* Commit messages automatically start at the beginning of a file. This is important because many version control systems re-use the same file for commit message editing. |
| 11 | +* Maximizes Available Context |
| 12 | + - Center the cursor vertically after restoring last edit position. |
| 13 | + - Keep as much of the file on screen as possible when last edit position is at the end of the file. |
| 14 | +* Opens folds if the last edit position is inside a fold. |
| 15 | +* Works properly with new file templates and scripts that jump to a specific line in them. |
| 16 | + |
| 17 | +## Installation |
| 18 | +You can use [pathogen.vim](https://github.com/tpope/vim-pathogen) or other plugin managers to install and use vim-lastplace. |
| 19 | + |
| 20 | + cd ~/.vim/bundle |
| 21 | + git clone git://github.com/farmergreg/vim-lastplace.git |
| 22 | + |
| 23 | +Depending on which Vim package you're using, Vim may be preconfigured with |
| 24 | +last-edit-position logic that doesn't work quite as well as vim-lastplace. |
| 25 | +If so, you may want to disable that in favor of vim-lastplace. For example, |
| 26 | +for Vim as packaged with Git for Windows, you can edit |
| 27 | +`C:\Program Files\Git\etc\vimrc` and comment out the "Remember positions in files" |
| 28 | +`autocmd BufReadPost *` block. |
| 29 | + |
| 30 | +## Configuration |
| 31 | +You can configure what file types to ignore by setting |
| 32 | +g:lastplace_ignore in your vimrc. This is a comma separated list. |
| 33 | +By default it is set to: |
| 34 | + |
| 35 | + let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit" |
| 36 | + |
| 37 | +You can configure buffer types to ignore by setting |
| 38 | +g:lastplace_ignore_buftype in your vimrc. This is a comma separated list. |
| 39 | +By default it is set to: |
| 40 | + |
| 41 | + let g:lastplace_ignore_buftype = "quickfix,nofile,help" |
| 42 | + |
| 43 | +Folds are automatically opened when jumping to the last edit position. If you |
| 44 | +do not like this behavior you can disable it by putting this in your vimrc: |
| 45 | + |
| 46 | + let g:lastplace_open_folds = 0 |
| 47 | + |
| 48 | +## Miscellaneous |
| 49 | +This plugin is complete and stable. Please do not be afraid to try it even |
| 50 | +if there is very little recent activity in this repository. If you do find |
| 51 | +a bug, please submit a pull request that fixes whatever problem you're having. |
| 52 | + |
| 53 | +## Version History |
| 54 | +vim-lastplace uses [semver](http://semver.org/) to manage version numbers. |
| 55 | + |
| 56 | +### 3.1.1 |
| 57 | +- Add 'nofile' and 'help' to lastplace_ignore_buftype. (Issue [#14](https://github.com/farmergreg/vim-lastplace/issues/14)) |
| 58 | +- 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)) |
| 59 | + |
| 60 | +### 3.1.0 |
| 61 | +- Add g:lastplace_ignore_buftype setting. |
| 62 | +- Update github links from username dietsche to farmergreg. |
| 63 | + |
| 64 | +### 3.0.4 |
| 65 | +- Add g:lastplace_open_folds option. |
| 66 | + |
| 67 | +### 3.0.3 |
| 68 | +- Point release for Debian packaging. Changes all http links to https. No code changes. |
| 69 | + |
| 70 | +### 3.0.2 |
| 71 | +- A fix for files that are smaller than the current screen size (issue #8) |
| 72 | + |
| 73 | +### 3.0.1 |
| 74 | +- A fix for files with modelines. |
| 75 | + |
| 76 | +### 3.0.0 |
| 77 | + |
| 78 | +- Open folds if the last edited area is inside a closed fold. |
| 79 | + |
| 80 | +### 2.0.1 |
| 81 | + |
| 82 | +- Add gitrebase filetype to the ignore list. |
| 83 | + |
| 84 | +### 2.0.0 |
| 85 | + |
| 86 | +- Center the screen when restoring the cursor position. |
| 87 | +- When at the end of a file, keep as much of it on screen as possible. |
| 88 | + |
| 89 | +### 1.0.0 |
| 90 | + |
| 91 | +- Initial version. |
| 92 | + |
| 93 | +## About |
| 94 | + |
| 95 | +- Author : Gregory L. Dietsche |
| 96 | +- Web Page: https://www.gregd.org/ |
| 97 | + |
| 98 | +Get the latest version, submit pull requests, and file bug reports |
| 99 | +on GitHub: |
| 100 | +- https://github.com/farmergreg/vim-lastplace |
| 101 | + |
| 102 | +If you like this plugin, please star and rate it on these sites: |
| 103 | + |
| 104 | +- [GitHub](https://github.com/farmergreg/vim-lastplace) |
| 105 | +- [Vim.org](http://www.vim.org/scripts/script.php?script_id=5090) |
0 commit comments