On 27/09/09 17:02, Erich Hoffmann wrote:
>
> Hello all
>
> I don't know what i did, but all of a sudden gvim slows down when I
> start it or stop it.  How can I find out what is happening?
>
> The only changement to the configuration files was that I started to
> edit abc music files, and as abc notation does only accept 8bit input, I
> put into startup
>
>
> """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
> "                                                                      abc
> " if has("autocmd")
> " :augroup abc
> " :       autocmd BufNewFile,BufRead *.abc setf abc
> " :       autocmd BufNewFile,BufRead,BufEnter *.abc set encoding=latin1
> " :       autocmd BufNewFile,BufRead,BufEnter *.abc set fileencoding=latin1
> " :augroup END
> " endif
> """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
>
> Well, I commented that out, no change.
>
> What I need as help is a method how to proceed to find where the flaw
> is.
>
> Any suggestions?
>
> Cheers anyway, erich

Leave these autocommands commented out, because:
- setf abc already exists in $VIMRUNTIME/filetype.vim -- no need to 
duplicate it
- It is VERY DANGEROUS to change 'encoding' in a running Vim: it could 
make all the text in any loaded buffers invalid with no warning. You 
should have at most one ":set enc=..." statement, and that in the vimrc. 
See http://vim.wikia.org/wiki/Working_with_Unicode for details (some of 
which apply also to non-Unicode)
- it is too late at BufRead (= BufReadPost) to set which 'fileencoding' 
to use for an existing file, because by that time it is already read. At 
most (but I don't recommend it) you could set the following:

augroup abc
        autocmd BufNewFile *.abc set fenc=latin1
        autocmd BufReadCmd *.abc e ++enc=latin1 <afile>
augroup END

The above disregards any ++enc / ++ff arguments in an :e command for an 
existing *.abc file, which might not be what you want (see ":help 
v:cmdarg").


Best regards,
Tony.
-- 
When two people are under the influence of the most violent, most
insane, most delusive, and most transient of passions, they are
required to swear that they will remain in that excited, abnormal, and
exhausting condition continuously until death do them part.
                -- George Bernard Shaw

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to