Last active
July 17, 2024 10:18
-
-
Save tomiyap/db222e640e4254846541083a7bba570f to your computer and use it in GitHub Desktop.
Sublime Text Autocomplete for SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Place this inside ~/Library/Application Support/Sublime Text/Packages/ | |
//This is for SQL, so the file type of the new file must be .sql. | |
//You might need to add this if autocomplete doesn't appear | |
//Put in ~/Library/Application Support/Sublime Text/Packages/user/Preferences.sublime-settings | |
//{ | |
// "auto_complete_selector": "source, text" | |
//} | |
//Sublime Package goes into /Sublime Text 3/Package Contents/Contents/MacOS/Packages | |
// C:/Program Files/Sublime Text 3/Packages/ | |
{ | |
"scope": "source.sql - string.quoted.double.sql", | |
"completions": | |
[ | |
"ALL ", | |
"ALTER ", | |
"AND ", | |
"ANY ", | |
"AS ", | |
"ASC ", | |
"AVG ", | |
"BETWEEN ", | |
"COMMIT ", | |
"COUNT ", | |
"CREATE ", | |
"DATABASE ", | |
"DELETE ", | |
"DESC ", | |
"DISTINCT ", | |
"DROP ", | |
"EXISTS ", | |
"FROM ", | |
"GROUP BY ", | |
"HAVING ", | |
"IN ", | |
"INDEX ", | |
"INNER JOIN ", | |
"INSERT ", | |
"IS NULL", | |
"LIKE ", | |
"LIMIT ", | |
"MAX ", | |
"MIN ", | |
"NOT ", | |
"OR ", | |
"ORDER BY ", | |
"OUTER JOIN ", | |
"RENAME TO ", | |
"ROLLBACK", | |
"ROUND ", | |
"SELECT ", | |
"SUM ", | |
"TABLE ", | |
"TRUNCATE ", | |
"UNIQUE ", | |
"UPDATE ", | |
"USE ", | |
"VIEW ", | |
"WHERE ", | |
"bigint", | |
"int", | |
"smallint", | |
"tinyint", | |
"bit", | |
"decimal", | |
"numeric", | |
"money", | |
"smallmoney", | |
"float", | |
"real", | |
"datetime", | |
"smalldatetime", | |
"date", | |
"time", | |
"char", | |
{"trigger": "varchar", "contents": "varchar($0)"}, | |
"text", | |
"nchar", | |
{"trigger": "nvarchar", "contents": "nvarchar($0)"}, | |
"ntext", | |
"binary", | |
{"trigger": "varbinary", "contents": "varbinary($0)"}, | |
"image", | |
"sql_variant", | |
"timestamp", | |
"uniqueidentifier", | |
"xml", | |
"cursor" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
//Linux: ~/.config/sublime-text/Packages/User/