blob: 4f82b96a55507e8bf3ca778e4ab470dcf3ce81d4 [file] [log] [blame]
Bram Moolenaar0fd92892006-03-09 22:27:48 +00001" Vim indent file loader
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00002" Language: SQL
Bram Moolenaar0fd92892006-03-09 22:27:48 +00003" Maintainer: David Fishburn <fishburn at ianywhere dot com>
4" Last Change: Thu Sep 15 2005 10:27:51 AM
5" Version: 1.0
6" Download: http://vim.sourceforge.net/script.php?script_id=495
7
8" Description: Checks for a:
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00009" buffer local variable,
10" global variable,
Bram Moolenaar0fd92892006-03-09 22:27:48 +000011" If the above exist, it will source the type specified.
12" If none exist, it will source the default sqlanywhere.vim file.
13
14
15" Only load this indent file when no other was loaded.
16if exists("b:did_indent")
17 finish
18endif
19
20" Default to the standard Vim distribution file
21let filename = 'sqlanywhere'
22
23" Check for overrides. Buffer variables have the highest priority.
24if exists("b:sql_type_override")
25 " Check the runtimepath to see if the file exists
26 if globpath(&runtimepath, 'indent/'.b:sql_type_override.'.vim') != ''
27 let filename = b:sql_type_override
28 endif
29elseif exists("g:sql_type_default")
30 if globpath(&runtimepath, 'indent/'.g:sql_type_default.'.vim') != ''
31 let filename = g:sql_type_default
32 endif
33endif
34
35" Source the appropriate file
36exec 'runtime indent/'.filename.'.vim'
37
38
Bram Moolenaara7241f52008-06-24 20:39:31 +000039" vim:sw=4: