Subject: pkg/8002: vim syntax highlighting enhancements for Python & Oracle SQL
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: netbsd-bugs
Date: 07/15/1999 03:21:00
>Number:         8002
>Category:       pkg
>Synopsis:       vim syntax highlighting enhancements for Python & Oracle SQL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 15 03:20:01 1999
>Last-Modified:
>Originator:     Jaromir Dolecek
>Organization:
	ICS MU, Brno, Czech Republic
>Release:        NetBSD-1.4D
>Environment:
	
System: NetBSD jdolecek.per4mance.cz 1.4D NetBSD 1.4D (JDOLECEK) #3: Wed Jul 7 15:21:47 MEST 1999 dolecek@jdolecek.per4mance.cz:/usr/src/sys/arch/i386/compile/JDOLECEK i386


>Description:
	I found it irritating my python scripts w/o suffix .py are
	not syntax highlighted.
	While editing some sql scripts, I also found some keywords
	are not properly highlighted.
>How-To-Repeat:
	vim some_python_script
	vim oracle8i_sql_code
>Fix:
	The change to scripts.vim has been submitted some time ago
	to vim maintainer and will be in next version.
	The sql.vim change has been send to it's mantainer just today,
	no reply yet.
--- sql.vim.orig	Fri Jul  9 11:31:44 1999
+++ sql.vim	Tue Jul 13 10:36:01 1999
@@ -1,7 +1,7 @@
 " Vim syntax file
-" Language:	SQL (Oracle 7)
+" Language:	SQL, PL/SQL (Oracle 8i)
 " Maintainer:	Paul Moore <gustav@morpheus.demon.co.uk>
-" Last change:	1997 April 20
+" Last change:	1999 March 18
 
 " Remove any old syntax stuff hanging around
 syn clear
@@ -10,34 +10,34 @@ syn case ignore
 
 " The SQL reserved words, defined as keywords.
 
-syn keyword sqlSpecial   null
+syn keyword sqlSpecial  false null true
 
-syn keyword sqlKeyword	access add as asc by check cluster column
-syn keyword sqlKeyword	compress connect current decimal default
-syn keyword sqlKeyword	desc else exclusive file for from group
-syn keyword sqlKeyword	having identified immediate increment index
-syn keyword sqlKeyword	initial into is level maxextents mode modify
+syn keyword sqlKeyword	access add as asc begin by check cluster column
+syn keyword sqlKeyword	compress connect current cursor decimal default desc
+syn keyword sqlKeyword	else elsif end exception exclusive file for from
+syn keyword sqlKeyword	function group having identified if immediate increment
+syn keyword sqlKeyword	index initial into is level loop maxextents mode modify
 syn keyword sqlKeyword	nocompress nowait of offline on online start
 syn keyword sqlKeyword	successful synonym table then to trigger uid
 syn keyword sqlKeyword	unique user validate values view whenever
-syn keyword sqlKeyword	where with option order pctfree privileges
-syn keyword sqlKeyword	public resource row rowlabel rownum rows
-syn keyword sqlKeyword	session share size smallint
+syn keyword sqlKeyword	where with option order pctfree privileges procedure
+syn keyword sqlKeyword	public resource return row rowlabel rownum rows
+syn keyword sqlKeyword	session share size smallint type using 
 
 syn keyword sqlOperator	not and or
 syn keyword sqlOperator	in any some all between exists
 syn keyword sqlOperator	like escape
-syn keyword sqlOperator  union intersect minus
-syn keyword sqlOperator  prior distinct
-syn keyword sqlOperator	sysdate
-
-syn keyword sqlStatement	alter analyze audit comment commit create
-syn keyword sqlStatement	delete drop explain grant insert lock noaudit
-syn keyword sqlStatement	rename revoke rollback savepoint select set
+syn keyword sqlOperator union intersect minus
+syn keyword sqlOperator prior distinct
+syn keyword sqlOperator	sysdate out
+
+syn keyword sqlStatement alter analyze audit comment commit create
+syn keyword sqlStatement delete drop execute explain grant insert lock noaudit
+syn keyword sqlStatement rename revoke rollback savepoint select set
 syn keyword sqlStatement truncate update
 
-syn keyword sqlType		char character date long raw mlslabel number
-syn keyword sqlType		rowid varchar varchar2 float integer
+syn keyword sqlType	boolean char character date float integer long
+syn keyword sqlType	mlslabel number raw rowid varchar varchar2 varray
 
 " Strings and characters:
 syn region sqlString		start=+"+  skip=+\\\\\|\\"+  end=+"+
--- scripts.vim.orig	Thu Jul 15 12:01:34 1999
+++ scripts.vim	Fri Jul  9 11:31:44 1999
@@ -63,6 +63,10 @@ if !has("syntax_items")
   elseif getline(1) =~ '^#!.*[/\\][^/\\]*perl[^/\\]*\>'
     so <sfile>:p:h/perl.vim
 
+  " Python
+  elseif getline(1) =~ '^#!.*[/\\][^/\\]*python[^/\\]*\>'
+    so <sfile>:p:h/python.vim
+
   " Vim scripts (must have '" vim' as the first line to trigger this)
   elseif getline(1) =~ '^" *[vV]im$'
     so <sfile>:p:h/vim.vim
>Audit-Trail:
>Unformatted: