mirror of
https://github.com/tpope/vim-sensible.git
synced 2025-11-11 04:23:47 -05:00
@@ -31,9 +31,10 @@ 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 `~/.cache/vim/swap` (only if that
|
* `'directory'`: Dump swap files under `~/.local/share/vim/swap`,
|
||||||
directory already exists). Also `'backupdir'` and `'undodir'`. Try
|
`~/Library/Vim/swap`, or `~\Application Data\Vim\swap`, depending on your
|
||||||
`mkdir -p ~/.cache/vim/{swap,backup,undo}`.
|
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.
|
||||||
|
|||||||
@@ -60,15 +60,16 @@ if &history < 1000
|
|||||||
endif
|
endif
|
||||||
set viminfo^=!
|
set viminfo^=!
|
||||||
|
|
||||||
if isdirectory(expand('~/.cache/vim'))
|
let s:dir = has('win32') ? '~/Application Data/Vim' : has('mac') ? '~/Library/Vim' : '~/.local/share/vim'
|
||||||
|
if isdirectory(expand(s:dir))
|
||||||
if &directory =~# '^\.,'
|
if &directory =~# '^\.,'
|
||||||
set directory^=~/.cache/vim/swap//
|
let &directory = s:dir . '/swap//,'
|
||||||
endif
|
endif
|
||||||
if &backupdir =~# '^\.,'
|
if &backupdir =~# '^\.,'
|
||||||
set backupdir^=~/.cache/vim/backup//
|
let &backupdir = s:dir . '/backup//,'
|
||||||
endif
|
endif
|
||||||
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)'
|
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)'
|
||||||
set undodir^=~/.cache/vim/undo//
|
let &undodir = s:dir . '/undo//,'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if exists('+undofile')
|
if exists('+undofile')
|
||||||
|
|||||||
Reference in New Issue
Block a user