Bug#145600: marked as done (vim: "/usr/share/doc/vim/tools/vimspell.sh" doesn't work)

Debian Bug Tracking System owner@bugs.debian.org
Tue, 15 Mar 2005 12:50:29 -0800

Your message dated Tue, 15 Mar 2005 21:36:53 +0100
with message-id <20050315203653.GA11357@fistandantilus.takhisis.org>
and subject line vim: "/usr/share/doc/vim/tools/vimspell.sh" doesn't work
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 2 May 2002 19:06:22 +0000
>From fuzzybear@pocketmail.com Thu May 02 14:06:22 2002
Return-path: <fuzzybear@pocketmail.com>
Received: from (Baldur) [] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 173Ltl-0006Iu-00; Thu, 02 May 2002 14:06:01 -0500
Received: from ben by Baldur with local (Exim 3.35 #1 (Debian))
	id 173Lu0-0002Ef-00; Thu, 02 May 2002 15:06:04 -0400
From: Benjamin A. Okopnik <ben@Baldur>
Subject: vim: "/usr/share/doc/vim/tools/vimspell.sh" doesn't work
To: submit@bugs.debian.org
X-Mailer: bug
Message-Id: <E173Lu0-0002Ef-00@Baldur>
Sender: "Benjamin A. Okopnik" <fuzzybear@pocketmail.com>
Date: Thu, 02 May 2002 15:06:04 -0400
Delivered-To: submit@bugs.debian.org

Package: vim
Version: 6.0.270-1
Severity: normal

The above script has several bugs, including incorrect syntax and bad
parameter substitution for LOCAL_DICT (if the variable is defined, _no_
alternate dictionary will be used.) Here is a rewrite with a number of
improvements (faster, works in files with "syntax on", bugs fixed, etc.) A
modified "vimspell.txt" is also appended.

# Spellcheck a file and generate the syntax statements necessary to
# highlight the errors in "vim". Based on a program by Neil Schemenauer
# <nascheme@ucalgary.ca>, which was in turn based on ideas from Krishna
# Gadepalli <krishna@stdavids.picker.com>.
# I use the following mappings (in .vimrc):
#	no <F7> :syntax off<CR>:so `vimspell.sh %`<CR><CR>
#	no <F8> :syntax clear SpellErrors<CR>:syntax on<CR>
# Ben Okopnik <ben@callahans.org>
# May 2002

# Use 'tempfile' if it exists, 'PID' method otherwise
OUT=`eval \`which tempfile\``

# Use the local wordlist if one is defined or matches the default
[ -f "$LOCAL_DICT" ] && ARGS="--dictionary=$LOCAL_DICT"

spell $ARGS $1|sort -u|sed 's/.*/syntax match SpellErrors "&"/' > $OUT
printf "highlight link SpellErrors ErrorMsg\n\n!rm $OUT\n" >> $OUT
printf "$OUT\n"


Here is the text file.


This is a simple script to spell check a file and generate the syntax
statements necessary to highlight the errors in vim.  It is based on a
similar program by Neil Schemenauer <nascheme@ucalgary.ca>, which was in
turn based onone by Krishna Gadepalli <krishna@stdavids.picker.com>.

To use this script, first place it in a directory in your path.  Next,
you should add some convenient key mappings.  I use the following (in

	no <F7> :syntax off<CR>:so `vimspell.sh %`<CR><CR>
	no <F8> :syntax clear SpellErrors<CR>:syntax on<CR>

This program uses the "spell" command. On my Debian system, "spell" is a
wrapper around "ispell", and has different syntax from some other versions
of "spell" that I've seen in the past; the part that can go wrong in the
script is the one that specifies the "alternate dictionary":


If your version of "spell" uses different syntax for specifying one, simply
change the "--dictionary=" part to correct it.

Ben Okopnik <ben@callahans.org>

-- System Information
Debian Release: 3.0
Kernel Version: Linux Baldur 2.4.17-686 #2 Sat Dec 22 21:58:49 EST 2001 i686 unknown

Versions of the packages vim depends on:
ii  dpkg           1.9.20         Package maintenance system for Debian
ii  libc6          2.2.5-4        GNU C Library: Shared libraries and Timezone
ii  libgpmg1       1.19.6-11      General Purpose Mouse Library [libc6]
ii  libncurses5    5.2.20020112a- Shared libraries for terminal handling

--- Begin /etc/vim/vimrc (modified conffile)
" Configuration file for gvim
" Written for Debian GNU/Linux by W.Akkerman <wakkerma@debian.org>
" Some modifications by J.H.M. Dassen <jhm@cistron.nl>
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible	" Use Vim defaults (much better!)
set backspace=2		" allow backspacing over everything in insert mode
" Now we set some defaults for the editor 
set autoindent		" always set autoindenting on
set textwidth=0		" Don't wrap words by default
set nobackup		" Don't keep a backup file
set viminfo='20,\"50	" read/write a .viminfo file, don't store more than
			" 50 lines of registers
set history=50		" keep 50 lines of command line history
set ruler		" show the cursor position all the time
" Suffixes that get lower priority when doing tab completion for filenames.
" These are files we are not likely to want to edit or read.
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
" We know xterm-debian is a color terminal
if &term =~ "xterm-debian" || &term =~ "xterm-xfree86"
  set t_Co=16
  set t_Sf=[3%dm
  set t_Sb=[4%dm
" Make p in Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" 3 lines enables syntax highlighting by default.
if has("syntax") && &t_Co > 2
  syntax on
" Debian uses compressed helpfiles. We must inform vim that the main
" helpfiles is compressed. Other helpfiles are stated in the tags-file.
set helpfile=$VIMRUNTIME/doc/help.txt.gz
if has("autocmd")
 " Enabled file type detection
 " Use the default filetype settings. Also load indent files to automatically
 " do language-dependent indenting
 filetype plugin indent on
 " Also, support editing of gzip-compressed files. DO NOT REMOVE THIS!
 " This is also used when loading the compressed helpfiles.
endif " has ("autocmd")
" Some Debian-specific things
augroup filetype
  au BufRead reportbug.*		set ft=mail
augroup END
" The following are commented out as they cause vim to behave a lot
" different from regular vi. They are highly recommended though.
"set showcmd		" Show (partial) command in status line.
"set showmatch		" Show matching brackets.
"set ignorecase		" Do case insensitive matching
"set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make

--- End /etc/vim/vimrc

Received: (at 145600-done) by bugs.debian.org; 15 Mar 2005 20:37:38 +0000
>From zack@bononia.it Tue Mar 15 12:37:38 2005
Return-path: <zack@bononia.it>
Received: from ms003msg.fastwebnet.it [] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DBInJ-0000E8-00; Tue, 15 Mar 2005 12:37:37 -0800
Received: from fistandantilus.takhisis.org ( by ms003msg.fastwebnet.it (
        id 41FFB1A400A8755A; Tue, 15 Mar 2005 21:37:03 +0100
Received: by fistandantilus.takhisis.org (Postfix, from userid 3148)
	id 9F164274090; Tue, 15 Mar 2005 21:36:53 +0100 (CET)
Date: Tue, 15 Mar 2005 21:36:53 +0100
From: Stefano Zacchiroli <zack@debian.org>
To: 145600-done@bugs.debian.org, fuzzybear@pocketmail.com
Subject: Re: vim: "/usr/share/doc/vim/tools/vimspell.sh" doesn't work
Message-ID: <20050315203653.GA11357@fistandantilus.takhisis.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: 145600-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 

I'm closing this bug since vimspell.sh is no longer part of the vim
distribution and it is no longer in debian.

Users interested in spell checking inside vim should have a look, for
example, at the vimspell plugin:



Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-