| 
									
										
										
										
											2006-03-09 22:37:52 +00:00
										 |  |  | " Vim syntax file loader | 
					
						
							|  |  |  | " Language:    SQL | 
					
						
							|  |  |  | " Maintainer:  David Fishburn <fishburn at ianywhere dot com> | 
					
						
							|  |  |  | " Last Change: Thu Sep 15 2005 10:30:02 AM | 
					
						
							|  |  |  | " Version:     1.0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Description: Checks for a: | 
					
						
							| 
									
										
										
										
											2006-04-30 18:54:39 +00:00
										 |  |  | "                  buffer local variable, | 
					
						
							|  |  |  | "                  global variable, | 
					
						
							| 
									
										
										
										
											2006-03-09 22:37:52 +00:00
										 |  |  | "              If the above exist, it will source the type specified. | 
					
						
							|  |  |  | "              If none exist, it will source the default sql.vim file. | 
					
						
							|  |  |  | " | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | " quit when a syntax file was already loaded | 
					
						
							|  |  |  | if exists("b:current_syntax") | 
					
						
							| 
									
										
										
										
											2006-03-09 22:37:52 +00:00
										 |  |  |     finish | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-03-09 22:37:52 +00:00
										 |  |  | " Default to the standard Vim distribution file | 
					
						
							|  |  |  | let filename = 'sqloracle' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Check for overrides.  Buffer variables have the highest priority. | 
					
						
							|  |  |  | if exists("b:sql_type_override") | 
					
						
							|  |  |  |     " Check the runtimepath to see if the file exists | 
					
						
							|  |  |  |     if globpath(&runtimepath, 'syntax/'.b:sql_type_override.'.vim') != '' | 
					
						
							|  |  |  |         let filename = b:sql_type_override | 
					
						
							|  |  |  |     endif | 
					
						
							|  |  |  | elseif exists("g:sql_type_default") | 
					
						
							|  |  |  |     if globpath(&runtimepath, 'syntax/'.g:sql_type_default.'.vim') != '' | 
					
						
							|  |  |  |         let filename = g:sql_type_default | 
					
						
							|  |  |  |     endif | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-03-09 22:37:52 +00:00
										 |  |  | " Source the appropriate file | 
					
						
							|  |  |  | exec 'runtime syntax/'.filename.'.vim' | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-24 22:58:06 +00:00
										 |  |  | " vim:sw=4: |