diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-03 03:18:06 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-03 03:18:06 +1200 |
commit | 83ee166ee09737997555e51aa6166bc17df9a214 (patch) | |
tree | 791a0608a63e30e2c1047cea0425a430a2be76fd | |
parent | Factor out iteration variables with some maps (diff) | |
download | dotfiles-83ee166ee09737997555e51aa6166bc17df9a214.tar.gz dotfiles-83ee166ee09737997555e51aa6166bc17df9a214.zip |
Tighten :try block around 'dictionary'/'thesaurus'
-rw-r--r-- | vim/vimrc | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 02 May 2020 15:03:05 UTC +" Last updated: Sat, 02 May 2020 15:15:57 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -410,22 +410,22 @@ set spellcapcheck=[.?!]\\%(\ \ \\\|[\\n\\r\\t]\\) " 'isfname'; the blacklist is hard-coded. " set dictionary^=/usr/share/dict/words -try - let s:refdirs = xdg#['data']['dirs'] - if xdg#['data']['home'] !=# v:null - call insert(s:refdirs, xdg#['data']['home']) - endif - if !empty(s:refdirs) +let s:refdirs = xdg#['data']['dirs'] +if xdg#['data']['home'] !=# v:null + call insert(s:refdirs, xdg#['data']['home']) +endif +if !empty(s:refdirs) + try execute 'set dictionary^='.option#Escape(join(map( \ s:refdirs, 'option#item#Escape(v:val."/dictionary.txt")' \), ',')) execute 'set thesaurus^='.option#Escape(join(map( \ s:refdirs, 'option#item#Escape(v:val."/thesaurus.txt")' \), ',')) - endif - unlet s:refdirs -catch /^Vim\%((\a\+)\)\=:E474:/ -endtry + catch /^Vim\%((\a\+)\)\=:E474:/ + endtry +endif +unlet s:refdirs " Next, we’ll modernize a little in adjusting some options with old " language-specific defaults. |