Re: debianized vim

2002-03-19 Thread Harry Putnam
Thanks posters, removing the gzip stuff solved the problem




Re: debianized vim

2002-03-18 Thread Seneca Cunningham
news [EMAIL PROTECTED]; on behalf of; Harry Putnam
[EMAIL PROTECTED]
> Setup: Woody/testing
>
> After installing vim with apt-get, I find that the debianizations that

So, vim 6.

> have been done cause sections of my .vimrc, built up over time on
> several different platforms to be unusable.
[...]
> Some thing in this code cause a mess with debians setup.  The
> helpfiles when accessed in the normal way inside vim with :h 
> give this warning and then appear in binary.
>
>Error detected while processing function GZIP_read:
>line3:
>E21: Cannot make changes, 'modifiable' is off
>E434: Can't find tag pattern
> When I hit `enter' the file appears in binary format.

This looks familiar...

> Maybe my code can just be edited somehow so there is no conflict.
> Otherwise I'd like to gunzip the helpfiles and redo the tags stuff.

Now I remeber where I saw it... I saw it after I had upgraded from vim 5
to vim 6. To get the helptext back, I looked at the default vimrc
provided for vim 6. The ending of my vimrc now is:

if has("autocmd")
 filetype plugin on

Seneca
[EMAIL PROTECTED]



Re: debianized vim

2002-03-18 Thread dman
On Mon, Mar 18, 2002 at 06:14:19PM -0800, Harry Putnam wrote:
| Setup: Woody/testing
| 
| After installing vim with apt-get, I find that the debianizations that
| have been done cause sections of my .vimrc, built up over time on
| several different platforms to be unusable.
| 
| I don't really know exactly what these do, some are borrowed from
| .vimrcs of others more knowledgable than I.
...
| I don't remember how to regenerate it, so that I can gunzip the
| helpfiles, retagify, and then be able to use my old code that allows
| writing to gzip files.
...
| Maybe my code can just be edited somehow so there is no conflict.

Yes -- just remove all your autocommands for handling gzip or bzip
files.  As of version 6, vim now knows how to do that on its own.  (I
think it is a "plugin", actually, but all the same you don't need to
do anything for editing gzipped files to work).

BTW, it looks like you got that snippet of code from the system-wide
vimrc from the old debian packages.  That piece of code isn't in the
new package because it isn't needed any more (and no longer works in
all cases, as you've noticed).

-D

-- 

Do not be afraid of those who kill the body but cannot kill the soul.
Rather be afraid of the One who can destroy both soul and body in hell.
Matthew 10:28



Re: debianized vim

2002-03-18 Thread Ben Collins
> Conflicting code:
>  augroup gzip
>   " Remove all gzip autocommands
>   au!

Remove all this junk, vim has this built-in now.

-- 
 .--===-=-==-=---==-=-.
/   Ben Collins--Debian GNU/Linux--WatchGuard.com  \
`  [EMAIL PROTECTED]   --   [EMAIL PROTECTED]   '
 `---=--===-=-=-=-===-==---=--=---'



debianized vim

2002-03-18 Thread Harry Putnam
Setup: Woody/testing

After installing vim with apt-get, I find that the debianizations that
have been done cause sections of my .vimrc, built up over time on
several different platforms to be unusable.

I don't really know exactly what these do, some are borrowed from
.vimrcs of others more knowledgable than I.

The debian install seems to have pre-empted local vimrcs by changing
the way vim is installed, compared to how a source build would work.

Debians method of keeping all helpfiles in gzipped format seems to be
the source of my problem, but just gunzipping them doesn't solve it.
Apparently somekind of pointers are contained in a `tags file', that
isn't really named in this exerpt from /etc/vim/vimrc:
  " 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

I don't remember how to regenerate it, so that I can gunzip the
helpfiles, retagify, and then be able to use my old code that allows
writing to gzip files.

Some thing in this code cause a mess with debians setup.  The
helpfiles when accessed in the normal way inside vim with :h 
give this warning and then appear in binary.

   Error detected while processing function GZIP_read:
   line3:
   E21: Cannot make changes, 'modifiable' is off
   E434: Can't find tag pattern
When I hit `enter' the file appears in binary format.

Maybe my code can just be edited somehow so there is no conflict.
Otherwise I'd like to gunzip the helpfiles and redo the tags stuff.



Conflicting code:
 augroup gzip
  " Remove all gzip autocommands
  au!

  " Enable editing of gzipped files
  " set binary mode before reading the file
  autocmd BufReadPre,FileReadPre*.gz,*.bz2 set bin
  autocmd BufReadPost,FileReadPost  *.gz call GZIP_read("gunzip")
  autocmd BufReadPost,FileReadPost  *.bz2 call GZIP_read("bunzip2")
  autocmd BufWritePost,FileWritePost*.gz call GZIP_write("gzip")
  autocmd BufWritePost,FileWritePost*.bz2 call GZIP_write("bzip2")
  autocmd FileAppendPre *.gz call GZIP_appre("gunzip")
  autocmd FileAppendPre *.bz2 call GZIP_appre("bunzip2")
  autocmd FileAppendPost*.gz call GZIP_write("gzip")
  autocmd FileAppendPost*.bz2 call GZIP_write("bzip2")

  " After reading compressed file: Uncompress text in buffer with "cmd"
  fun! GZIP_read(cmd)
let ch_save = &ch
set ch=2
execute "'[,']!" . a:cmd
set nobin
let &ch = ch_save
execute ":doautocmd BufReadPost " . expand("%:r")
  endfun

  " After writing compressed file: Compress written file with "cmd"
  fun! GZIP_write(cmd)
if rename(expand(""), expand(":r")) == 0
  execute "!" . a:cmd . " :r"
endif
  endfun

  " Before appending to compressed file: Uncompress file with "cmd"
  fun! GZIP_appre(cmd)
execute "!" . a:cmd . " "
call rename(expand(":r"), expand(""))
  endfun
augroup END