Bug#392186: Vim should find and highlight possible typos in your
code in quickfix mode
Jason Spiro
jasonspiro4 at gmail.com
Tue Oct 10 16:40:37 UTC 2006
Package: vim
Version: 1:7.0-094+1
Severity: wishlist
When a quickfix command such as :cnext shows an error which may imply
a typo, such as:
hello.c:5: error: `numebr_of_students' undeclared (first use in this function)
then Vim should check if the invalid symbol could be a typo. One way
to do it would be to create an ispell dictionary using the English
language ispell affix rules, as below. (The example below creates a
dictionary of all lines in all source files. Alternatively, it would
be possible to create a dictionary of all lines except those with
compiler errors.) Then, you could look through the created dictionary
for similar but not identical symbols and highlight them in Vim as
possible misspellings using something similar to the ":set spell"
command.
ctags -x *.[ch] *.[ch]pp *.java *.perl *.py *.rb | sed -e's/ .*//' >
/tmp/yourusername-xref$$
buildhash -s /tmp/yourusername-xref$$ /usr/lib/ispell/english.aff
/tmp/yourusername-xref$$.hash
Does this sound like a useful idea?
Regards,
Jason
More information about the pkg-vim-maintainers
mailing list