annotate runtime/indent/sql.vim @ 27970:212c5894b8b1 v8.2.4510

patch 8.2.4510: Vim9: shortening commands leads to confusing script Commit: https://github.com/vim/vim/commit/204852ae2adfdde10c656ca7f14e5b4207a69172 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 5 12:56:44 2022 +0000 patch 8.2.4510: Vim9: shortening commands leads to confusing script Problem: Vim9: shortening commands leads to confusing script. Solution: In Vim9 script require at least ":cont" for ":continue", "const" instead of "cons", "break" instead of "brea", "catch" instead of "cat", "else" instead of "el" "elseif" instead of "elsei" "endfor" instead of "endfo" "endif" instead of "en" "endtry" instead of "endt", "finally" instead of "fina", "throw" instead of "th", "while" instead of "wh".
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Mar 2022 14:00:03 +0100
parents b9740fb41986
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
1 " Vim indent file loader
856
8cd729851562 updated for version 7.0g
vimboss
parents: 718
diff changeset
2 " Language: SQL
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
3 " Maintainer: David Fishburn <fishburn at ianywhere dot com>
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
4 " Last Change: Thu Sep 15 2005 10:27:51 AM
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
5 " Version: 1.0
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
6 " Download: http://vim.sourceforge.net/script.php?script_id=495
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
7
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
8 " Description: Checks for a:
856
8cd729851562 updated for version 7.0g
vimboss
parents: 718
diff changeset
9 " buffer local variable,
8cd729851562 updated for version 7.0g
vimboss
parents: 718
diff changeset
10 " global variable,
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
11 " If the above exist, it will source the type specified.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
12 " If none exist, it will source the default sqlanywhere.vim file.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
13
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
14
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
15 " Only load this indent file when no other was loaded.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
16 if exists("b:did_indent")
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
17 finish
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
18 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
19
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
20 " Default to the standard Vim distribution file
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
21 let filename = 'sqlanywhere'
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
22
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
23 " Check for overrides. Buffer variables have the highest priority.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
24 if exists("b:sql_type_override")
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
25 " Check the runtimepath to see if the file exists
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
26 if globpath(&runtimepath, 'indent/'.b:sql_type_override.'.vim') != ''
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
27 let filename = b:sql_type_override
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
28 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
29 elseif exists("g:sql_type_default")
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
30 if globpath(&runtimepath, 'indent/'.g:sql_type_default.'.vim') != ''
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
31 let filename = g:sql_type_default
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
32 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
33 endif
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
34
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
35 " Source the appropriate file
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
36 exec 'runtime indent/'.filename.'.vim'
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
37
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
38
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 856
diff changeset
39 " vim:sw=4: