Ответ на сообщение «Re: Unable to clear abbreviations», 
присланное 22:47:08 07 июня 2011, Вторник.
Отправитель: Uri Moszkowicz:

> Now how do I open an enhancement request for a mode to disable them?
You should ask this question on vim-use, not mail me directly. Such requests 
normally go to vim-dev mailing list, preferably with a patch that does what you 
want.

What do you mean when write «mode to disable them»? If you mean temporary 
disabling abbreviations, it is possible with a plain vimscript:
1. Install frawor (https://bitbucket.org/ZyX_I/frawor, source in a zip archive: 
https://bitbucket.org/ZyX_I/frawor/get/default.zip)
2. Put the following code into ~/.vim/plugin/toggle-abbreviations.vim:
==================== ~/.vim/plugin/toggle-abbreviations.vim ====================
    execute frawor#Setup('0.0', {'@/mappings': '0.0'})
    function! s:F.save()
        redir => abbrevs
        silent abbreviate
        redir END
        return map(split(abbrevs[1:], "\n"),
                    \'s:_r.map.maparg(matchstr(v:val, '.
                    \                         '"\\v(^\\S*\\s+)@<=\\S+"), '.
                    \                '"i", 1)')
    endfunction
    function! s:F.toggle()
        if exists('s:abbreviations')
            call map(s:abbreviations, 's:_r.map.map(v:val)')
            unlet s:abbreviations
        else
            let s:abbreviations=s:F.save()
            call map(copy(s:abbreviations), 's:_r.map.unmap(v:val)')
        endif
    endfunction
    call s:_f.mapgroup.add('ToggleAbbrev', {'toggle': {'lhs': '<F1>',
                \                                      'rhs': s:F.toggle,
                \                                     'mode': 'n',}})
================================================================================
Now you are will be able to toggle abbreviations using <F1> key. To use another 
key you can edit the above source or add line
    let g:frawormap_ToggleAbbrev_toggle='<new_lhs>'
to the vimrc (b:frawormap_ToggleAbbrev_toggle to have different key in a 
particular buffer also works if defined before BufEnter event is launched).

Текст сообщения:
> Thanks for the clarification. I had a thread on StackExchange about this as
> well and have updated it.
> 
> Now how do I open an enhancement request for a mode to disable them?
> 
> On Tue, Jun 7, 2011 at 2:43 PM, ZyX <[email protected]> wrote:
> > Reply to message «Re: Unable to clear abbreviations»,
> > sent 22:33:16 07 June 2011, Tuesday
> > 
> > by Uri Moszkowicz:
> > > I actually want to disable the feature altogether, not just for groovy
> > > files.
> > 
> > I guess you need
> > 
> >    :au FileType * :abclear <buffer>
> > 
> > as
> > 1. filetype may be defined after buffer was entered;
> > 2. BufEnter event is launched far more times (if you edit multiple files
> > in one
> > vim instance) then filetype is changed.
> > 
> > Original message:
> > > I actually want to disable the feature altogether, not just for groovy
> > > files.
> > > 
> > > On Tue, Jun 7, 2011 at 2:28 PM, Gary Johnson <[email protected]>
> > 
> > wrote:
> > > > On 2011-06-07, Uri Moszkowicz wrote:
> > > > > On Tue, Jun 7, 2011 at 2:07 PM, ZyX <[email protected]> wrote:
> > > > >     Reply to message  Re: Unable to clear abbreviations ,
> > > > >     sent 21:59:29 07 June 2011, Tuesday
> > > > >     
> > > > >     by Uri Moszkowicz:
> > > > >     > :abc a.groovy => "E474: Invalid argument"
> > > > >     
> > > > >     WTF is  a.groovy  doing after abclear? You are supposed to type
> > > > >     
> > > > >        :abc <buffer>
> > > > >     
> > > > >     where <buffer> is  <buffer>  typed *literally*. It is not a
> > > > 
> > > > placeholder for
> > > > 
> > > > >     buffer name.
> > > > > 
> > > > > Sorry I didn't realize. I thought it was a placeholder for the
> > > > > buffer
> > > > 
> > > > name and
> > > > 
> > > > > the documentation isn't clear enough to refer to. Anyway, I've
> > > > > tried that command and it works! Am I going to have to run this
> > > > > after opening every
> > > > 
> > > > buffer
> > > > 
> > > > > though?
> > > > 
> > > > No.  Just put that command in a file named
> > > > 
> > > >    ~/.vim/after/ftplugin/groovy.vim
> > > > 
> > > > Regards,
> > > > Gary
> > > > 
> > > > --
> > > > You received this message from the "vim_use" 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

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to