aboutsummaryrefslogtreecommitdiff
path: root/doc/spellfile_local.txt
blob: 37dbf81fa63e0bfca81c27c37f7085657dbf6000 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
*spellfile_local.txt*	For Vim version 7.0	Last change: 2020 May 15

DESCRIPTION				*spellfile_local*

This plugin extends the behaviour of 'spellfile' for file buffers to add extra
spelling word lists that are unique to each path and (if applicable) filetype.
The 'spellfile' setting for a file named `test.vim` in one's home directory
while writing English in UTF-8 encoding might look like this:
>
  spellfile=~/.vim/spell/en.utf-8.add
    ,~/.vim/spell/path.%home%user%test.vim.en.utf-8.add
    ,~/.vim/spell/filetype.vim.en.utf-8.add
<
Words can then be added to the file's word list with `2zg`, or to the
filetype's list with `3zg`.

REQUIREMENTS				*spellfile_local-requirements*

This plugin only loads if 'compatible' is not set.

OPTIONS					*spellfile_local-options*

					*g:spellfile_local_dirs*
By default, the plugin mimics Vim's default behaviour for 'spellfile' in
attempting to create the "spell" subdirectory in the first path in
'runtimepath' for which it has write permission.  To change this behaviour,
perhaps to use XDG basedirs, set the `g:spellfile_local_dirs` option in your
|vimrc|:
>
   let g:spellfile_local_dirs = [
         \ '~/.local/share/vim',
         \ '/usr/local/share/vim',
         \ '/usr/share/vim',
         \]
<
AUTHOR					*spellfile_local-author*

Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.

LICENSE					*spellfile_local-license*

Licensed for distribution under the same terms as Vim itself (see |license|).

 vim:tw=78:ts=8:ft=help:norl: