aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-03 03:18:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-03 03:18:06 +1200
commit83ee166ee09737997555e51aa6166bc17df9a214 (patch)
tree791a0608a63e30e2c1047cea0425a430a2be76fd
parentFactor out iteration variables with some maps (diff)
downloaddotfiles-83ee166ee09737997555e51aa6166bc17df9a214.tar.gz
dotfiles-83ee166ee09737997555e51aa6166bc17df9a214.zip
Tighten :try block around 'dictionary'/'thesaurus'
-rw-r--r--vim/vimrc22
1 files changed, 11 insertions, 11 deletions
diff --git a/vim/vimrc b/vim/vimrc
index b2b720f4..a08a4287 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -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.