stash.vim : Persist unsaved buffers across Vim restarts. Continue where you left off.
| script karma |
Rating 0/0,
Downloaded by 0 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Ikor Jefocur |
| |
| script type |
| utility |
| |
| description |
Sublime Text, Notepad++, Visual Studio Code and many other text editors don't give an error or ask to save or discard changes made in unsaved files when exiting, but saves them within a temporary location and restores on a next launch. This plugin brings similar functionality to Vim.
Note this is not the same as a swap file, because swap files are used to (mostly) recover your work when something's went wrong, while stash.vim is here to let you save and restore buffers when you like it.
This plugin is only responsible for buffer's state, such as content and undo history, and not a window state, such as current line, opened folds, etc., for which you can still use sessions.
Requires :set hidden. Currently plugin doesn't work without this option.
Usage:
Stash[!] [filename] - Stash all modified buffers. If [!] is specified, existing stash will be overwritten; an error will be thrown otherwise.
StashRestore[!] [filename] - Restore previously stashed buffers. If [!] is specified, nothing will happen if stash doesn't exist; an error will be thrown otherwise.
StashDelete [filename] - Delete a stash if it exists.
Options:
let g:stash#directory - A directory where all stashes will be stored.
let g:stash#default_filename - Filename for a stash when it's not provided as an argument.
There are also a bunch of additional commands and options which provides an integration with sessions as well as automatic stash on exit and restore on enter. Check out README.md in the plugin's directory for more information.
Github page: https://github.com/IkorJefocur/stash.vim
If you like this project and want a new features to come up, consider donating. Currently I'm accepting only cryptocurrencies.
USDT TRC20: TSgim2TbYkTLMSSPLxnwUKWTSg1cSpfuv1
XMR: 4AoCxuegYb3GxzydDtfStiH3n96z1E3ejePxRhnZfBf25DrCZKWVX7dBsVTdx19LZVj4EhFJgDJZBQpckgFhUPEQHHiq7s6
If you're donating exactly for this project, you can let me know about it via email ikor.jfcr@tuta.io; otherwise I will threat it as a general support of all of my work. Please include amount sent or transaction's ID. |
| |
| install details |
Install stash.vim like any other plugin. In case you don't know how here's quick guide:
1. Determine your .vim directory location. It depends on OS and Vim fork/modification (e.g. Neovim). Usually it's where your config is stored.
2. Place a plugin directory inside of a pack/plugins/start/ inside of your .vim, creating necessary directories if they're doesn't exist yet.
For more info see :help using-scripts and :help packages. |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.168
|