mirror of
https://github.com/preservim/vim-wordy.git
synced 2025-11-13 04:13:47 -05:00
Make cached spelling file directory configurable.
Introduces the `g:wordy_spell_dir` variable. This is useful with `nixpkgs` or other distros where plugins are installed into unwritable locations.
This commit is contained in:
@@ -283,6 +283,14 @@ instances of “’s”, such as “Joe’s not here.”
|
|||||||
And finally, `vague-time` finds where you are using vague descriptions of
|
And finally, `vague-time` finds where you are using vague descriptions of
|
||||||
time where you could be more specific.
|
time where you could be more specific.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Change where `vim-wordy` stores cached spelling files using:
|
||||||
|
|
||||||
|
```
|
||||||
|
let g:wordy_spell_dir = '/home/my-user/wordy'
|
||||||
|
```
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
* [danielbmarques/vim-ditto][vd] - new plugin to highlight repeated words
|
* [danielbmarques/vim-ditto][vd] - new plugin to highlight repeated words
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ function! wordy#init(...) abort
|
|||||||
let l:src_path = l:rare_path
|
let l:src_path = l:rare_path
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let l:spell_dir = g:wordy_dir . '/spell'
|
let l:spell_dir = g:wordy_spell_dir . '/spell'
|
||||||
if !isdirectory(l:spell_dir)
|
if !isdirectory(l:spell_dir)
|
||||||
call mkdir(expand(l:spell_dir), "p")
|
call mkdir(expand(l:spell_dir), "p")
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ set cpo&vim
|
|||||||
" need directory to manage spell files
|
" need directory to manage spell files
|
||||||
let g:wordy_dir = fnamemodify(resolve(expand('<sfile>:p')), ':h:h')
|
let g:wordy_dir = fnamemodify(resolve(expand('<sfile>:p')), ':h:h')
|
||||||
|
|
||||||
|
if !exists('g:wordy_spell_dir')
|
||||||
|
let g:wordy_spell_dir = g:wordy_dir
|
||||||
|
endif
|
||||||
|
|
||||||
command -nargs=0 NoWordy call wordy#init({})
|
command -nargs=0 NoWordy call wordy#init({})
|
||||||
|
|
||||||
command -nargs=0 NextWordy call wordy#jump(1)
|
command -nargs=0 NextWordy call wordy#jump(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user