From b04c7d845cbe95691c284912b6fea35a31addaee Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 17 Sep 2020 21:23:32 +1200 Subject: Separate 'dictionary' and 'thesaurus' settings --- vim/vimrc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 016d0958..e95ba55d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Thu, 17 Sep 2020 09:18:45 UTC +" Last updated: Thu, 17 Sep 2020 09:23:14 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -447,15 +447,6 @@ endif " moment, I’ve just added additional entries referring to the user runtime " directory. " -" In much the same way, we add an expected path to a thesaurus, for completion -" with CTRL-X CTRL-T in insert mode, or with ‘t’ added to 'completeopt'. The -" thesaurus data isn’t installed as part of the default ‘install-vim’ target -" in tejr’s dotfiles, but a decent one can be retrieved from my website at -" . I got this from the link in -" the :help for 'thesaurus' in v8.1. It’s from WordNet and MyThes-1. I had -" to remove the first two metadata lines from thesaurus.txt, as Vim appeared -" to interpret them as part of the body data. -" set dictionary^=/usr/share/dict/words if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) execute 'set dictionary^='.option#Escape(join(map( @@ -465,6 +456,18 @@ if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) \), \ 'option#item#Escape(v:val.''/dictionary.txt'')' \), ',')) +endif + +" In much the same way as 'dictionary', we add an expected path to +" a thesaurus, for completion with CTRL-X CTRL-T in insert mode, or with ‘t’ +" added to 'completeopt'. The thesaurus data isn’t installed as part of the +" default ‘install-vim’ target in tejr’s dotfiles, but a decent one can be +" retrieved from my website at . +" I got this from the link in the :help for 'thesaurus' in v8.1. It’s from +" WordNet and MyThes-1. I had to remove the first two metadata lines from +" thesaurus.txt, as Vim appeared to interpret them as part of the body data. +" +if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) execute 'set thesaurus^='.option#Escape(join(map( \ extend( \ s:xdgdatahome !=# '' ? [s:xdgdatahome] : [], -- cgit v1.2.3