Skip to content

Commit

Permalink
vimrc: Regenerate binary spell files on startup
Browse files Browse the repository at this point in the history
Enables the "union" merge strategy for spell files and regenerates the
binary .spl files when modified by a merge.
  • Loading branch information
derekerdmann committed Feb 20, 2024
1 parent f376ba0 commit 9df1ab4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.add merge=union
7 changes: 7 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ endif
" Remove object files from file globs
set wildignore+=*.o

" Regenerate binary spell files if the .add files were modified
for d in glob('~/.vim/spell/*.add', 1, 1)
if filereadable(d) && (!filereadable(d . '.spl') || getftime(d) > getftime(d . '.spl'))
exec 'mkspell! ' . fnameescape(d)
endif
endfor

" Show a tree-style netrw listing
let g:netrw_home = '~/.netrw'
let g:netrw_liststyle = 3
Expand Down
1 change: 1 addition & 0 deletions vimfiles/spell/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.spl

0 comments on commit 9df1ab4

Please sign in to comment.