De-emphasize custom 'undodir'

This is going away.  Make your plans now.
This commit is contained in:
Tim Pope
2013-04-09 00:17:41 -04:00
parent 530ea28e89
commit d39023bba7

View File

@@ -31,10 +31,6 @@ mostly `:set` calls.) Here's a taste:
* `'incsearch'`: Start searching before pressing enter. * `'incsearch'`: Start searching before pressing enter.
* `'listchars'`: Makes `:set list` (visible whitespace) prettier. * `'listchars'`: Makes `:set list` (visible whitespace) prettier.
* `'scrolloff'`: Always show at least one line above/below the cursor. * `'scrolloff'`: Always show at least one line above/below the cursor.
* `'directory'`: Dump swap files under `~/.local/share/vim/swap`,
`~/Library/Vim/swap`, or `%APPDATA%\Vim\swap`, depending on your
platform. Also `'backupdir'` and `'undodir'`. The directories aren't
created automatically, so try `mkdir -p ~/Library/Vim/{swap,backup,undo}`.
* `nmap Y y$`: Make `Y` behave like `C` and `D`. * `nmap Y y$`: Make `Y` behave like `C` and `D`.
* `runtime! macros/matchit.vim`: Load the version of matchit.vim that ships * `runtime! macros/matchit.vim`: Load the version of matchit.vim that ships
with Vim. with Vim.
@@ -67,20 +63,13 @@ can reassess whether it makes sense to include it.
Basically, they make it so that you can undo things that happened in a Basically, they make it so that you can undo things that happened in a
previous invocation of Vim. See `:help undo-persistence` for details. If you previous invocation of Vim. See `:help undo-persistence` for details. If you
don't like them strewn all over the file system, you have a few options. don't like them strewn all over the file system, you have a couple of options:
1. Create the appropriate directory that sensible.vim automatically 1. Provide your own preferred location in `'undodir'`:
configures for your platform:
* `~/.local/share/vim/undo` on Linux set undodir^=~/.vim/undo
* `~/Library/Vim/undo` on OS X
* `%APPDATA%\Vim\undo` on Windows
2. Provide your own preferred location in `'undodir'`: 2. Disable them entirely:
set undodir^=~/.vim/undo//
3. Disable them entirely:
if has('persistent_undo') if has('persistent_undo')
set noundofile set noundofile