Monday, June 6, 2011

Re: Unable to clear abbreviations

There was only one buffer open at the time. To confirm, I opened another groovy file and tried the specified command and got the response "E474: Invalid argument". The command is accepted with the argument but it does no good.

:verbose abbr
i  wl           @while(){<CR>}<Esc>kf(a<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim                                             
i  tcf          @try{<CR>}catch(){<CR>}finally{<CR>}<Esc>kkkA<CR><C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  tc           @try{<CR>}catch(){<CR>}<Esc>kkA<CR><C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  sw           @switch(){<CR>}<Esc>kf(a<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  sf           @static final <C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  pls          @println ''<Left><C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  plg          @println "${}"<Left><Left><C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  pl           @println <C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  mm           @static main(args){<CR>}<Esc>kA<CR><Tab><C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  ifs          @if(){<CR>}<Esc>kf(a<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  ifes         @if(){<CR>}else{<CR>}<Esc>kkf(a<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  fli          @for(int i = 0; i < ; i++){<CR>}<Esc>kf;f;i<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  fl           @for( in ){<CR>}<Esc>kf(a<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  dcp          @this.class.classLoader.rootLoader.addURL(new URL('file:///'))<Esc>F'i<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim
i  cl           @class {<CR>}<Esc>kf{i<C-R>=<SNR>24_RemoveSpace()<CR>
        Last set from <root>/vim-7.2/share/vim/vim72/syntax/groovy.vim

-----Original Message-----
From: Tony Mechelynck [mailto:antoine.mechelynck@gmail.com]
Sent: Mon 6/6/2011 10:38 PM
To: vim_use@googlegroups.com
Cc: Moszkowicz, Uri
Subject: Re: Unable to clear abbreviations

On 07/06/11 02:48, Moszkowicz Uri wrote:
> I'm trying to clear abbreviations set by my syntax file but am unable
> to. How do I do this?
>
> In a groovy file, ":ab" returns:
>
> i  wl           @while(){<CR>}<Esc>kf(a<C-R>=<SNR>24_RemoveSpace()<CR>
> i  tcf          @try{<CR>}catch(){<CR>}finally{<CR>}<Esc>kkkA<CR><C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  tc           @try{<CR>}catch(){<CR>}<Esc>kkA<CR><C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  sw           @switch(){<CR>}<Esc>kf(a<C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  sf           @static final<C-R>=<SNR>24_RemoveSpace()<CR>
> i  pls          @println ''<Left><C-R>=<SNR>24_RemoveSpace()<CR>
> i  plg          @println "${}"<Left><Left><C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  pl           @println<C-R>=<SNR>24_RemoveSpace()<CR>
> i  mm           @static main(args){<CR>}<Esc>kA<CR><Tab><C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  ifs          @if(){<CR>}<Esc>kf(a<C-R>=<SNR>24_RemoveSpace()<CR>
> i  ifes         @if(){<CR>}else{<CR>}<Esc>kkf(a<C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  fli          @for(int i = 0; i<  ; i++){<CR>}<Esc>kf;f;i<C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  fl           @for( in ){<CR>}<Esc>kf(a<C-
> R>=<SNR>24_RemoveSpace()<CR>
> i  dcp          @this.class.classLoader.rootLoader.addURL(new
> URL('file:///'))<Esc>F'i<C-R>=<SNR>24_RemoveSpace()<CR>
>
> Running ":abclear" and then ":ab" again yields the same result.
> Running ":unabbreviate pl" returns:
>
> "E24: No such abbreviation"
>
> Very frustrating! Hard to imagine but I just want to simply turn off
> all abbreviations everywhere all the time permanently with no
> questions, exceptions, or fuss. Maybe abclear is supposed to do that
> and this is just a bug?
>

All those abbreviations seem to be buffer-local insert-mode
abbreviations. What happens if you make sure the file to which they
apply is the current editfile, and then use

        :iabclear <buffer>
        :verbose abbr

? (type <buffer> just like that: 8 characters)

Best regards,
Tony.
--
If you perceive that there are four possible ways in which a procedure
can go wrong, and circumvent these, then a fifth way will promptly
develop.


--
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

No comments: