To: vim-dev@vim.org Subject: Patch 6.1a.039 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1a.039 Problem: Not all visual basic files are recognized. Solution: Add checks to catch *.ctl files. (Raul Segura Acevedo) Files: runtime/filetype.vim *** ../vim61a.038/runtime/filetype.vim Tue Feb 26 17:07:10 2002 --- runtime/filetype.vim Fri Mar 1 21:48:28 2002 *************** *** 1,7 **** " Vim support file to detect file types " " Maintainer: Bram Moolenaar ! " Last change: 2002 Feb 26 " 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 ! " Last change: 2002 Mar 01 " Listen very carefully, I will say this only once if exists("did_load_filetypes") *************** *** 172,178 **** " Check if one of the first five lines contains "VB_Name". In that case it is " probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype. fun! FTVB(alt) ! if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.Form' setf vb else exe "setf " . a:alt --- 172,178 ---- " Check if one of the first five lines contains "VB_Name". In that case it is " probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype. fun! FTVB(alt) ! if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' setf vb else exe "setf " . a:alt *************** *** 180,186 **** endfun " Visual Basic Script (close to Visual Basic) ! au BufNewFile,BufRead *.vbs,*.dsm setf vb " Batch file for MSDOS (*.cmd is close enough) au BufNewFile,BufRead *.bat,*.cmd,*.sys setf dosbatch --- 180,186 ---- endfun " Visual Basic Script (close to Visual Basic) ! au BufNewFile,BufRead *.vbs,*.dsm,*.ctl setf vb " Batch file for MSDOS (*.cmd is close enough) au BufNewFile,BufRead *.bat,*.cmd,*.sys setf dosbatch *** ../vim61a.038/src/version.c Fri Mar 8 21:06:17 2002 --- src/version.c Sat Mar 9 14:29:22 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 39, /**/ -- hundred-and-one symptoms of being an internet addict: 211. Your husband leaves you...taking the computer with him and you call him crying, and beg him to bring the computer back. /// Bram Moolenaar -- Bram@moolenaar.net -- 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 ///