James Cole | 31 Jul 2012 10:52
Picon
Gravatar

Suggestion: allow 'z=' when spell-checking isn't on

Hi,

I don't usually enable spell-checking when I'm writing, as I find the underlines under misspellings a bit
distracting.  But sometimes I think or know that a word is misspelt, and I'd like to be able to use z= to bring
up a list of spelling suggestions.

But doing this when spell-checking is not on brings up an error "E756: Spell checking is not enabled".  My
suggestion is to allow the user to see spelling suggestions in such situations. I know it'd be possible to
write a map to do this, but it seems like it'd be a sensible default behavior for z=

For someone like me this would save the effort of having to first enable spell-checking, and then turning it
off again immediately afterwards (to avoid the red underlines), and as far as I can see there would be no
harm to allow this.

Regards,
James.

--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Ben Fritz | 31 Jul 2012 18:56
Picon

Re: Suggestion: allow 'z=' when spell-checking isn't on

On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
> Hi,
> 
> I don't usually enable spell-checking when I'm writing, as I find the underlines under misspellings a bit
distracting.  But sometimes I think or know that a word is misspelt, and I'd like to be able to use z= to bring
up a list of spelling suggestions.
> 
> But doing this when spell-checking is not on brings up an error "E756: Spell checking is not enabled".  My
suggestion is to allow the user to see spelling suggestions in such situations. I know it'd be possible to
write a map to do this, but it seems like it'd be a sensible default behavior for z=
> 
> For someone like me this would save the effort of having to first enable spell-checking, and then turning
it off again immediately afterwards (to avoid the red underlines), and as far as I can see there would be no
harm to allow this.
> 
> Regards,
> James.

How about:

nnoremap z= :<C-U>set spell<CR>z=

And probably another mapping to turn off spell check if you want it.

Alternatively, you could just change the highlight to be less distracting, using :hi rules on SpellBad,
SpellCap, SpellRare, and SpellLocal.

--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
(Continue reading)

Ingo Karkat | 31 Jul 2012 20:04
Picon
Favicon
Gravatar

Re: Suggestion: allow 'z=' when spell-checking isn't on

On 31-Jul-2012 18:56:21 +0200, Ben Fritz wrote:

> On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
>> [...] I know it'd be possible to write a map to do this, but it seems
>> like it'd be a sensible default behavior for z=
>>
>> [4 lines deleted]
> 
> How about:
> 
> nnoremap z= :<C-U>set spell<CR>z=
> 
> And probably another mapping to turn off spell check if you want it.
> 
> Alternatively, you could just change the highlight to be less
> distracting, using :hi rules on SpellBad, SpellCap, SpellRare, and
> SpellLocal.

Have you read his actual email? James explicitly referred to the shortcomings of
such a mapping. I second James' request, especially because I have written such
a mapping for myself, and it isn't trivial (have to handle empty 'spelllang' and
other settings that prevent spell checking, turning off 'spell' again after the
user interaction requires an autocmd, ...)

-- regards, ingo

--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
(Continue reading)

Ben Fritz | 31 Jul 2012 21:31
Picon

Re: Suggestion: allow 'z=' when spell-checking isn't on

On Tuesday, July 31, 2012 1:04:21 PM UTC-5, Ingo Karkat wrote:
> On 31-Jul-2012 18:56:21 +0200, Ben Fritz wrote:
> 
> 
> 
> > On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
> 
> >> [...] I know it'd be possible to write a map to do this, but it seems
> 
> >> like it'd be a sensible default behavior for z=
> 
> >>
> 
> >> [4 lines deleted]
> 
> > 
> 
> > How about:
> 
> > 
> 
> > nnoremap z= :<C-U>set spell<CR>z=
> 
> > 
> 
> > And probably another mapping to turn off spell check if you want it.
> 
> > 
> 
> > Alternatively, you could just change the highlight to be less
(Continue reading)

Ingo Karkat | 31 Jul 2012 21:57
Picon
Favicon
Gravatar

Re: Suggestion: allow 'z=' when spell-checking isn't on

On 31-Jul-2012 21:31:24 +0200, Ben Fritz wrote:

> On Tuesday, July 31, 2012 1:04:21 PM UTC-5, Ingo Karkat wrote:
>> On 31-Jul-2012 18:56:21 +0200, Ben Fritz wrote:
>>
>>
>>
>>> On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
>>
>>>> [...] I know it'd be possible to write a map to do this, but it seems
>>
>>>> like it'd be a sensible default behavior for z=
>>
>>>>
>>
>>>> [4 lines deleted]
>>
>>>
>>
>>> How about:
>>
>>>
>>
>>> nnoremap z= :<C-U>set spell<CR>z=
>>
>>>
>>
>>> And probably another mapping to turn off spell check if you want it.
>>
>>>
(Continue reading)

Christian Brabandt | 5 Aug 2012 20:57

Re: Suggestion: allow 'z=' when spell-checking isn't on

Hi Ingo!

On Di, 31 Jul 2012, Ingo Karkat wrote:

> On 31-Jul-2012 21:31:24 +0200, Ben Fritz wrote:
> 
> > On Tuesday, July 31, 2012 1:04:21 PM UTC-5, Ingo Karkat wrote:
> >> On 31-Jul-2012 18:56:21 +0200, Ben Fritz wrote:
> >>
> >>
> >>
> >>> On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
> >>
> >>>> [...] I know it'd be possible to write a map to do this, but it seems
> >>
> >>>> like it'd be a sensible default behavior for z=
> >>
> >>>>
> >>
> >>>> [4 lines deleted]
> >>
> >>>
> >>
> >>> How about:
> >>
> >>>
> >>
> >>> nnoremap z= :<C-U>set spell<CR>z=
> >>
> >>>
(Continue reading)

Gary Johnson | 5 Aug 2012 22:25

Re: Suggestion: allow 'z=' when spell-checking isn't on

On 2012-08-05, Christian Brabandt wrote:
> Hi Ingo!

> Does this patch work for you?

So far, so good.  Thanks!  I did have to replace some sequences of
spaces in the patch with real tabs for the patch to apply.

Regards,
Gary

--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Bram Moolenaar | 6 Aug 2012 22:57
Picon

Re: Suggestion: allow 'z=' when spell-checking isn't on


Christian Brabandt wrote:

> On Di, 31 Jul 2012, Ingo Karkat wrote:
> 
> > On 31-Jul-2012 21:31:24 +0200, Ben Fritz wrote:
> > > On Tuesday, July 31, 2012 1:04:21 PM UTC-5, Ingo Karkat wrote:
> > >> On 31-Jul-2012 18:56:21 +0200, Ben Fritz wrote:
> > >>
> > >>> On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
> > >>>> [...] I know it'd be possible to write a map to do this, but it seems
> > >>>> like it'd be a sensible default behavior for z=
> > >>>>
> > >>>> [4 lines deleted]
> > >>>
> > >>> How about:
> > >>>
> > >>> nnoremap z= :<C-U>set spell<CR>z=
> > >>>
> > >>> And probably another mapping to turn off spell check if you want it.
> > >>>
> > >>> Alternatively, you could just change the highlight to be less
> > >>> distracting, using :hi rules on SpellBad, SpellCap, SpellRare, and
> > >>> SpellLocal.
> > >>
> > >> Have you read his actual email? James explicitly referred to the
> > >> shortcomings of such a mapping. I second James' request, especially
> > >> because I have written such a mapping for myself, and it isn't
> > >> trivial (have to handle empty 'spelllang' and other settings that
> > >> prevent spell checking, turning off 'spell' again after the user
(Continue reading)

Ingo Karkat | 4 Sep 2012 11:34
Picon
Favicon
Gravatar

Re: Suggestion: allow 'z=' when spell-checking isn't on

On 05-Aug-2012 20:57:24 +0200, Christian Brabandt wrote:

> Hi Ingo!
> 
> On Di, 31 Jul 2012, Ingo Karkat wrote:
> 
>> On 31-Jul-2012 21:31:24 +0200, Ben Fritz wrote:
>>
>>> On Tuesday, July 31, 2012 1:04:21 PM UTC-5, Ingo Karkat wrote:
>>>> On 31-Jul-2012 18:56:21 +0200, Ben Fritz wrote:
>>>>
>>>>
>>>>
>>>>> On Tuesday, July 31, 2012 3:52:06 AM UTC-5, James  Cole wrote:
>>>>
>>>>>> [...] I know it'd be possible to write a map to do this, but it seems
>>>>
>>>>>> like it'd be a sensible default behavior for z=
>>>>
>>>>>>
>>>>
>>>>>> [4 lines deleted]
>>>>
>>>>>
>>>>
>>>>> How about:
>>>>
>>>>>
>>>>
>>>>> nnoremap z= :<C-U>set spell<CR>z=
(Continue reading)


Gmane