Loading ...
Sorry, an error occurred while loading the content.

Patch 6.1.055

Expand Messages
  • Bram Moolenaar
    Patch 6.1.055 Problem: When editing a compressed file, Vim will inspect the contents to guess the filetype. Solution: Don t source scripts.vim for .Z,
    Message 1 of 1 , May 6, 2002
    • 0 Attachment
      Patch 6.1.055
      Problem: When editing a compressed file, Vim will inspect the contents to
      guess the filetype.
      Solution: Don't source scripts.vim for .Z, .gz, .bz2, .zip and .tgz files.
      Files: runtime/filetype.vim, runtime/plugin/gzip.vim


      *** ../vim61.054/runtime/filetype.vim Tue Apr 23 21:22:42 2002
      --- runtime/filetype.vim Mon May 6 22:16:57 2002
      ***************
      *** 1,7 ****
      " Vim support file to detect file types
      "
      " Maintainer: Bram Moolenaar <Bram@...>
      ! " Last change: 2002 Apr 23

      " Listen very carefully, I will say this only once
      if exists("did_load_filetypes")
      --- 1,7 ----
      " Vim support file to detect file types
      "
      " Maintainer: Bram Moolenaar <Bram@...>
      ! " Last change: 2002 May 06

      " Listen very carefully, I will say this only once
      if exists("did_load_filetypes")
      ***************
      *** 31,36 ****
      --- 31,41 ----
      \ exe "doau filetypedetect BufRead " . expand("<afile>:r") |
      \ endif

      + " Pattern used to match file names which should not be inspected.
      + " Currently finds compressed files.
      + if !exists("g:ft_ignore_pat")
      + let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
      + endif

      " Abaqus or Trasys
      au BufNewFile,BufRead *.inp call FTCheck_inp()
      ***************
      *** 1286,1294 ****

      " Check for "*" after loading myfiletypefile, so that scripts.vim is only used
      " when there are no matching file name extensions.
      augroup filetypedetect
      ! au BufNewFile,BufRead,StdinReadPost *
      ! \ if !did_filetype() | runtime! scripts.vim | endif


      " Extra checks for when no filetype has been detected now. Mostly used for
      --- 1303,1314 ----

      " Check for "*" after loading myfiletypefile, so that scripts.vim is only used
      " when there are no matching file name extensions.
      + " Don't do this for compressed files.
      augroup filetypedetect
      ! au BufNewFile,BufRead *
      ! \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
      ! \ | runtime! scripts.vim | endif
      ! au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif


      " Extra checks for when no filetype has been detected now. Mostly used for
      ***************
      *** 1365,1371 ****

      " Generic configuration file (check this last, it's just guessing!)
      au BufNewFile,BufRead,StdinReadPost *
      ! \ if !did_filetype()
      \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'
      \ || getline(4) =~ '^#' || getline(5) =~ '^#') |
      \ setf conf |
      --- 1385,1391 ----

      " Generic configuration file (check this last, it's just guessing!)
      au BufNewFile,BufRead,StdinReadPost *
      ! \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
      \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'
      \ || getline(4) =~ '^#' || getline(5) =~ '^#') |
      \ setf conf |
      *** ../vim61.054/runtime/plugin/gzip.vim Thu Sep 20 19:57:29 2001
      --- runtime/plugin/gzip.vim Mon May 6 21:57:53 2002
      ***************
      *** 1,6 ****
      " Vim plugin for editing compressed files.
      " Maintainer: Bram Moolenaar <Bram@...>
      ! " Last Change: 2001 Sep 20

      " Exit quickly when:
      " - this plugin was already loaded
      --- 1,6 ----
      " Vim plugin for editing compressed files.
      " Maintainer: Bram Moolenaar <Bram@...>
      ! " Last Change: 2002 May 06

      " Exit quickly when:
      " - this plugin was already loaded
      ***************
      *** 86,92 ****
      let &l:ma = ma_save
      " When uncompressed the whole buffer, do autocommands
      if empty
      ! execute ":silent! doau BufReadPost " . expand("%:r")
      endif
      endfun

      --- 86,96 ----
      let &l:ma = ma_save
      " When uncompressed the whole buffer, do autocommands
      if empty
      ! if &verbose >= 8
      ! execute "doau BufReadPost " . expand("%:r")
      ! else
      ! execute "silent! doau BufReadPost " . expand("%:r")
      ! endif
      endif
      endfun

      *** ../vim61.054/src/version.c Sun May 5 22:51:14 2002
      --- src/version.c Mon May 6 22:12:26 2002
      ***************
      *** 608,609 ****
      --- 608,611 ----
      { /* Add new patch number below this line */
      + /**/
      + 55,
      /**/

      --
      [The rest of the ARMY stand around looking at a loss.]
      INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on!
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.