Skip to content

Commit

Permalink
Feature: Exclude 'todo' keywords from spellcheck
Browse files Browse the repository at this point in the history
The configured 'org_todo_keywords' are subject to spellcheck. In
languages other than English, the spellchecker may not consider those
words to be spelled correctly. As a result, the spellchecker incorrectly
and annoyingly flags these words as misspelled. This patch removes the
keywords in the 'org_todo_keywords' from the province of the
spellchecker.
  • Loading branch information
hawkinsw committed Jun 28, 2021
1 parent 3aeea06 commit 4295c49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion syntax/org.vim
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ if !exists('g:loaded_org_syntax')
break
endif
endfor
silent! exec 'syntax match org_todo_keyword_' . l:safename . ' /\*\{1,\}\s\{1,\}\zs' . l:_i .'\(\s\|$\)/ ' . a:todo_headings
silent! exec 'syntax match org_todo_keyword_' . l:safename . ' /\*\{1,\}\s\{1,\}\zs' . l:_i .'\(\s\|$\)/ ' . a:todo_headings . ' contains=@NoSpell'
silent! exec 'hi def link org_todo_keyword_' . l:safename . ' ' . l:group
endfor
endfunction
Expand Down
2 changes: 1 addition & 1 deletion syntax/orgtodo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if !exists('g:loaded_orgtodo_syntax')
break
endif
endfor
silent! exec 'syntax match orgtodo_todo_keyword_' . l:_i . ' /' . l:_i .'/ ' . a:todo_headings
silent! exec 'syntax match orgtodo_todo_keyword_' . l:_i . ' /' . l:_i .'/ ' . a:todo_headings . ' contains=@NoSpell'
silent! exec 'hi def link orgtodo_todo_keyword_' . l:_i . ' ' . l:group
endfor
endfunction
Expand Down

0 comments on commit 4295c49

Please sign in to comment.