Created
December 23, 2011 01:08
-
-
Save ziz/1512615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; spelling checker | |
;;; This lets you type ESC-s to check the spelling of the current line. | |
;;; If any misspellings are found, you will be told. | |
;;; This requires the "spell" utility on your local system. | |
/loaded __TFLIB__/spell.tf | |
/def -i spell_line = \ | |
/setenv ARGS=$(/recall -i 1)%; \ | |
/let _errs=$(/quote -S -decho !echo $$ARGS | aspell list)%; \ | |
/if ( _errs !~ "" ) \ | |
/echo MISSPELLINGS: %_errs%; \ | |
/setenv ARGS=$(/echo %_errs)%; \ | |
/quote -S -decho !echo $$ARGS | aspell list | aspell pipe | grep '^&' | cut -d',' -f-4%; \ | |
/else \ | |
/echo No misspellings found.%; \ | |
/endif%; \ | |
/@test _errs =~ "" | |
/def -ib^[s = /spell_line | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment