Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > da1cd862f68e9a90976a3d97518eaa8a > files > 7

vim-7.2.065-9.4mdv2009.0.src.rpm

--- runtime/syntax/outline.vim.tv	2002-11-01 14:38:26.000000000 -0500
+++ runtime/syntax/outline.vim	2002-11-01 15:31:00.000000000 -0500
@@ -0,0 +1,23 @@
+" Filename:    outline.vim
+" Purpose:     Vim syntax file
+" Language:    outline: emacs TODO lists
+" Maintainer:  Thierry Vignaud tvignaud@mandrakesoft.com
+" URL:         <none>
+" Last Change: Thu Oct 31 2002 <tvignaud@mandrakesoft.com>
+
+" For version 6.x: Quit when a syntax file was already loaded
+if exists("b:current_syntax")
+  finish
+endif
+
+"syn sync minlines=1000
+
+syn region EmacsMode oneline matchgroup=Comment start='-\*-\soutline\s-\*-' end='$'
+syn region FirstLevel oneline matchgroup=Function start='^\*[^*]' end='$'
+syn region SecondLevel oneline matchgroup=Structure start='^\*\*[^*]' end='$'
+syn region ThirdLevel oneline matchgroup=Statement start='^\*\*\*[^*]' end='$'
+syn region OtherLevels oneline matchgroup=Type start='^\*\{4,\}[^*]' end='$'
+
+let b:current_syntax = "outline"
+
+" vim: ts=8
--- runtime/filetype.vim.tv	2002-11-01 14:38:20.000000000 -0500
+++ runtime/filetype.vim	2002-11-01 14:42:22.000000000 -0500
@@ -726,6 +726,18 @@
 " Delphi project file
 au BufNewFile,BufRead *.dpr			setf pascal
 
+" outline emacs file (TODO lists, ...)
+au BufNewFile,BufRead *		call FTCheck_outline()
+
+fun! FTCheck_outline()
+  " recognize Prolog by specific text in the first non-empty line
+  " require a blank after the '%' because Perl uses "%list" and "%translate"
+  let l = getline(nextnonblank(1))
+  if l =~ '-\*-\soutline\s-\*-'
+    setf outline
+  endif
+endfun
+
 " Perl
 if has("fname_case")
   au BufNewFile,BufRead *.pl,*.PL		call FTCheck_pl()