neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

sql.vim (1120B)


      1 " Vim syntax file loader
      2 " Language:    SQL
      3 " Maintainer:  David Fishburn <fishburn at ianywhere dot com>
      4 " Last Change: Thu Sep 15 2005 10:30:02 AM
      5 " Version:     1.0
      6 
      7 " Description: Checks for a:
      8 "                  buffer local variable,
      9 "                  global variable,
     10 "              If the above exist, it will source the type specified.
     11 "              If none exist, it will source the default sql.vim file.
     12 "
     13 " quit when a syntax file was already loaded
     14 if exists("b:current_syntax")
     15    finish
     16 endif
     17 
     18 " Default to the standard Vim distribution file
     19 let filename = 'sqloracle'
     20 
     21 " Check for overrides.  Buffer variables have the highest priority.
     22 if exists("b:sql_type_override")
     23    " Check the runtimepath to see if the file exists
     24    if globpath(&runtimepath, 'syntax/'.b:sql_type_override.'.vim') != ''
     25        let filename = b:sql_type_override
     26    endif
     27 elseif exists("g:sql_type_default")
     28    if globpath(&runtimepath, 'syntax/'.g:sql_type_default.'.vim') != ''
     29        let filename = g:sql_type_default
     30    endif
     31 endif
     32 
     33 " Source the appropriate file
     34 exec 'runtime syntax/'.filename.'.vim'
     35 
     36 " vim:sw=4: