diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-03 22:21:25 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 00:23:03 +0300 |
| commit | 2eae5db069dc171f74cd863487655f6a88e5384d (patch) | |
| tree | 2d9d05e09978a2a44acbfbb8d651f240df3ca052 /uvim/runtime/doc/ft_sql.txt | |
| parent | 473d922faed49241a5d29d9e37dc4819cd512006 (diff) | |
| download | Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.tar.gz Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.zip | |
NOISSUE rebrand vim to MNV's not Vim
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'uvim/runtime/doc/ft_sql.txt')
| -rw-r--r-- | uvim/runtime/doc/ft_sql.txt | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/uvim/runtime/doc/ft_sql.txt b/uvim/runtime/doc/ft_sql.txt index 2baa36410d..2391b9615d 100644 --- a/uvim/runtime/doc/ft_sql.txt +++ b/uvim/runtime/doc/ft_sql.txt @@ -1,11 +1,11 @@ -*ft_sql.txt* For Vim version 9.2. Last change: 2026 Feb 14 +*ft_sql.txt* For MNV version 9.2. Last change: 2026 Feb 14 by David Fishburn This is a filetype plugin to work with SQL files. The Structured Query Language (SQL) is a standard which specifies statements -that allow a user to interact with a relational database. Vim includes +that allow a user to interact with a relational database. MNV includes features for navigation, indentation and syntax highlighting. 1. Navigation |sql-navigation| @@ -39,7 +39,7 @@ navigation. 1.1 Matchit *sql-matchit* ----------- -The matchit plugin (http://www.vim.org/scripts/script.php?script_id=39) +The matchit plugin (http://www.mnv.org/scripts/script.php?script_id=39) provides many additional features and can be customized for different languages. The matchit plugin is configured by defining a local buffer variable, b:match_words. Pressing the % key while on various @@ -87,7 +87,7 @@ The following keywords are supported: > 1.2 Text Object Motions *sql-object-motions* ----------------------- -Vim has a number of predefined keys for working with text |object-motions|. +MNV has a number of predefined keys for working with text |object-motions|. This filetype plugin attempts to translate these keys to maps which make sense for the SQL language. @@ -108,7 +108,7 @@ objects. Depends on which database vendor you are using, the list of objects must be configurable. The filetype plugin attempts to define many of the standard objects, plus many additional ones. In order to make this as flexible as possible, you can override the list of objects from within your -|vimrc| with the following: > +|mnvrc| with the following: > let g:ftplugin_sql_objects = 'function,procedure,event,table,trigger' .. \ ',schema,service,publication,database,datatype,domain' .. \ ',index,subscription,synchronization,view,variable' @@ -149,7 +149,7 @@ The above will also handle these cases: > ); By default, the ftplugin only searches for CREATE statements. You can also -override this via your |vimrc| with the following: > +override this via your |mnvrc| with the following: > let g:ftplugin_sql_statements = 'create,alter' The filetype plugin defines three types of comments: > @@ -168,7 +168,7 @@ with comments: > 1.4 Macros *sql-macros* ---------- -Vim's feature to find macro definitions, 'define', is supported using this +MNV's feature to find macro definitions, 'define', is supported using this regular expression: > \c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\> @@ -214,12 +214,12 @@ great deal of vendor specific extensions to SQL. Oracle supports the "CREATE OR REPLACE" syntax, column defaults specified in the CREATE TABLE statement and the procedural language (for stored procedures and triggers). -The default Vim distribution ships with syntax highlighting based on Oracle's +The default MNV distribution ships with syntax highlighting based on Oracle's PL/SQL. The default SQL indent script works for Oracle and SQL Anywhere. The default filetype plugin works for all vendors and should remain vendor neutral, but extendable. -Vim currently has support for a variety of different vendors, currently this +MNV currently has support for a variety of different vendors, currently this is via syntax scripts. Unfortunately, to flip between different syntax rules you must either create: 1. New filetypes @@ -227,14 +227,14 @@ you must either create: 3. Manual steps / commands The majority of people work with only one vendor's database product, it would -be nice to specify a default in your |vimrc|. +be nice to specify a default in your |mnvrc|. 2.1 SQLSetType *sqlsettype* *SQLSetType* -------------- For the people that work with many different databases, it is nice to be able to flip between the various vendors rules (indent, syntax) on a per -buffer basis, at any time. The ftplugin/sql.vim file defines this function: > +buffer basis, at any time. The ftplugin/sql.mnv file defines this function: > SQLSetType Executing this function without any parameters will set the indent and syntax @@ -243,9 +243,9 @@ off Vi's compatibility mode, 'compatible', you can use the <Tab> key to complete the optional parameter. After typing the function name and a space, you can use the completion to -supply a parameter. The function takes the name of the Vim script you want to +supply a parameter. The function takes the name of the MNV script you want to source. Using the |cmdline-completion| feature, the SQLSetType function will -search the 'runtimepath' for all Vim scripts with a name containing 'sql'. +search the 'runtimepath' for all MNV scripts with a name containing 'sql'. This takes the guess work out of the spelling of the names. The following are examples: > :SQLSetType @@ -256,14 +256,14 @@ examples: > The easiest approach is to the use <Tab> character which will first complete the command name (SQLSetType), after a space and another <Tab>, display a list -of available Vim script names: > +of available MNV script names: > :SQL<Tab><space><Tab> 2.2 SQLGetType *sqlgettype* *SQLGetType* -------------- At anytime you can determine which SQL dialect you are using by calling the -SQLGetType command. The ftplugin/sql.vim file defines this function: > +SQLGetType command. The ftplugin/sql.mnv file defines this function: > SQLGetType This will echo: > @@ -272,24 +272,24 @@ This will echo: > 2.3 SQL Dialect Default *sql-type-default* ----------------------- -As mentioned earlier, the default syntax rules for Vim is based on Oracle +As mentioned earlier, the default syntax rules for MNV is based on Oracle (PL/SQL). You can override this default by placing one of the following in -your |vimrc|: > +your |mnvrc|: > let g:sql_type_default = 'sqlanywhere' let g:sql_type_default = 'sqlinformix' let g:sql_type_default = 'mysql' -If you added the following to your |vimrc|: > +If you added the following to your |mnvrc|: > let g:sql_type_default = 'sqlinformix' The next time edit a SQL file the following scripts will be automatically -loaded by Vim: > - ftplugin/sql.vim - syntax/sqlinformix.vim - indent/sql.vim +loaded by MNV: > + ftplugin/sql.mnv + syntax/sqlinformix.mnv + indent/sql.mnv > Notice indent/sqlinformix.sql was not loaded. There is no indent file -for Informix, Vim loads the default files if the specified files does not +for Informix, MNV loads the default files if the specified files does not exist. @@ -297,7 +297,7 @@ exist. 3. Adding new SQL Dialects *sql-adding-dialects* If you begin working with a SQL dialect which does not have any customizations -available with the default Vim distribution you can check http://www.vim.org +available with the default MNV distribution you can check http://www.mnv.org to see if any customization currently exist. If not, you can begin by cloning an existing script. Read |filetype-plugins| for more details. @@ -305,11 +305,11 @@ To help identify these scripts, try to create the files with a "sql" prefix. If you decide you wish to create customizations for the SQLite database, you can create any of the following: > Unix - ~/.vim/syntax/sqlite.vim - ~/.vim/indent/sqlite.vim + ~/.mnv/syntax/sqlite.mnv + ~/.mnv/indent/sqlite.mnv Windows - $VIM/vimfiles/syntax/sqlite.vim - $VIM/vimfiles/indent/sqlite.vim + $MNV/mnvfiles/syntax/sqlite.mnv + $MNV/mnvfiles/indent/sqlite.mnv No changes are necessary to the SQLSetType function. It will automatically pick up the new SQL files and load them when you issue the SQLSetType command. @@ -319,8 +319,8 @@ pick up the new SQL files and load them when you issue the SQLSetType command. 4. OMNI SQL Completion *sql-completion* *omni-sql-completion* -Vim 7 includes a code completion interface and functions which allows plugin -developers to build in code completion for any language. Vim 7 includes +MNV 7 includes a code completion interface and functions which allows plugin +developers to build in code completion for any language. MNV 7 includes code completion for the SQL language. There are two modes to the SQL completion plugin, static and dynamic. The @@ -342,7 +342,7 @@ The defaults static maps are: > imap <buffer> <C-C>T <C-\><C-O>:call sqlcomplete#Map('sqlType')<CR><C-X><C-O> imap <buffer> <C-C>s <C-\><C-O>:call sqlcomplete#Map('sqlStatement')<CR><C-X><C-O> -The use of "<C-C>" can be user chosen by using the following in your |.vimrc| +The use of "<C-C>" can be user chosen by using the following in your |.mnvrc| as it may not work properly on all platforms: > let g:ftplugin_sql_omni_key = '<C-C>' > @@ -370,7 +370,7 @@ This command breaks down as: > command while editing a SQL file. 'sqlKeyword' - Display the items for the sqlKeyword highlight group - 'sqlKeyword\w*' - A second option available with Vim 7.4 which + 'sqlKeyword\w*' - A second option available with MNV 7.4 which uses a regular expression to determine which syntax groups to use )<CR> - Execute the :let command @@ -378,13 +378,13 @@ This command breaks down as: > Passing in 'sqlKeyword' instructs the SQL completion plugin to populate the popup with items from the sqlKeyword highlight group. The - plugin will also cache this result until Vim is + plugin will also cache this result until MNV is restarted. The syntax list is retrieved using the syntaxcomplete plugin. Using the 'syntax' keyword is a special case. This instructs the syntaxcomplete plugin to retrieve all syntax items. So this will effectively -work for any of Vim's SQL syntax files. At the time of writing this includes +work for any of MNV's SQL syntax files. At the time of writing this includes 10 different syntax files for the different dialects of SQL (see section 3 above, |sql-dialects|). @@ -406,8 +406,8 @@ Here are some examples of the entries which are pulled from the syntax files: > 4.2 Dynamic Mode *sql-completion-dynamic* ---------------- Dynamic mode populates the popups with data directly from a database. In -order for the dynamic feature to be enabled you must have the dbext.vim -plugin installed, (https://www.vim.org/scripts/script.php?script_id=356). +order for the dynamic feature to be enabled you must have the dbext.mnv +plugin installed, (https://www.mnv.org/scripts/script.php?script_id=356). Dynamic mode is used by several features of the SQL completion plugin. After installing the dbext plugin see the dbext-tutorial for additional @@ -441,7 +441,7 @@ the space bar): - This allows you to quickly drill down into a table to view its columns and back again. - <Right> and <Left> can also be chosen via - your |.vimrc| > + your |.mnvrc| > let g:ftplugin_sql_omni_key_right = '<Right>' let g:ftplugin_sql_omni_key_left = '<Left>' @@ -483,7 +483,7 @@ choose "from" from the popup list. When writing stored procedures using the "type" list is useful. It contains a list of all the database supported types. This may or may not be true depending on the syntax file you are using. The SQL Anywhere syntax file -(sqlanywhere.vim) has support for this: > +(sqlanywhere.mnv) has support for this: > BEGIN DECLARE customer_id <C-C>T <-- Choose a type from the list @@ -491,16 +491,16 @@ depending on the syntax file you are using. The SQL Anywhere syntax file Dynamic features ---------------- To take advantage of the dynamic features you must first install the -dbext.vim plugin (https://www.vim.org/scripts/script.php?script_id=356). It +dbext.mnv plugin (https://www.mnv.org/scripts/script.php?script_id=356). It also comes with a tutorial. From the SQL completion plugin's perspective, the main feature dbext provides is a connection to a database. dbext connection profiles are the most efficient mechanism to define connection information. Once connections have been setup, the SQL completion plugin uses the features of dbext in the background to populate the popups. -What follows assumes dbext.vim has been correctly configured, a simple test +What follows assumes dbext.mnv has been correctly configured, a simple test is to run the command, :DBListTable. If a list of tables is shown, you know -dbext.vim is working as expected. If not, please consult the dbext.txt +dbext.mnv is working as expected. If not, please consult the dbext.txt documentation. Assuming you have followed the dbext-tutorial you can press <C-C>t to @@ -605,7 +605,7 @@ database. ---------------------------- The SQL completion plugin can be customized through various options set in -your |vimrc|: > +your |mnvrc|: > omni_sql_no_default_maps < - Default: This variable is not defined - If this variable is defined, no maps are created for OMNI @@ -644,9 +644,9 @@ your |vimrc|: > filtered using case sensitivity. > omni_sql_include_owner -< - Default: 0, unless dbext.vim 3.00 has been installed +< - Default: 0, unless dbext.mnv 3.00 has been installed - Valid settings are 0 or 1. - - When completing tables, procedure or views and using dbext.vim 3.00 + - When completing tables, procedure or views and using dbext.mnv 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. > @@ -669,7 +669,7 @@ 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 +These are maps which use populate the completion list using MNV's syntax highlighting rules. > <C-C>a < - Displays all SQL syntax items. > @@ -686,7 +686,7 @@ highlighting rules. > Dynamic Maps ------------ -These are maps which use populate the completion list using the dbext.vim +These are maps which use populate the completion list using the dbext.mnv plugin. > <C-C>t < - Displays a list of tables. > @@ -706,13 +706,13 @@ plugin. > the completion window. <Right> is not recognized on most Unix systems, so this maps is only created on the Windows platform. If you would like the same feature on Unix, choose a different key - and make the same map in your vimrc. > + and make the same map in your mnvrc. > <Left> < - Displays the list of tables. <Left> is not recognized on most Unix systems, so this maps is only created on the Windows platform. If you would like the same feature on Unix, choose a different key and make the same map in - your vimrc. > + your mnvrc. > <C-C>R < - This maps removes all cached items and forces the SQL completion to regenerate the list of items. @@ -724,15 +724,15 @@ will be specifying different syntax highlight groups. If you do not wish the default maps created or the key choices do not work on your platform (often a case on *nix) you define the following variable in -your |vimrc|: > +your |mnvrc|: > let g:omni_sql_no_default_maps = 1 -Do not edit ftplugin/sql.vim directly! If you change this file your changes -will be over written on future updates. Vim has a special directory structure +Do not edit ftplugin/sql.mnv directly! If you change this file your changes +will be over written on future updates. MNV has a special directory structure which allows you to make customizations without changing the files that are -included with the Vim distribution. If you wish to customize the maps -create an after/ftplugin/sql.vim (see |after-directory|) and place the same -maps from the ftplugin/sql.vim in it using your own key strokes. <C-C> was +included with the MNV distribution. If you wish to customize the maps +create an after/ftplugin/sql.mnv (see |after-directory|) and place the same +maps from the ftplugin/sql.mnv in it using your own key strokes. <C-C> was chosen since it will work on both Windows and *nix platforms. On the windows platform you can also use <C-Space> or ALT keys. @@ -752,9 +752,9 @@ This can be enabled easily with the following steps (assuming a Perl file): > Step 1 ------ -Begins by editing a Perl file. Vim automatically sets the filetype to -"perl". By default, Vim runs the appropriate filetype file -ftplugin/perl.vim. If you are using the syntax completion plugin by following +Begins by editing a Perl file. MNV automatically sets the filetype to +"perl". By default, MNV runs the appropriate filetype file +ftplugin/perl.mnv. If you are using the syntax completion plugin by following the directions at |ft-syntax-omni| then the 'omnifunc' option has been set to "syntax#Complete". Pressing <C-X><C-O> will display the omni popup containing the syntax items for Perl. @@ -762,7 +762,7 @@ the syntax items for Perl. Step 2 ------ Manually setting the filetype to 'sql' will also fire the appropriate filetype -files ftplugin/sql.vim. This file will define a number of buffer specific +files ftplugin/sql.mnv. This file will define a number of buffer specific maps for SQL completion, see |sql-completion-maps|. Now these maps have been created and the SQL completion plugin has been initialized. All SQL syntax items have been cached in preparation. The SQL filetype script detects @@ -777,4 +777,4 @@ Setting the filetype back to Perl sets all the usual "perl" related items back as they were. -vim:tw=78:ts=8:noet:ft=help:norl: +mnv:tw=78:ts=8:noet:ft=help:norl: |
