Home Explore Blog CI



neovim

9th chunk of `runtime/doc/ft_sql.txt`
b818756bd70f609a090bb346ceaa14ab73e709ce1af1e3d50000000100000e57

------------------------------------------------------------------------------
4.4 Completion Customization			*sql-completion-customization*

The SQL completion plugin can be customized through various options set in
your |init.vim|: >
    omni_sql_no_default_maps
<       - Default: This variable is not defined
	- If this variable is defined, no maps are created for OMNI
	  completion.  See |sql-completion-maps| for further discussion.
>
    omni_sql_use_tbl_alias
<	- Default: a
	- This setting is only used when generating a comma-separated
	  column list.	By default the map is <C-C>l.  When generating
	  a column list, an alias can be prepended to the beginning of each
	  column, for example:	e.emp_id, e.emp_name.  This option has three
	  settings: >
		n - do not use an alias
		d - use the default (calculated) alias
		a - ask to confirm the alias name
<
	  An alias is determined following a few rules:
	       1.  If the table name has an '_', then use it as a separator: >
		   MY_TABLE_NAME --> MTN
		   my_table_name --> mtn
		   My_table_NAME --> MtN
<	       2.  If the table name does NOT contain an '_', but DOES use
		   mixed case then the case is used as a separator: >
		   MyTableName --> MTN
<	       3.  If the table name does NOT contain an '_', and does NOT
		   use mixed case then the first letter of the table is used: >
		   mytablename --> m
		   MYTABLENAME --> M

    omni_sql_ignorecase
<	- Default: Current setting for 'ignorecase'
	- Valid settings are 0 or 1.
	- When entering a few letters before initiating completion, the list
	  will be filtered to display only the entries which begin with the
	  list of characters.  When this option is set to 0, the list will be
	  filtered using case sensitivity. >

    omni_sql_include_owner
<	- Default: 0, unless dbext.vim 3.00 has been installed
	- Valid settings are 0 or 1.
	- When completing tables, procedure or views and using dbext.vim 3.00
	  or higher the list of objects will also include the owner name.
	  When completing these objects and omni_sql_include_owner is enabled
	  the owner name will be replaced. >

    omni_sql_precache_syntax_groups
<	- Default:
	  ['syntax','sqlKeyword','sqlFunction','sqlOption','sqlType','sqlStatement']
	- sqlcomplete can be used in conjunction with other completion
	  plugins.  This is outlined at |sql-completion-filetypes|.  When the
	  filetype is changed temporarily to SQL, the sqlcompletion plugin
	  will cache the syntax groups listed in the List specified in this
	  option.


------------------------------------------------------------------------------
4.5 SQL Maps					*sql-completion-maps*

The default SQL maps have been described in other sections of this document in
greater detail.  Here is a list of the maps with a brief description of each.

Static Maps ~

These are maps which use populate the completion list using Vim's syntax
highlighting rules. >
    <C-C>a
<       - Displays all SQL syntax items. >
    <C-C>k
<       - Displays all SQL syntax items defined as 'sqlKeyword'. >
    <C-C>f
<       - Displays all SQL syntax items defined as 'sqlFunction. >
    <C-C>o
<       - Displays all SQL syntax items defined as 'sqlOption'. >
    <C-C>T
<       - Displays all SQL syntax items defined as 'sqlType'. >
    <C-C>s
<       - Displays all SQL syntax items defined as 'sqlStatement'. >

Dynamic Maps ~

These are maps which use populate the completion list using the dbext.vim
plugin. >
    <C-C>t
<       - Displays a list of tables. >
    <C-C>p
<       - Displays a list of procedures. >
    <C-C>v
<       - Displays a list of views. >
    <C-C>c
<       - Displays a list of columns for a specific

Title: SQL Completion Customization Options and Default Maps
Summary
This section details various options for customizing the SQL completion plugin through settings in `init.vim`, including options to disable default OMNI completion maps (`omni_sql_no_default_maps`), control table alias usage when generating column lists (`omni_sql_use_tbl_alias`), manage case sensitivity (`omni_sql_ignorecase`), include owner names in completion lists (`omni_sql_include_owner`), and pre-cache syntax groups (`omni_sql_precache_syntax_groups`). It also lists the default SQL maps available, categorizing them as static (using Vim's syntax highlighting) and dynamic (using the dbext.vim plugin) and briefly describes their function.