File: mkspellcheck

package info (click to toggle)
ispell-czech 20040229-5.2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,588 kB
  • ctags: 5
  • sloc: perl: 703; makefile: 76; sh: 43
file content (31 lines) | stat: -rwxr-xr-x 697 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
#
# Spell a file & generate the syntax statements necessary to
# highlight in vim.  Based on a program from Krishna Gadepalli
# <krishna@stdavids.picker.com>.
#
# I use the following mappings (in .vimrc):
#
#   noremap <F8> :so `vimspell.sh %`<CR><CR>
#   noremap <F7> :syntax clear SpellErrors<CR>
#
# Neil Schemenauer <nascheme@ucalgary.ca>
# March 1999
#
# Version not updating original file Petr Kolar <Petr.Kolar@vslib.cz>
# June 2002

OUTFILE=$1

shift
ispell -l $* | sort -u |
awk '
      {
    printf "syntax match SpellErrors \"\\<%s\\>\"\n", $0 ;
      }

END   {
    printf "highlight link SpellErrors ErrorMsg\n\n" ;
      }
' > $OUTFILE
echo "!/bin/rm $OUTFILE" >> $OUTFILE