https://github.com/pixelastic/vim-undodir-tree
Save vim undo files as /path/to/file instead of %path%to%file.
https://github.com/pixelastic/vim-undodir-tree
Last synced: 11 months ago
JSON representation
Save vim undo files as /path/to/file instead of %path%to%file.
- Host: GitHub
- URL: https://github.com/pixelastic/vim-undodir-tree
- Owner: pixelastic
- Created: 2014-05-13T21:10:07.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T07:20:50.000Z (about 2 years ago)
- Last Synced: 2025-03-03T02:19:37.793Z (over 1 year ago)
- Language: Vim script
- Homepage:
- Size: 2.93 KB
- Stars: 11
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# vim-undodir-tree
The main goal of this plugin is to avoid the `E828` error one can get in vim
when trying to save a file with a very long file path and `undofile` enabled.
As vim saves undo files in `undodir` with a name equal to the original
filepath, with all `/` replaced with `%`, one can hit the OS maximum length for
files. If this happens, vim won't be able to save the undo file and will throw
the `E828` error.
# What does this plugin do ?
Well, instead of saving undo files as `%original%path%of%the%file`, it will
create the `original/path/of/the/` folder structure inside of `undodir`, and
save the undo file in it.
This way, we avoid the length limit on filenames, and as an added bonus it
makes pruning the undo folder much more easier.
# Installation
Just use [pathogen](https://github.com/tpope/vim-pathogen).
# Notes
You still need to enable `set undofile` for the plugin to kick in.