Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated for version 7.2a-00

  • Loading branch information...
commit a74b78844d2b1d335a0f40cdde4135e4dba91499 1 parent 527eb86
vimboss authored
Showing with 490 additions and 12,020 deletions.
  1. +4 −4 Contents
  2. +4 −10 Filelist
  3. +9 −6 Makefile
  4. +4 −7 README.txt
  5. +1 −1  README_ami.txt
  6. +1 −1  README_amibin.txt
  7. +1 −1  README_amisrc.txt
  8. +1 −1  README_bindos.txt
  9. +1 −1  README_dos.txt
  10. +1 −1  README_extra.txt
  11. +1 −1  README_lang.txt
  12. +1 −1  README_mac.txt
  13. +1 −1  README_ole.txt
  14. +1 −1  README_os2.txt
  15. +1 −1  README_os390.txt
  16. +1 −1  README_src.txt
  17. +1 −1  README_srcdos.txt
  18. +1 −1  README_unix.txt
  19. +1 −1  README_vms.txt
  20. +1 −1  README_w32s.txt
  21. +0 −515 runtime/doc/ada.txt
  22. +0 −763 runtime/doc/sql.txt
  23. +157 −41 runtime/filetype.vim
  24. +22 −2 runtime/makemenu.vim
  25. +10 −4 runtime/menu.vim
  26. +9 −1 runtime/scripts.vim
  27. +242 −222 runtime/synmenu.vim
  28. +0 −23 runtime/tutor/Contents
  29. BIN  runtime/tutor/Contents.info
  30. +0 −716 runtime/tutor/Filelist
  31. +0 −32 runtime/tutor/README_ami.txt
  32. BIN  runtime/tutor/README_ami.txt.info
  33. +0 −12 runtime/tutor/README_amibin.txt
  34. BIN  runtime/tutor/README_amibin.txt.info
  35. +0 −11 runtime/tutor/README_amisrc.txt
  36. BIN  runtime/tutor/README_amisrc.txt.info
  37. +0 −19 runtime/tutor/README_bindos.txt
  38. +0 −154 runtime/tutor/README_dos.txt
  39. +0 −61 runtime/tutor/README_extra.txt
  40. +0 −5 runtime/tutor/README_lang.txt
  41. +0 −8 runtime/tutor/README_mac.txt
  42. +0 −20 runtime/tutor/README_ole.txt
  43. +0 −58 runtime/tutor/README_os2.txt
  44. +0 −130 runtime/tutor/README_os390.txt
  45. +0 −10 runtime/tutor/README_src.txt
  46. +0 −12 runtime/tutor/README_srcdos.txt
  47. +0 −10 runtime/tutor/README_unix.txt
  48. +0 −48 runtime/tutor/README_vms.txt
  49. +0 −15 runtime/tutor/README_w32s.txt
  50. BIN  runtime/tutor/Vim.info
  51. BIN  runtime/tutor/Xxd.info
  52. +0 −6 runtime/tutor/configure
  53. BIN  runtime/tutor/csdpmi4b.zip
  54. BIN  runtime/tutor/runtime.info
  55. +0 −88 runtime/tutor/runtime/bugreport.vim
  56. +0 −25 runtime/tutor/runtime/delmenu.vim
  57. BIN  runtime/tutor/runtime/doc.info
  58. +0 −66 runtime/tutor/runtime/evim.vim
  59. +0 −2,412 runtime/tutor/runtime/filetype.vim
  60. +0 −11 runtime/tutor/runtime/ftoff.vim
  61. +0 −35 runtime/tutor/runtime/ftplugin.vim
  62. +0 −11 runtime/tutor/runtime/ftplugof.vim
  63. +0 −59 runtime/tutor/runtime/gvimrc_example.vim
  64. BIN  runtime/tutor/runtime/hi16-action-make.png
  65. BIN  runtime/tutor/runtime/hi22-action-make.png
  66. BIN  runtime/tutor/runtime/icons.info
  67. +0 −31 runtime/tutor/runtime/indent.vim
  68. +0 −11 runtime/tutor/runtime/indoff.vim
  69. +0 −75 runtime/tutor/runtime/macmap.vim
  70. BIN  runtime/tutor/runtime/macros.info
  71. +0 −580 runtime/tutor/runtime/makemenu.vim
  72. +0 −1,105 runtime/tutor/runtime/menu.vim
  73. +0 −106 runtime/tutor/runtime/mswin.vim
  74. +0 −1,312 runtime/tutor/runtime/optwin.vim
  75. +0 −753 runtime/tutor/runtime/rgb.txt
  76. +0 −351 runtime/tutor/runtime/scripts.vim
  77. +0 −569 runtime/tutor/runtime/synmenu.vim
  78. +0 −135 runtime/tutor/runtime/termcap
  79. BIN  runtime/tutor/runtime/tools.info
  80. BIN  runtime/tutor/runtime/tutor.info
  81. BIN  runtime/tutor/runtime/vim16x16.gif
  82. BIN  runtime/tutor/runtime/vim16x16.png
  83. +0 −27 runtime/tutor/runtime/vim16x16.xpm
  84. BIN  runtime/tutor/runtime/vim32x32.gif
  85. BIN  runtime/tutor/runtime/vim32x32.png
  86. +0 −43 runtime/tutor/runtime/vim32x32.xpm
  87. BIN  runtime/tutor/runtime/vim48x48.gif
  88. BIN  runtime/tutor/runtime/vim48x48.png
  89. +0 −59 runtime/tutor/runtime/vim48x48.xpm
  90. BIN  runtime/tutor/runtime/vimlogo.cdr
  91. +0 −791 runtime/tutor/runtime/vimlogo.eps
  92. BIN  runtime/tutor/runtime/vimlogo.gif
  93. BIN  runtime/tutor/runtime/vimlogo.pdf
  94. +0 −75 runtime/tutor/runtime/vimlogo.xpm
  95. +0 −94 runtime/tutor/runtime/vimrc_example.vim
  96. BIN  runtime/tutor/src.info
  97. +0 −80 runtime/tutor/uninstal.txt
  98. BIN  runtime/tutor/vimdir.info
  99. +0 −67 runtime/tutor/vimtutor.bat
  100. +0 −104 runtime/tutor/vimtutor.com
  101. +13 −4 runtime/vimrc_example.vim
View
8 Contents
@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
messages, shows current file name in window title, on-line
help, rectangular cut/paste, etc., etc., etc...
- Version 7.1. Also runs under UNIX, MSDOS and other systems.
- vim71rt.tgz contains the documentation and syntax files.
- vim71bin.tgz contains the binaries.
- vim71src.tgz contains the sources.
+ Version 7.2a. Also runs under UNIX, MSDOS and other systems.
+ vim72art.tgz contains the documentation and syntax files.
+ vim72abin.tgz contains the binaries.
+ vim72asrc.tgz contains the sources.
Author: Bram Moolenaar et al.
View
14 Filelist
@@ -137,6 +137,7 @@ SRC_UNIX = \
pixmaps/gen-inline-pixbufs.sh \
pixmaps/stock_icons.h \
src/INSTALL \
+ src/INSTALLx.txt \
src/Makefile \
src/auto/configure \
src/config.aap.in \
@@ -250,6 +251,7 @@ SRC_DOS = \
src/Make_w16.mak \
src/bigvim.bat \
src/msvcsetup.bat \
+ src/msvc2008.bat \
src/dimm.idl \
src/dlldata.c \
src/dosinst.c \
@@ -671,17 +673,9 @@ LANG_GEN = \
runtime/keymap/*.vim \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
+ runtime/tutor/tutor.utf-8 \
runtime/tutor/tutor.?? \
- runtime/tutor/tutor.cs.* \
- runtime/tutor/tutor.gr.* \
- runtime/tutor/tutor.hu.* \
- runtime/tutor/tutor.ja.* \
- runtime/tutor/tutor.ko.* \
- runtime/tutor/tutor.pl.* \
- runtime/tutor/tutor.ru.* \
- runtime/tutor/tutor.sk.* \
- runtime/tutor/tutor.tr.* \
- runtime/tutor/tutor.zh.* \
+ runtime/tutor/tutor.??.* \
runtime/spell/README.txt \
runtime/spell/??/*.diff \
runtime/spell/??/main.aap \
View
15 Makefile
@@ -69,7 +69,7 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
# Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 7
-MINOR = 1
+MINOR = 2a
# Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s
@@ -87,8 +87,8 @@ DOSBIN_S = dosbin_s
# ignore warnings for missing include files, fix problems for syntax errors).
# - With these features: "make depend" (works best with gcc).
# - "make lint" and check the output (ignore GTK warnings).
-# - Enable the efence library in "src/Makefile" and run "make test". May
-# require disabling Python and Ruby to avoid trouble with threads.
+# - Enable the efence library in "src/Makefile" and run "make test". Disable
+# Python and Ruby to avoid trouble with threads (efence is not threadsafe).
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
# - Do "make menu" to update the runtime/synmenu.vim file.
@@ -120,17 +120,20 @@ DOSBIN_S = dosbin_s
# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
# case set environment for compiling with Borland C++ 4.0 and do
# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
+# NOTE: this currently fails because Vim is too big.
# - "make test" and check the output.
# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
# "uninstald16.exe".
# 32 bit DOS version:
# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
-# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
+# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output for
+# "ALL DONE".
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe".
# Win32 console version:
-# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
-# paths when necessary).
+# - Set environment for Visual C++ 2008 Express Edition: "msvc2008.bat". Or,
+# when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths
+# when necessary).
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
View
11 README.txt
@@ -1,4 +1,4 @@
-README.txt for version 7.1 of Vim: Vi IMproved.
+README.txt for version 7.2a of Vim: Vi IMproved.
WHAT IS VIM
@@ -133,9 +133,6 @@ MAIN AUTHOR
Send any other comments, patches, pizza and suggestions to:
Bram Moolenaar E-mail: Bram@vim.org
- Molenstraat 2
- 2161 HP Lisse
- The Netherlands
-
-This is the address of my parents, they will forward mail and eat the pizza.
-My actual address will change a couple of times in 2006.
+ Finsterruetihof 1
+ 8134 Adliswil
+ Switzerland
View
2  README_ami.txt
@@ -1,4 +1,4 @@
-README_ami.txt for version 7.1 of Vim: Vi IMproved.
+README_ami.txt for version 7.2a of Vim: Vi IMproved.
This file explains the installation of Vim on Amiga systems.
See README.txt for general information about Vim.
View
2  README_amibin.txt
@@ -1,4 +1,4 @@
-README_amibin.txt for version 7.1 of Vim: Vi IMproved.
+README_amibin.txt for version 7.2a of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
View
2  README_amisrc.txt
@@ -1,4 +1,4 @@
-README_amisrc.txt for version 7.1 of Vim: Vi IMproved.
+README_amisrc.txt for version 7.2a of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
View
2  README_bindos.txt
@@ -1,4 +1,4 @@
-README_bindos.txt for version 7.1 of Vim: Vi IMproved.
+README_bindos.txt for version 7.2a of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
View
2  README_dos.txt
@@ -1,4 +1,4 @@
-README_dos.txt for version 7.1 of Vim: Vi IMproved.
+README_dos.txt for version 7.2a of Vim: Vi IMproved.
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
See "README.txt" for general information about Vim.
View
2  README_extra.txt
@@ -1,4 +1,4 @@
-README_extra.txt for version 7.1 of Vim: Vi IMproved.
+README_extra.txt for version 7.2a of Vim: Vi IMproved.
The extra archive of Vim is to be used in combination with the source archive
(vim-7.0-src.tar.gz). The extra archive is useless without it.
View
2  README_lang.txt
@@ -1,4 +1,4 @@
-README_lang.txt for version 7.1 of Vim: Vi IMproved.
+README_lang.txt for version 7.2a of Vim: Vi IMproved.
This file contains files for non-English languages:
- Translated messages.
View
2  README_mac.txt
@@ -1,4 +1,4 @@
-README_mac.txt for version 7.1 of Vim: Vi IMproved.
+README_mac.txt for version 7.2a of Vim: Vi IMproved.
This file explains the installation of Vim on Macintosh systems.
See "README.txt" for general information about Vim.
View
2  README_ole.txt
@@ -1,4 +1,4 @@
-README_ole.txt for version 7.1 of Vim: Vi IMproved.
+README_ole.txt for version 7.2a of Vim: Vi IMproved.
This archive contains gvim.exe with OLE interface and VisVim.
This version of gvim.exe can also load a number of interface dynamically (you
View
2  README_os2.txt
@@ -1,4 +1,4 @@
-README_os2.txt for version 7.1 of Vim: Vi IMproved.
+README_os2.txt for version 7.2a of Vim: Vi IMproved.
This file explains the installation of Vim on OS/2 systems.
See "README.txt" for general information about Vim.
View
2  README_os390.txt
@@ -1,4 +1,4 @@
-README_os_390.txt for version 7.1 of Vim: Vi IMproved.
+README_os_390.txt for version 7.2a of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM.
View
2  README_src.txt
@@ -1,4 +1,4 @@
-README_src.txt for version 7.1 of Vim: Vi IMproved.
+README_src.txt for version 7.2a of Vim: Vi IMproved.
The source archive contains the files needed to compile Vim on Unix systems.
It is packed for Unix systems (NL line separator). It is also used for other
View
2  README_srcdos.txt
@@ -1,4 +1,4 @@
-README_srcdos.txt for version 7.1 of Vim: Vi IMproved.
+README_srcdos.txt for version 7.2a of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
View
2  README_unix.txt
@@ -1,4 +1,4 @@
-README_unix.txt for version 7.1 of Vim: Vi IMproved.
+README_unix.txt for version 7.2a of Vim: Vi IMproved.
This file explains the installation of Vim on Unix systems.
See "README.txt" for general information about Vim.
View
2  README_vms.txt
@@ -1,4 +1,4 @@
-README_vms.txt for version 7.1 of Vim: Vi IMproved.
+README_vms.txt for version 7.2a of Vim: Vi IMproved.
This file explains the installation of Vim on VMS systems.
See "README.txt" in the runtime archive for information about Vim.
View
2  README_w32s.txt
@@ -1,4 +1,4 @@
-README_w32s.txt for version 7.1 of Vim: Vi IMproved.
+README_w32s.txt for version 7.2a of Vim: Vi IMproved.
This archive contains the gvim.exe that was specifically compiled for use in
the Win32s subsystem in MS-Windows 3.1 and 3.11.
View
515 runtime/doc/ada.txt
@@ -1,515 +0,0 @@
-*ada.txt* For Vim version 7.1. Last change: 2007 May 08
-
-
- ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
-
-ADA *ada.vim*
-
-1. Syntax Highlighting |ft-ada-syntax|
-2. Plug-in |ft-ada-plugin|
-3. Omni Completion |ft-ada-omni|
- 3.1 Omni Completion with "gnat xref" |gnat-xref|
- 3.2 Omni Completion with "ctags" |ada-ctags|
-4. Compiler Support |ada-compiler|
- 4.1 GNAT |compiler-gnat|
- 4.1 Dec Ada |compiler-decada|
-5. References |ada-reference|
- 5.1 Options |ft-ada-options|
- 5.2 Functions |ft-ada-functions|
- 5.3 Commands |ft-ada-commands|
- 5.4 Variables |ft-ada-variables|
- 5.5 Constants |ft-ada-constants|
-8. Extra Plug-ins |ada-extra-plugins|
-
-==============================================================================
-1. Syntax Highlighting ~
- *ft-ada-syntax*
-
-This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes
-support for objected-programming, protected types, and so on. It handles code
-written for the original Ada language ("Ada83", "Ada87", "Ada95") as well,
-though code which uses Ada 2005-only keywords will be wrongly colored (such
-code should be fixed anyway). For more information about Ada, see
-http://www.adapower.com.
-
-The Ada mode handles a number of situations cleanly.
-
-For example, it knows that the "-" in "-5" is a number, but the same character
-in "A-5" is an operator. Normally, a "with" or "use" clause referencing
-another compilation unit is coloured the same way as C's "#include" is coloured.
-If you have "Conditional" or "Repeat" groups coloured differently, then "end
-if" and "end loop" will be coloured as part of those respective groups.
-
-You can set these to different colours using vim's "highlight" command (e.g.,
-to change how loops are displayed, enter the command ":hi Repeat" followed by
-the colour specification; on simple terminals the colour specification
-ctermfg=White often shows well).
-
-There are several options you can select in this Ada mode. See|ft-ada-options|
-for a complete list.
-
-To enable them, assign a value to the option. For example, to turn one on:
- >
- > let g:ada_standard_types = 1
->
-To disable them use ":unlet". Example:
->
- > unlet g:ada_standard_types
-
-You can just use ":" and type these into the command line to set these
-temporarily before loading an Ada file. You can make these option settings
-permanent by adding the "let" command(s), without a colon, to your "~/.vimrc"
-file.
-
-Even on a slow (90Mhz) PC this mode works quickly, but if you find the
-performance unacceptable, turn on |g:ada_withuse_ordinary|.
-
-Syntax folding instructions (|fold-syntax|) are added when |g:ada_folding| is
-set.
-
-==============================================================================
-2. File type Plug-in ~
- *ft-ada-indent* *ft-ada-plugin*
-
-The Ada plug-in provides support for:
-
- - auto indenting (|indent.txt|)
- - insert completion (|i_CTRL-N|)
- - user completion (|i_CTRL-X_CTRL-U|)
- - tag searches (|tagsrch.txt|)
- - Quick Fix (|quickfix.txt|)
- - backspace handling (|'backspace'|)
- - comment handling (|'comments'|, |'commentstring'|)
-
-The plug-in only activates the features of the Ada mode whenever an Ada
-files is opened and add adds Ada related entries to the main and pop-up menu.
-
-==============================================================================
-3. Omni Completion ~
- *ft-ada-omni*
-
-The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
-by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The
-complete function will automatically detect which tool was used to create the
-tags file.
-
-------------------------------------------------------------------------------
-3.1 Omni Completion with "gnat xref" ~
- *gnat-xref*
-
-GNAT XREF uses the compiler internal informations (ali-files) to produce the
-tags file. This has the advantage to be 100% correct and the option of deep
-nested analysis. However the code must compile, the generator is quite
-slow and the created tags file contains only the basic Ctags informations for
-each entry - not enough for some of the more advanced Vim code browser
-plug-ins.
-
-NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
- output - If nothing is printed then usually the parameters are wrong.
- Here some important tips:
-
-1) You need to compile your code first and use the "-aO" option to point to
- your .ali files.
-2) "gnat xref -v ../Include/adacl.ads" won't work - use the "gnat xref -v
- -aI../Include adacl.ads" instead.
-3) "gnat xref -v -aI../Include *.ad?" won't work - use "cd ../Include" and
- then "gnat xref -v *.ad?"
-4) Project manager support is completely broken - don't even try "gnat xref
- -Padacl.gpr".
-5) VIM is faster when the tags file is sorted - use "sort --unique
- --ignore-case --output=tags tags" .
-6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark
- the file assorted.
-
-------------------------------------------------------------------------------
-3.2 Omni Completion with "ctags"~
- *ada-ctags*
-
-Exuberant Ctags uses its own multi-language code parser. The parser is quite
-fast, produces a lot of extra informations (hence the name "Exuberant Ctags")
-and can run on files which currently do not compile.
-
-There are also lots of other Vim-tools which use exuberant Ctags.
-
-You will need to install a version of the Exuberant Ctags which has Ada
-support patched in. Such a version is available from the GNU Ada Project
-(http://gnuada.sourceforge.net).
-
-The Ada parser for Exuberant Ctags is fairly new - don't expect complete
-support yet.
-
-==============================================================================
-4. Compiler Support ~
- *ada-compiler*
-
-The Ada mode supports more then one Ada compiler and will automatically load the
-compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
-provided compiler plug-ins are split into the actual compiler plug-in and a
-collection of support functions and variables. This allows the easy
-development of specialized compiler plug-ins fine tuned to your development
-environment.
-
-------------------------------------------------------------------------------
-4.1 GNAT ~
- *compiler-gnat*
-
-GNAT is the only free (beer and speech) Ada compiler available. There are
-several version available which differentiate in the licence terms used.
-
-The GNAT compiler plug-in will perform a compile on pressing <F7> and then
-immediately shows the result. You can set the project file to be used by
-setting:
- >
- > call g:gnat.Set_Project_File ('my_project.gpr')
-
-Setting a project file will also create a Vim session (|views-sessions|) so -
-like with the GPS - opened files, window positions etc. will remembered
-separately for all projects.
-
- *gnat_members*
-GNAT OBJECT ~
-
- *g:gnat.Make()*
-g:gnat.Make()
- Calls|g:gnat.Make_Command|and displays the result inside a
- |quickfix| window.
-
- *g:gnat.Pretty()*
-g:gnat.Pretty()
- Calls|g:gnat.Pretty_Command|
-
- *g:gnat.Find()*
-g:gnat.Find()
- Calls|g:gnat.Find_Command|
-
- *g:gnat.Tags()*
-g:gnat.Tags()
- Calls|g:gnat.Tags_Command|
-
- *g:gnat.Set_Project_File()*
-g:gnat.Set_Project_File([{file}])
- Set gnat project file and load associated session. An open
- project will be closed and the session written. If called
- without file name the file selector opens for selection of a
- project file. If called with an empty string then the project
- and associated session are closed.
-
- *g:gnat.Project_File*
-g:gnat.Project_File string
- Current project file.
-
- *g:gnat.Make_Command*
-g:gnat.Make_Command string
- External command used for|g:gnat.Make()| (|'makeprg'|).
-
- *g:gnat.Pretty_Program*
-g:gnat.Pretty_Program string
- External command used for|g:gnat.Pretty()|
-
- *g:gnat.Find_Program*
-g:gnat.Find_Program string
- External command used for|g:gnat.Find()|
-
- *g:gnat.Tags_Command*
-g:gnat.Tags_Command string
- External command used for|g:gnat.Tags()|
-
- *g:gnat.Error_Format*
-g:gnat.Error_Format string
- Error format (|'errorformat'|)
-
-------------------------------------------------------------------------------
-4.2 Dec Ada ~
- *compiler-hpada* *compiler-decada*
- *compiler-vaxada* *compiler-compaqada*
-
-Dec Ada (also known by - in chronological order - VAX Ada, Dec Ada, Compaq Ada
-and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
-compile the current unit.
-
-The Dec Ada compiler expects the package name and not the file name to be
-passed a parameter. The compiler plug-in supports the usual file name
-convention to convert the file into a unit name. For separates both '-' and
-'__' are allowed.
-
- *decada_members*
-DEC ADA OBJECT ~
-
- *g:decada.Make()*
-g:decada.Make() function
- Calls|g:decada.Make_Command|and displays the result inside a
- |quickfix| window.
-
- *g:decada.Unit_Name()*
-g:decada.Unit_Name() function
- Get the Unit name for the current file.
-
- *g:decada.Make_Command*
-g:decada.Make_Command string
- External command used for|g:decadat.Make()| (|'makeprg'|).
-
- *g:decada.Error_Format*
-g:decada.Error_Format| string
- Error format (|'errorformat'|).
-
-==============================================================================
-5. References ~
- *ada-reference*
-
-------------------------------------------------------------------------------
-5.1 Options ~
- *ft-ada-options*
-
- *g:ada_standard_types*
-g:ada_standard_types bool (true when exists)
- Highlight types in package Standard (e.g., "Float")
-
- *g:ada_space_errors*
- *g:ada_no_trail_space_error*
- *g:ada_no_tab_space_error*
- *g:ada_all_tab_usage*
-g:ada_space_errors bool (true when exists)
- Highlight extraneous errors in spaces ...
- g:ada_no_trail_space_error
- - but ignore trailing spaces at the end of a line
- g:ada_no_tab_space_error
- - but ignore tabs after spaces
- g:ada_all_tab_usage
- - highlight all tab use
-
- *g:ada_line_errors*
-g:ada_line_errors bool (true when exists)
- Highlight lines which are to long. Note: This highlighting
- option is quite CPU intensive.
-
- *g:ada_rainbow_color*
-g:ada_rainbow_color bool (true when exists)
- Use rainbow colours for '(' and ')'. You need the
- rainbow_parenthesis for this to work
-
- *g:ada_folding*
-g:ada_folding set ('sigpft')
- Use folding for Ada sources.
- 's': activate syntax folding on load
- 'p': fold packages
- 'f': fold functions and procedures
- 't': fold types
- 'c': fold conditionals
- 'g': activate gnat pretty print folding on load
- 'i': lone 'is' folded with line above
- 'b': lone 'begin' folded with line above
- 'p': lone 'private' folded with line above
- 'x': lone 'exception' folded with line above
- 'i': activate indent folding on load
-
- Note: Syntax folding is in an early (unusable) stage and
- indent or gnat pretty folding is suggested.
-
- For gnat pretty folding to work the following settings are
- suggested: -cl3 -M79 -c2 -c3 -c4 -A1 -A2 -A3 -A4 -A5
-
- For indent folding to work the following settings are
- suggested: shiftwidth=3 softtabstop=3
-
- *g:ada_abbrev*
-g:ada_abbrev bool (true when exists)
- Add some abbreviations. This feature more or less superseded
- by the various completion methods.
-
- *g:ada_withuse_ordinary*
-g:ada_withuse_ordinary bool (true when exists)
- Show "with" and "use" as ordinary keywords (when used to
- reference other compilation units they're normally highlighted
- specially).
-
- *g:ada_begin_preproc*
-g:ada_begin_preproc bool (true when exists)
- Show all begin-like keywords using the colouring of C
- preprocessor commands.
-
- *g:ada_omni_with_keywords*
-g:ada_omni_with_keywords
- Add Keywords, Pragmas, Attributes to omni-completions
- (|compl-omni|). Note: You can always complete then with user
- completion (|i_CTRL-X_CTRL-U|).
-
- *g:ada_extended_tagging*
-g:ada_extended_tagging enum ('jump', 'list')
- use extended tagging, two options are available
- 'jump': use tjump to jump.
- 'list': add tags quick fix list.
- Normal tagging does not support function or operator
- overloading as these features are not available in C and
- tagging was originally developed for C.
-
- *g:ada_extended_completion*
-g:ada_extended_completion
- Uses extended completion for <C-N> and <C-R> completions
- (|i_CTRL-N|). In this mode the '.' is used as part of the
- identifier so that 'Object.Method' or 'Package.Procedure' are
- completed together.
-
- *g:ada_gnat_extensions*
-g:ada_gnat_extensions bool (true when exists)
- Support GNAT extensions.
-
- *g:ada_with_gnat_project_files*
-g:ada_with_gnat_project_files bool (true when exists)
- Add gnat project file keywords and Attributes.
-
- *g:ada_default_compiler*
-g:ada_default_compiler string
- set default compiler. Currently supported is 'gnat' and
- 'decada'.
-
-An "exists" type is a boolean is considered true when the variable is defined
-and false when the variable is undefined. The value which the variable is
-set makes no difference.
-
-------------------------------------------------------------------------------
-5.3 Commands ~
- *ft-ada-commands*
-
-:AdaRainbow *:AdaRainbow*
- Toggles rainbow colour (|g:ada_rainbow_color|) mode for
- '(' and ')'
-
-:AdaLines *:AdaLines*
- Toggles line error (|g:ada_line_errors|) display
-
-:AdaSpaces *:AdaSpaces*
- Toggles space error (|g:ada_space_errors|) display.
-
-:AdaTagDir *:AdaTagDir*
- Creates tags file for the directory of the current file.
-
-:AdaTagFile *:AdaTagFile*
- Creates tags file for the current file.
-
-:AdaTypes *:AdaTypes*
- Toggles standard types (|g:ada_standard_types|) colour.
-
-:GnatFind *:GnatFind*
- Calls |g:gnat.Find()|
-
-:GnatPretty *:GnatPretty*
- Calls |g:gnat.Pretty()|
-
-:GnatTags *:GnatTags*
- Calls |g:gnat.Tags()|
-
-------------------------------------------------------------------------------
-5.3 Variables ~
- *ft-ada-variables*
-
- *g:gnat*
-g:gnat object
- Control object which manages GNAT compiles. The object
- is created when the first Ada source code is loaded provided
- that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
- for details.
-
- *g:decada*
-g:decada object
- Control object which manages Dec Ada compiles. The object
- is created when the first Ada source code is loaded provided
- that |g:ada_default_compiler|is set to 'decada'. See
- |decada_members|for details.
-
-------------------------------------------------------------------------------
-5.4 Constants ~
- *ft-ada-constants*
-
-All constants are locked. See |:lockvar| for details.
-
- *g:ada#WordRegex*
-g:ada#WordRegex string
- Regular expression to search for Ada words
-
- *g:ada#DotWordRegex*
-g:ada#DotWordRegex string
- Regular expression to search for Ada words separated by dots.
-
- *g:ada#Comment*
-g:ada#Comment string
- Regular expression to search for Ada comments
-
- *g:ada#Keywords*
-g:ada#Keywords list of dictionaries
- List of keywords, attributes etc. pp. in the format used by
- omni completion. See |complete-items| for details.
-
- *g:ada#Ctags_Kinds*
-g:ada#Ctags_Kinds dictionary of lists
- Dictionary of the various kinds of items which the Ada support
- for Ctags generates.
-
-------------------------------------------------------------------------------
-5.2 Functions ~
- *ft-ada-functions*
-
-ada#Word([{line}, {col}]) *ada#Word()*
- Return full name of Ada entity under the cursor (or at given
- line/column), stripping white space/newlines as necessary.
-
-ada#List_Tag([{line}, {col}]) *ada#Listtags()*
- List all occurrences of the Ada entity under the cursor (or at
- given line/column) inside the quick-fix window
-
-ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
- List all occurrences of the Ada entity under the cursor (or at
- given line/column) in the tag jump list. Mode can either be
- 'tjump' or 'stjump'.
-
-ada#Create_Tags ({option}) *ada#Create_Tags()*
- Creates tag file using Ctags. The option can either be 'file'
- for the current file, 'dir' for the directory of the current
- file or a file name.
-
-gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
- Adds the tag file header (!_TAG_) informations to the current
- file which are missing from the GNAT XREF output.
-
-ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
- Toggles highlighting options on or off. Used for the Ada menu.
-
- *gnat#New()*
-gnat#New ()
- Create a new gnat object. See |g:gnat| for details.
-
-
-==============================================================================
-8. Extra Plugins ~
- *ada-extra-plugins*
-
-You can optionally install the following extra plug-in. They work well with Ada
-and enhance the ability of the Ada mode.:
-
-backup.vim
- http://www.vim.org/scripts/script.php?script_id=1537
- Keeps as many backups as you like so you don't have to.
-
-rainbow_parenthsis.vim
- http://www.vim.org/scripts/script.php?script_id=1561
- Very helpful since Ada uses only '(' and ')'.
-
-nerd_comments.vim
- http://www.vim.org/scripts/script.php?script_id=1218
- Excellent commenting and uncommenting support for almost any
- programming language.
-
-matchit.vim
- http://www.vim.org/scripts/script.php?script_id=39
- '%' jumping for any language. The normal '%' jump only works for '{}'
- style languages. The Ada mode will set the needed search patters.
-
-taglist.vim
- http://www.vim.org/scripts/script.php?script_id=273
- Source code explorer sidebar. There is a patch for Ada available.
-
-The GNU Ada Project distribution (http://gnuada.sourceforge.net) of Vim
-contains all of the above.
-
-==============================================================================
-vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
-vim: filetype=help encoding=latin1
View
763 runtime/doc/sql.txt
@@ -1,763 +0,0 @@
-*sql.txt* For Vim version 7.1. Last change: Wed Apr 26 2006 3:05:33 PM
-
-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
-features for navigation, indentation and syntax highlighting.
-
-1. Navigation |sql-navigation|
- 1.1 Matchit |sql-matchit|
- 1.2 Text Object Motions |sql-object-motions|
- 1.3 Predefined Object Motions |sql-predefined-objects|
- 1.4 Macros |sql-macros|
-2. SQL Dialects |sql-dialects|
- 2.1 SQLSetType |SQLSetType|
- 2.2 SQL Dialect Default |sql-type-default|
-3. Adding new SQL Dialects |sql-adding-dialects|
-4. OMNI SQL Completion |sql-completion|
- 4.1 Static mode |sql-completion-static|
- 4.2 Dynamic mode |sql-completion-dynamic|
- 4.3 Tutorial |sql-completion-tutorial|
- 4.3.1 Complete Tables |sql-completion-tables|
- 4.3.2 Complete Columns |sql-completion-columns|
- 4.3.3 Complete Procedures |sql-completion-procedures|
- 4.3.4 Complete Views |sql-completion-views|
- 4.4 Completion Customization |sql-completion-customization|
- 4.5 SQL Maps |sql-completion-maps|
- 4.6 Using with other filetypes |sql-completion-filetypes|
-
-==============================================================================
-1. Navigation *sql-navigation*
-
-The SQL ftplugin provides a number of options to assist with file
-navigation.
-
-
-1.1 Matchit *sql-matchit*
------------
-The matchit plugin (http://www.vim.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
-keywords will move the cursor to its match. For example, if the cursor
-is on an "if", pressing % will cycle between the "else", "elseif" and
-"end if" keywords.
-
-The following keywords are supported: >
- if
- elseif | elsif
- else [if]
- end if
-
- [while condition] loop
- leave
- break
- continue
- exit
- end loop
-
- for
- leave
- break
- continue
- exit
- end loop
-
- do
- statements
- doend
-
- case
- when
- when
- default
- end case
-
- merge
- when not matched
- when matched
-
- create[ or replace] procedure|function|event
- returns
-
-
-1.2 Text Object Motions *sql-object-motions*
------------------------
-Vim 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.
-
-The following |Normal| mode and |Visual| mode maps exist (when you edit a SQL
-file): >
- ]] move forward to the next 'begin'
- [[ move backwards to the previous 'begin'
- ][ move forward to the next 'end'
- [] move backwards to the previous 'end'
-
-
-1.3 Predefined Object Motions *sql-predefined-objects*
------------------------------
-Most relational databases support various standard features, tables, indices,
-triggers and stored procedures. Each vendor also has a variety of proprietary
-objects. The next set of maps have been created to help move between these
-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: >
- let g:ftplugin_sql_objects = 'function,procedure,event,table,trigger' .
- \ ',schema,service,publication,database,datatype,domain' .
- \ ',index,subscription,synchronization,view,variable'
-
-The following |Normal| mode and |Visual| mode maps have been created which use
-the above list: >
- ]} move forward to the next 'create <object name>'
- [{ move backward to the previous 'create <object name>'
-
-Repeatedly pressing ]} will cycle through each of these create statements: >
- create table t1 (
- ...
- );
-
- create procedure p1
- begin
- ...
- end;
-
- create index i1 on t1 (c1);
-
-The default setting for g:ftplugin_sql_objects is: >
- let g:ftplugin_sql_objects = 'function,procedure,event,' .
- \ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' .
- \ 'table,trigger' .
- \ ',schema,service,publication,database,datatype,domain' .
- \ ',index,subscription,synchronization,view,variable'
-
-The above will also handle these cases: >
- create table t1 (
- ...
- );
- create existing table t2 (
- ...
- );
- create global temporary table t3 (
- ...
- );
-
-By default, the ftplugin only searches for CREATE statements. You can also
-override this via your |vimrc| with the following: >
- let g:ftplugin_sql_statements = 'create,alter'
-
-The filetype plugin defines three types of comments: >
- 1. --
- 2. //
- 3. /*
- *
- */
-
-The following |Normal| mode and |Visual| mode maps have been created to work
-with comments: >
- ]" move forward to the beginning of a comment
- [" move forward to the end of a comment
-
-
-
-1.4 Macros *sql-macros*
-----------
-Vim's feature to find macro definitions, |'define'|, is supported using this
-regular expression: >
- \c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>
-
-This addresses the following code: >
- CREATE VARIABLE myVar1 INTEGER;
-
- CREATE PROCEDURE sp_test(
- IN myVar2 INTEGER,
- OUT myVar3 CHAR(30),
- INOUT myVar4 NUMERIC(20,0)
- )
- BEGIN
- DECLARE myVar5 INTEGER;
-
- SELECT c1, c2, c3
- INTO myVar2, myVar3, myVar4
- FROM T1
- WHERE c4 = myVar1;
- END;
-
-Place your cursor on "myVar1" on this line: >
- WHERE c4 = myVar1;
- ^
-
-Press any of the following keys: >
- [d
- [D
- [CTRL-D
-
-
-==============================================================================
-2. SQL Dialects *sql-dialects* *sql-types*
- *sybase* *TSQL* *Transact-SQL*
- *sqlanywhere*
- *oracle* *plsql* *sqlj*
- *sqlserver*
- *mysql* *postgres* *psql*
- *informix*
-
-All relational databases support SQL. There is a portion of SQL that is
-portable across vendors (ex. CREATE TABLE, CREATE INDEX), but there is a
-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
-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
-is via syntax scripts. Unfortunately, to flip between different syntax rules
-you must either create:
- 1. New filetypes
- 2. Custom autocmds
- 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|.
-
-
-2.1 SQLSetType *sqlsettype* *SQLSetType*
---------------
-For the people that work with many different databases, it would be 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: >
- SQLSetType
-
-Executing this function without any parameters will set the indent and syntax
-scripts back to their defaults, see |sql-type-default|. If you have turned
-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
-source. Using the |cmdline-completion| feature, the SQLSetType function will
-search the |'runtimepath'| for all Vim scripts with a name containing 'sql'.
-This takes the guess work out of the spelling of the names. The following are
-examples: >
- :SQLSetType
- :SQLSetType sqloracle
- :SQLSetType sqlanywhere
- :SQLSetType sqlinformix
- :SQLSetType mysql
-
-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: >
- :SQL<Tab><space><Tab>
-
-
-2.2 SQL Dialect Default *sql-type-default*
------------------------
-As mentioned earlier, the default syntax rules for Vim is based on Oracle
-(PL/SQL). You can override this default by placing one of the following in
-your |vimrc|: >
- 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|: >
- 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
->
-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
-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
-to see if any customization currently exist. If not, you can begin by cloning
-an existing script. Read |filetype-plugins| for more details.
-
-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
- Windows
- $VIM/vimfiles/syntax/sqlite.vim
- $VIM/vimfiles/indent/sqlite.vim
-
-No changes are necessary to the SQLSetType function. It will automatically
-pickup 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
-code completion for the SQL language.
-
-There are two modes to the SQL completion plugin, static and dynamic. The
-static mode populates the popups with the data generated from current syntax
-highlight rules. The dynamic mode populates the popups with data retrieved
-directly from a database. This includes, table lists, column lists,
-procedures names and more.
-
-4.1 Static Mode *sql-completion-static*
----------------
-The static popups created contain items defined by the active syntax rules
-while editing a file with a filetype of SQL. The plugin defines (by default)
-various maps to help the user refine the list of items to be displayed.
-The defaults static maps are: >
- imap <buffer> <C-C>a <C-\><C-O>:call sqlcomplete#Map('syntax')<CR><C-X><C-O>
- imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
- imap <buffer> <C-C>f <C-\><C-O>:call sqlcomplete#Map('sqlFunction')<CR><C-X><C-O>
- imap <buffer> <C-C>o <C-\><C-O>:call sqlcomplete#Map('sqlOption')<CR><C-X><C-O>
- 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 static maps (which are based on the syntax highlight groups) follow this
-format: >
- imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
-
-This command breaks down as: >
- imap - Create an insert map
- <buffer> - Only for this buffer
- <C-C>k - Your choice of key map
- <C-\><C-O> - Execute one command, return to Insert mode
- :call sqlcomplete#Map( - Allows the SQL completion plugin to perform some
- housekeeping functions to allow it to be used in
- conjunction with other completion plugins.
- Indicate which item you want the SQL completion
- plugin to complete.
- In this case we are asking the plugin to display
- items from the syntax highlight group
- 'sqlKeyword'.
- You can view a list of highlight group names to
- choose from by executing the
- :syntax list
- command while editing a SQL file.
- 'sqlKeyword' - Display the items for the sqlKeyword highlight
- group
- )<CR> - Execute the :let command
- <C-X><C-O> - Trigger the standard omni completion key stroke.
- 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
- 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
-10 different syntax files for the different dialects of SQL (see section 3
-above, |sql-dialects|).
-
-Here are some examples of the entries which are pulled from the syntax files: >
- All
- - Contains the contents of all syntax highlight groups
- Statements
- - Select, Insert, Update, Delete, Create, Alter, ...
- Functions
- - Min, Max, Trim, Round, Date, ...
- Keywords
- - Index, Database, Having, Group, With
- Options
- - Isolation_level, On_error, Qualify_owners, Fire_triggers, ...
- Types
- - Integer, Char, Varchar, Date, DateTime, Timestamp, ...
-
-
-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, (http://vim.sourceforge.net/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
-configuration and usage. The dbext plugin allows the SQL completion plugin
-to display a list of tables, procedures, views and columns. >
- Table List
- - All tables for all schema owners
- Procedure List
- - All stored procedures for all schema owners
- View List
- - All stored procedures for all schema owners
- Column List
- - For the selected table, the columns that are part of the table
-
-To enable the popup, while in INSERT mode, use the following key combinations
-for each group (where <C-C> means hold the CTRL key down while pressing
-the space bar):
- Table List - <C-C>t
- - <C-X><C-O> (the default map assumes tables)
- Stored Procedure List - <C-C>p
- View List - <C-C>v
- Column List - <C-C>c
-
- Windows platform only - When viewing a popup window displaying the list
- of tables, you can press <C-Right>, this will
- replace the table currently highlighted with
- the column list for that table.
- - When viewing a popup window displaying the list
- of columns, you can press <C-Left>, this will
- replace the column list with the list of tables.
- - This allows you to quickly drill down into a
- table to view it's columns and back again.
-
-The SQL completion plugin caches various lists that are displayed in
-the popup window. This makes the re-displaying of these lists very
-fast. If new tables or columns are added to the database it may become
-necessary to clear the plugins cache. The default map for this is: >
- imap <buffer> <C-C>R <C-\><C-O>:call sqlcomplete#Map('ResetCache')<CR><C-X><C-O>
-
-
-4.3 SQL Tutorial *sql-completion-tutorial*
-----------------
-
-This tutorial is designed to take you through the common features of the SQL
-completion plugin so that: >
- a) You gain familiarity with the plugin
- b) You are introduced to some of the more common features
- c) Show how to customize it to your preferences
- d) Demonstrate "Best of Use" of the plugin (easiest way to configure).
-
-First, create a new buffer: >
- :e tutorial.sql
-
-
-Static features
----------------
-To take you through the various lists, simply enter insert mode, hit:
- <C-C>s (show SQL statements)
-At this point, you can page down through the list until you find "select".
-If you are familiar with the item you are looking for, for example you know
-the statement begins with the letter "s". You can type ahead (without the
-quotes) "se" then press:
- <C-Space>t
-Assuming "select" is highlighted in the popup list press <Enter> to choose
-the entry. Now type:
- * fr<C-C>a (show all syntax items)
-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: >
- BEGIN
- DECLARE customer_id <C-C>T <-- Choose a type from the list
-
-
-Dynamic features
-----------------
-To take advantage of the dynamic features you must first install the
-dbext.vim plugin (http://vim.sourceforge.net/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
-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
-documentation.
-
-Assuming you have followed the dbext-tutorial you can press <C-C>t to
-display a list of tables. There is a delay while dbext is creating the table
-list. After the list is displayed press <C-W>. This will remove both the
-popup window and the table name already chosen when the list became active. >
-
- 4.3.1 Table Completion: *sql-completion-tables*
-
-Press <C-C>t to display a list of tables from within the database you
-have connected via the dbext plugin.
-NOTE: All of the SQL completion popups support typing a prefix before pressing
-the key map. This will limit the contents of the popup window to just items
-beginning with those characters. >
-
- 4.3.2 Column Completion: *sql-completion-columns*
-
-The SQL completion plugin can also display a list of columns for particular
-tables. The column completion is trigger via <C-C>c.
-
-NOTE: The following example uses <C-Right> to trigger a column list while
-the popup window is active. This map is only available on the Windows
-platforms since *nix does not recognize CTRL and the right arrow held down
-together. If you wish to enable this functionality on a *nix platform choose
-a key and create one of these mappings (see |sql-completion-maps| for further
-details on where to create this imap): >
- imap <buffer> <your_keystroke> <C-R>=sqlcomplete#DrillIntoTable()<CR>
- imap <buffer> <your_keystroke> <C-Y><C-\><C-O>:call sqlcomplete#Map('column')<CR><C-X><C-O>
-
-Example of using column completion:
- - Press <C-C>t again to display the list of tables.
- - When the list is displayed in the completion window, press <C-Right>,
- this will replace the list of tables, with a list of columns for the
- table highlighted (after the same short delay).
- - If you press <C-Left>, this will again replace the column list with the
- list of tables. This allows you to drill into tables and column lists
- very quickly.
- - Press <C-Right> again while the same table is highlighted. You will
- notice there is no delay since the column list has been cached. If you
- change the schema of a cached table you can press <C-C>R, which
- clears the SQL completion cache.
- - NOTE: <C-Right> and <C-Left> have been designed to work while the
- completion window is active. If the completion popup window is
- not active, a normal <C-Right> or <C-Left> will be executed.
-
-Lets look how we can build a SQL statement dynamically. A select statement
-requires a list of columns. There are two ways to build a column list using
-the SQL completion plugin. >
- One column at a time:
-< 1. After typing SELECT press <C-C>t to display a list of tables.
- 2. Choose a table from the list.
- 3. Press <C-Right> to display a list of columns.
- 4. Choose the column from the list and press enter.
- 5. Enter a "," and press <C-C>c. Generating a column list
- generally requires having the cursor on a table name. The plugin
- uses this name to determine what table to retrieve the column list.
- In this step, since we are pressing <C-C>c without the cursor
- on a table name the column list displayed will be for the previous
- table. Choose a different column and move on.
- 6. Repeat step 5 as often as necessary. >
- All columns for a table:
-< 1. After typing SELECT press <C-C>t to display a list of tables.
- 2. Highlight the table you need the column list for.
- 3. Press <Enter> to choose the table from the list.
- 4. Press <C-C>l to request a comma separated list of all columns
- for this table.
- 5. Based on the table name chosen in step 3, the plugin attempts to
- decide on a reasonable table alias. You are then prompted to
- either accept of change the alias. Press OK.
- 6. The table name is replaced with the column list of the table is
- replaced with the comma separate list of columns with the alias
- prepended to each of the columns.
- 7. Step 3 and 4 can be replaced by pressing <C-C>L, which has
- a <C-Y> embedded in the map to choose the currently highlighted
- table in the list.
-
-There is a special provision when writing select statements. Consider the
-following statement: >
- select *
- from customer c,
- contact cn,
- department as dp,
- employee e,
- site_options so
- where c.
-
-In INSERT mode after typing the final "c." which is an alias for the
-"customer" table, you can press either <C-C>c or <C-X><C-O>. This will
-popup a list of columns for the customer table. It does this by looking back
-to the beginning of the select statement and finding a list of the tables
-specified in the FROM clause. In this case it notes that in the string
-"customer c", "c" is an alias for the customer table. The optional "AS"
-keyword is also supported, "customer AS c". >
-
-
- 4.3.3 Procedure Completion: *sql-completion-procedures*
-
-Similar to the table list, <C-C>p, will display a list of stored
-procedures stored within the database. >
-
- 4.3.4 View Completion: *sql-completion-views*
-
-Similar to the table list, <C-C>v, will display a list of views in the
-database.
-
-
-4.4 Completion Customization *sql-completion-customization*
-----------------------------
-
-The SQL completion plugin can be customized through various options set in
-your |vimrc|: >
- 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 table. >
- <C-C>l
-< - Displays a comma separated list of columns for a specific table. >
- <C-C>L
-< - Displays a comma separated list of columns for a specific table.
- This should only be used when the completion window is active. >
- <C-Right>
-< - Displays a list of columns for the table currently highlighted in
- the completion window. <C-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. >
- <C-Left>
-< - Displays the list of tables.
- <C-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. >
- <C-C>R
-< - This maps removes all cached items and forces the SQL completion
- to regenerate the list of items.
-
-Customizing Maps
-----------------
-You can create as many additional key maps as you like. Generally, the maps
-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|: >
- let g:omni_sql_no_default_maps = 1
-
-Do no 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
-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
-chosen since it will work on both Windows and *nix platforms. On the windows
-platform you can also use <C-Space> or ALT keys.
-
-
-4.6 Using with other filetypes *sql-completion-filetypes*
-------------------------------
-
-Many times SQL can be used with different filetypes. For example Perl, Java,
-PHP, Javascript can all interact with a database. Often you need both the SQL
-completion as well as the completion capabilities for the current language you
-are editing.
-
-This can be enabled easily with the following steps (assuming a Perl file): >
- 1. :e test.pl
- 2. :set filetype=sql
- 3. :set ft=perl
-
-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
-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.
-
-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
-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
-we are attempting to use two different completion plugins. Since the SQL maps
-begin with <C-C>, the maps will toggle the |'omnifunc'| when in use. So you
-can use <C-X><C-O> to continue using the completion for Perl (using the syntax
-completion plugin) and <C-C> to use the SQL completion features.
-
-Step 3
-------
-Setting the filetype back to Perl sets all the usual "perl" related items back
-as they were.
-
-
-vim:tw=78:ts=8:ft=help:norl:
View
198 runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2007 May 15
+" Last Change: 2008 Jun 20
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -320,6 +320,9 @@ au BufNewFile,BufRead *.cs setf cs
" Cdrdao TOC
au BufNewFile,BufRead *.toc setf cdrtoc
+" Cdrdao config
+au BufNewFile,BufRead etc/cdrdao.conf,etc/defaults/cdrdao,etc/default/cdrdao,~/.cdrdao setf cdrdaoconf
+
" Cfengine
au BufNewFile,BufRead cfengine.conf setf cfengine
@@ -349,12 +352,22 @@ else
au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl setf cpp
endif
-" .h files can be C, Ch or C++, set c_syntax_for_h if you want C,
-" ch_syntax_for_h if you want Ch.
-au BufNewFile,BufRead *.h
- \ if exists("c_syntax_for_h") | setf c |
- \ elseif exists("ch_syntax_for_h") | setf ch |
- \ else | setf cpp | endif
+" .h files can be C, Ch C++, ObjC or ObjC++.
+" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
+" detected automatically.
+au BufNewFile,BufRead *.h call s:FTheader()
+
+func! s:FTheader()
+ if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
+ setf objc
+ elseif exists("c_syntax_for_h")
+ setf c
+ elseif exists("ch_syntax_for_h")
+ setf ch
+ else
+ setf cpp
+ endif
+endfunc
" Ch (CHscript)
au BufNewFile,BufRead *.chf setf ch
@@ -476,12 +489,18 @@ au BufNewFile,BufRead *.cpy
\ setf cobol |
\ endif
+" Coco/R
+au BufNewFile,BufRead *.atg setf coco
+
" Cold Fusion
au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
" Configure scripts
au BufNewFile,BufRead configure.in,configure.ac setf config
+" CUDA Cumpute Unified Device Architecture
+au BufNewFile,BufRead *.cu setf cuda
+
" WildPackets EtherPeek Decoder
au BufNewFile,BufRead *.dcd setf dcd
@@ -513,15 +532,31 @@ au BufNewFile,BufRead *.si setf cuplsim
" Debian Control
au BufNewFile,BufRead */debian/control setf debcontrol
+au BufNewFile,BufRead control
+ \ if getline(1) =~ '^Source:'
+ \| setf debcontrol
+ \| endif
" Debian Sources.list
au BufNewFile,BufRead /etc/apt/sources.list setf debsources
+" Deny hosts
+au BufNewFile,BufRead denyhosts.conf setf denyhosts
+
" ROCKLinux package description
au BufNewFile,BufRead *.desc setf desc
-" the D language
-au BufNewFile,BufRead *.d setf d
+" the D language or dtrace
+au BufNewFile,BufRead *.d call s:DtraceCheck()
+
+func! s:DtraceCheck()
+ let lines = getline(1, min([line("$"), 100]))
+ if match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1
+ setf dtrace
+ else
+ setf d
+ endif
+endfunc
" Desktop files
au BufNewFile,BufRead *.desktop,.directory setf desktop
@@ -597,8 +632,8 @@ func! s:FTe()
setf eiffel
endfunc
-" ERicsson LANGuage
-au BufNewFile,BufRead *.erl setf erlang
+" ERicsson LANGuage; Yaws is erlang too
+au BufNewFile,BufRead *.erl,*.yaws setf erlang
" Elm Filter Rules file
au BufNewFile,BufRead filter-rules setf elmfilt
@@ -643,11 +678,14 @@ au BufNewFile,BufRead *.mas,*.master setf master
" Forth
au BufNewFile,BufRead *.fs,*.ft setf forth
+" Reva Forth
+au BufNewFile,BufRead *.frt setf reva
+
" Fortran
if has("fname_case")
au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95 setf fortran
endif
-au BufNewFile,BufRead *.f,*.for,*.fpp,*.ftn,*.f77,*.f90,*.f95 setf fortran
+au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95 setf fortran
" FStab
au BufNewFile,BufRead fstab,mtab setf fstab
@@ -661,6 +699,19 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
" Gedcom
au BufNewFile,BufRead *.ged setf gedcom
+" Git
+autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
+autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
+autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase
+autocmd BufNewFile,BufRead .msg.[0-9]*
+ \ if getline(1) =~ '^From.*# This line is ignored.$' |
+ \ setf gitsendemail |
+ \ endif
+autocmd BufNewFile,BufRead *.git/**
+ \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
+ \ setf git |
+ \ endif
+
" Gkrellmrc
au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
@@ -701,6 +752,9 @@ au BufNewFile,BufRead *.hs setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell
au BufNewFile,BufRead *.chs setf chaskell
+" Haste
+au BufNewFile,BufRead *.ht setf haste
+
" Hercules
au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules
@@ -739,6 +793,9 @@ au BufNewFile,BufRead *.html.m4 setf htmlm4
" HTML Cheetah template
au BufNewFile,BufRead *.tmpl setf htmlcheetah
+" Host config
+au BufNewFile,BufRead /etc/host.conf setf hostconf
+
" Hyper Builder
au BufNewFile,BufRead *.hb setf hb
@@ -922,6 +979,9 @@ au BufNewFile,BufRead *.lou,*.lout setf lout
" Lua
au BufNewFile,BufRead *.lua setf lua
+" Linden Scripting Language (Second Life)
+au BufNewFile,BufRead *.lsl setf lsl
+
" Lynx style file (or LotusScript!)
au BufNewFile,BufRead *.lss setf lss
@@ -933,7 +993,7 @@ au BufNewFile,BufRead *.m4
au BufNewFile,BufRead *.mgp setf mgp
" Mail (for Elm, trn, mutt, muttng, rn, slrn)
-au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]._-]\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
+au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
" Mail aliases
au BufNewFile,BufRead /etc/mail/aliases,/etc/aliases setf mailaliases
@@ -987,6 +1047,9 @@ func! s:FTm()
endif
endfunc
+" Mathematica notebook
+au BufNewFile,BufRead *.nb setf mma
+
" Maya Extension Language
au BufNewFile,BufRead *.mel setf mel
@@ -1005,6 +1068,9 @@ au BufNewFile,BufRead *.mgl setf mgl
" MMIX or VMS makefile
au BufNewFile,BufRead *.mms call s:FTmms()
+" Symbian meta-makefile definition (MMP)
+au BufNewFile,BufRead *.mmp setf mmp
+
func! s:FTmms()
let n = 1
while n < 10
@@ -1075,8 +1141,7 @@ au BufRead,BufNewFile *.mu setf mupad
au BufNewFile,BufRead *.mush setf mush
" Mutt setup file (also for Muttng)
-au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
-au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
+au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
" Nano
au BufNewFile,BufRead /etc/nanorc,.nanorc setf nanorc
@@ -1169,6 +1234,9 @@ au BufNewFile,BufRead *.pas setf pascal
" Delphi project file
au BufNewFile,BufRead *.dpr setf pascal
+" PDF
+au BufNewFile,BufRead *.pdf setf pdf
+
" Perl
if has("fname_case")
au BufNewFile,BufRead *.pl,*.PL call s:FTpl()
@@ -1206,10 +1274,9 @@ au BufNewFile,BufRead *.pm
au BufNewFile,BufRead *.pod setf pod
" Php, php3, php4, etc.
-au BufNewFile,BufRead *.php,*.php\d setf php
-
-" Phtml
-au BufNewFile,BufRead *.phtml setf phtml
+" Also Phtml (was used for PHP 2 in the past)
+" Also .ctp for Cake template file
+au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
" Pike
au BufNewFile,BufRead *.pike,*.lpc,*.ulpc,*.pmod setf pike
@@ -1377,6 +1444,9 @@ au BufNewFile,BufRead INDEX,INFO
" Prolog
au BufNewFile,BufRead *.pdb setf prolog
+" Promela
+au BufNewFile,BufRead *.pml setf promela
+
" Protocols
au BufNewFile,BufRead /etc/protocols setf protocols
@@ -1406,7 +1476,7 @@ au BufNewFile,BufRead *.reg
au BufNewFile,BufRead *.rib setf rib
" Rexx
-au BufNewFile,BufRead *.rexx,*.rex setf rexx
+au BufNewFile,BufRead *.rexx,*.rex,*.jrexx,*.rxj,*.orx setf rexx
" R (Splus)
if has("fname_case")
@@ -1437,7 +1507,7 @@ func! s:FTr()
for n in range(1, max)
" Rebol is easy to recognize, check for that first
- if getline(n) =~ '\<REBOL\>'
+ if getline(n) =~? '\<REBOL\>'
setf rebol
return
endif
@@ -1523,8 +1593,24 @@ au BufNewFile,BufRead *.siv setf sieve
" Sendmail
au BufNewFile,BufRead sendmail.cf setf sm
-" Sendmail .mc files are actually m4
-au BufNewFile,BufRead *.mc setf m4
+" Sendmail .mc files are actually m4. Could also be MS Message text file.
+au BufNewFile,BufRead *.mc call s:McSetf()
+
+func! s:McSetf()
+ " Rely on the file to start with a comment.
+ " MS message text files use ';', Sendmail files use '#' or 'dnl'
+ for lnum in range(1, min([line("$"), 20]))
+ let line = getline(lnum)
+ if line =~ '^\s*\(#\|dnl\)'
+ setf m4 " Sendmail .mc file
+ return
+ elseif line =~ '^\s*;'
+ setf msmessages " MS Message text file
+ return
+ endif
+ endfor
+ setf m4 " Default: Sendmail .mc file
+endfunc
" Services
au BufNewFile,BufRead /etc/services setf services
@@ -1710,17 +1796,21 @@ au BufNewFile,BufRead *.rules call s:FTRules()
let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
func! s:FTRules()
+ if expand('<amatch>:p') =~ '^/etc/udev/rules\.d/.*\.rules$'
+ setf udevrules
+ return
+ endif
try
let config_lines = readfile('/etc/udev/udev.conf')
catch /^Vim\%((\a\+)\)\=:E484/
setf hog
return
endtry
+ let dir = expand('<amatch>:p:h')
for line in config_lines
if line =~ s:ft_rules_udev_rules_pattern
let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "")
- let amatch_dirname = substitute(expand('<amatch>'), '^\(.*\)/[^/]\+$', '\1', "")
- if amatch_dirname == udev_rules
+ if dir == udev_rules
setf udevrules
endif
break
@@ -1786,6 +1876,9 @@ au BufNewFile,BufRead *.stp setf stp
" Standard ML
au BufNewFile,BufRead *.sml setf sml
+" Sratus VOS command macro
+au BufNewFile,BufRead *.cm setf voscm
+
" Sysctl
au BufNewFile,BufRead /etc/sysctl.conf setf sysctl
@@ -1892,8 +1985,8 @@ func! s:FTtex()
return
endfunc
-" Context
-au BufNewFile,BufRead tex/context/*/*.tex setf context
+" ConTeXt
+au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv setf context
" Texinfo
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
@@ -1928,9 +2021,6 @@ au BufNewFile,BufRead *.uit,*.uil setf uil
" Udev conf
au BufNewFile,BufRead /etc/udev/udev.conf setf udevconf
-" Udev rules
-au BufNewFile,BufRead /etc/udev/rules.d/*.rules setf udevrules
-
" Udev permissions
au BufNewFile,BufRead /etc/udev/permissions.d/*.permissions setf udevperm
"
@@ -2049,14 +2139,26 @@ au BufNewFile,BufRead *.msc,*.msf setf xmath
au BufNewFile,BufRead *.ms
\ if !s:FTnroff() | setf xmath | endif
-" XML
-au BufNewFile,BufRead *.xml
- \ if getline(1) . getline(2) . getline(3) =~ '<!DOCTYPE.*DocBook' |
- \ let b:docbk_type="xml" |
- \ setf docbk |
- \ else |
- \ setf xml |
- \ endif
+" XML specific variants: docbk and xbl
+au BufNewFile,BufRead *.xml call s:FTxml()
+
+func! s:FTxml()
+ let n = 1
+ while n < 100 && n < line("$")
+ let line = getline(n)
+ if line =~ '<!DOCTYPE.*DocBook'
+ let b:docbk_type = "xml"
+ setf docbk
+ return
+ endif
+ if line =~ 'xmlns:xbl="http://www.mozilla.org/xbl"'
+ setf xbl
+ return
+ endif
+ let n += 1
+ endwhile
+ setf xml
+endfunc
" XMI (holding UML models) is also XML
au BufNewFile,BufRead *.xmi setf xml
@@ -2073,6 +2175,16 @@ au BufNewFile,BufRead *.tpm setf xml
" Xdg menus
au BufNewFile,BufRead /etc/xdg/menus/*.menu setf xml
+" ATI graphics driver configuration
+au BufNewFile,BufRead fglrxrc setf xml
+
+" XLIFF (XML Localisation Interchange File Format) is also XML
+au BufNewFile,BufRead *.xlf setf xml
+au BufNewFile,BufRead *.xliff setf xml
+
+" X11 xmodmap (also see below)
+au BufNewFile,BufRead *Xmodmap setf xmodmap
+
" Xquery
au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery
@@ -2201,13 +2313,17 @@ au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
" Makefile
au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
-" Modconf
-au BufNewFile,BufRead /etc/modprobe.* call s:StarSetf('modconf')
-
" Ruby Makefile
au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
+" Mail (also matches muttrc.vim, so this is below the other checks)
+au BufNewFile,BufRead mutt[[:alnum:]._-]\{6\} setf mail
+
+" Modconf
+au BufNewFile,BufRead /etc/modprobe.* call s:StarSetf('modconf')
+
" Mutt setup file
+au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
" Nroff macros
View
24 runtime/makemenu.vim
@@ -1,6 +1,6 @@
" Script to define the syntax menu in synmenu.vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2007 May 10
+" Last Change: 2008 Jun 24
" This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim
@@ -116,6 +116,7 @@ SynMenu C.Calendar:calendar
SynMenu C.Cascading\ Style\ Sheets:css
SynMenu C.CDL:cdl
SynMenu C.Cdrdao\ TOC:cdrtoc
+SynMenu C.Cdrdao\ config:cdrdaoconf
SynMenu C.Century\ Term:cterm
SynMenu C.CH\ script:ch
SynMenu C.ChangeLog:changelog
@@ -128,6 +129,7 @@ SynMenu C.Clipper:clipper
SynMenu C.Cmake:cmake
SynMenu C.Cmusrc:cmusrc
SynMenu C.Cobol:cobol
+SynMenu C.Coco/R:coco
SynMenu C.Cold\ Fusion:cf
SynMenu C.Conary\ Recipe:conaryrecipe
SynMenu C.Config.Cfg\ Config\ file:cfg
@@ -137,6 +139,7 @@ SynMenu C.CRM114:crm
SynMenu C.Crontab:crontab
SynMenu C.CSP:csp
SynMenu C.Ctrl-H:ctrlh
+SynMenu C.CUDA:cuda
SynMenu C.CUPL.CUPL:cupl
SynMenu C.CUPL.Simulation:cuplsim
SynMenu C.CVS.commit\ file:cvs
@@ -148,6 +151,7 @@ SynMenu DE.D:d
SynMenu DE.Debian.Debian\ ChangeLog:debchangelog
SynMenu DE.Debian.Debian\ Control:debcontrol
SynMenu DE.Debian.Debian\ Sources\.list:debsources
+SynMenu DE.Denyhosts:denyhosts
SynMenu DE.Desktop:desktop
SynMenu DE.Dict\ config:dictconf
SynMenu DE.Dictd\ config:dictdconf
@@ -168,6 +172,7 @@ SynMenu DE.Dracula:dracula
SynMenu DE.DSSSL:dsl
SynMenu DE.DTD:dtd
SynMenu DE.DTML\ (Zope):dtml
+SynMenu DE.DTrace:dtrace
SynMenu DE.Dylan.Dylan:dylan
SynMenu DE.Dylan.Dylan\ interface:dylanintr
SynMenu DE.Dylan.Dylan\ lid:dylanlid
@@ -205,6 +210,11 @@ SynMenu FG.Fvwm.Fvwm2\ configuration\ with\ M4:fvwm2m4
SynMenu FG.GDB\ command\ file:gdb
SynMenu FG.GDMO:gdmo
SynMenu FG.Gedcom:gedcom
+SynMenu FG.Git.Output:git
+SynMenu FG.Git.Commit:gitcommit
+SynMenu FG.Git.Config:gitconfig
+SynMenu FG.Git.Rebase:gitrebase
+SynMenu FG.Git.Send\ Email:gitsendemail
SynMenu FG.Gkrellmrc:gkrellmrc
SynMenu FG.GP:gp
SynMenu FG.GPG:gpg
@@ -222,6 +232,7 @@ SynMenu HIJK.Hamster:hamster
SynMenu HIJK.Haskell.Haskell:haskell
SynMenu HIJK.Haskell.Haskell-c2hs:chaskell
SynMenu HIJK.Haskell.Haskell-literate:lhaskell
+SynMenu HIJK.HASTE:haste
SynMenu HIJK.Hercules:hercules
SynMenu HIJK.Hex\ dump.XXD:xxd
SynMenu HIJK.Hex\ dump.Intel\ MCS51:hex
@@ -232,6 +243,7 @@ SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah
SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango
SynMenu HIJK.HTML.HTML/OS:htmlos
SynMenu HIJK.HTML.XHTML:xhtml
+SynMenu HIJK.Host\.conf:hostconf
SynMenu HIJK.Hyper\ Builder:hb
SynMenu HIJK.Icewm\ menu:icemenu
SynMenu HIJK.Icon:icon
@@ -273,6 +285,7 @@ SynMenu L-Ma.Libao:libao
SynMenu L-Ma.LifeLines\ script:lifelines
SynMenu L-Ma.Lilo:lilo
SynMenu L-Ma.Limits\ config:limits
+SynMenu L-Ma.Linden\ scripting:lsl
SynMenu L-Ma.Lisp:lisp
SynMenu L-Ma.Lite:lite
SynMenu L-Ma.LiteStep\ RC:litestep
@@ -320,6 +333,7 @@ SynMenu Me-NO.Mrxvtrc:mrxvtrc
SynMenu Me-NO.MS-DOS/Windows.4DOS\ \.bat\ file:btm
SynMenu Me-NO.MS-DOS/Windows.\.bat\/\.cmd\ file:dosbatch
SynMenu Me-NO.MS-DOS/Windows.\.ini\ file:dosini
+SynMenu Me-NO.MS-DOS/Windows.Message\ text:msmessages
SynMenu Me-NO.MS-DOS/Windows.Module\ Definition:def
SynMenu Me-NO.MS-DOS/Windows.Registry:registry
SynMenu Me-NO.MS-DOS/Windows.Resource\ file:rc
@@ -351,7 +365,7 @@ SynMenu PQ.PApp:papp
SynMenu PQ.Pascal:pascal
SynMenu PQ.Password\ file:passwd
SynMenu PQ.PCCTS:pccts
-SynMenu PQ.PPWizard:ppwiz
+SynMenu PQ.PDF:pdf
SynMenu PQ.Perl.Perl:perl
SynMenu PQ.Perl.Perl\ POD:pod
SynMenu PQ.Perl.Perl\ XS:xs
@@ -369,6 +383,7 @@ SynMenu PQ.PostScript.PostScript:postscr
SynMenu PQ.PostScript.PostScript\ Printer\ Description:ppd
SynMenu PQ.Povray.Povray\ scene\ descr:pov
SynMenu PQ.Povray.Povray\ configuration:povini
+SynMenu PQ.PPWizard:ppwiz
SynMenu PQ.Prescribe\ (Kyocera):prescribe
SynMenu PQ.Printcap:pcap
SynMenu PQ.Privoxy:privoxy
@@ -376,6 +391,7 @@ SynMenu PQ.Procmail:procmail
SynMenu PQ.Product\ Spec\ File:psf
SynMenu PQ.Progress:progress
SynMenu PQ.Prolog:prolog
+SynMenu PQ.ProMeLa:promela
SynMenu PQ.Protocols:protocols
SynMenu PQ.Purify\ log:purifylog
SynMenu PQ.Pyrex:pyrex
@@ -398,6 +414,7 @@ SynMenu R-Sg.Relax\ NG\ compact:rnc
SynMenu R-Sg.Renderman.Renderman\ Shader\ Lang:sl
SynMenu R-Sg.Renderman.Renderman\ Interface\ Bytestream:rib
SynMenu R-Sg.Resolv\.conf:resolv
+SynMenu R-Sg.Reva\ Forth:reva
SynMenu R-Sg.Rexx:rexx
SynMenu R-Sg.Robots\.txt:robots
SynMenu R-Sg.RockLinux\ package\ desc\.:desc
@@ -481,6 +498,7 @@ SynMenu Sh-S.Strace:strace
SynMenu Sh-S.Streaming\ descriptor\ file:sd
SynMenu Sh-S.Subversion\ commit:svn
SynMenu Sh-S.Sudoers:sudoers
+SynMenu Sh-S.Symbian\ meta-makefile:mmp
SynMenu Sh-S.Sysctl\.conf:sysctl
SynMenu TUV.TADS:tads
@@ -524,6 +542,7 @@ SynMenu TUV.Vim.Vim\ script:vim
SynMenu TUV.Vim.Viminfo\ file:viminfo
SynMenu TUV.Virata\ config:virata
SynMenu TUV.Visual\ Basic:vb
+SynMenu TUV.VOS\ CM\ macro:voscm
SynMenu TUV.VRML:vrml
SynMenu TUV.VSE\ JCL:vsejcl
@@ -544,6 +563,7 @@ SynMenu WXYZ.X\ Keyboard\ Extension:xkb
SynMenu WXYZ.X\ Pixmap:xpm
SynMenu WXYZ.X\ Pixmap\ (2):xpm2
SynMenu WXYZ.X\ resources:xdefaults
+SynMenu WXYZ.XBL:xbl
SynMenu WXYZ.Xinetd\.conf:xinetd
SynMenu WXYZ.Xmodmap:xmodmap
SynMenu WXYZ.Xmath:xmath
View
14 runtime/menu.vim
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2007 Nov 19
+" Last Change: 2008 Jun 16
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -135,6 +135,11 @@ func! <SID>SelectAll()
exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
endfunc
+func! s:FnameEscape(fname)
+ if exists('*fnameescape')
+ return fnameescape(a:fname)
+ return escape(a:fname, " \t\n*?[{`$\\%#'\"|!<")
+endfunc
" Edit menu
an 20.310 &Edit.&Undo<Tab>u u
@@ -193,6 +198,7 @@ fun! s:EditVimrc()
else
let fname = "$HOME/.vimrc"
endif
+ let fname = s:FnameEscape(fname)
if &mod
exe "split " . fname
else
@@ -806,7 +812,7 @@ if has("vertsplit")
if @% == ""
20vsp .
else
- exe "20vsp " . expand("%:p:h")
+ exe "20vsp " . s:FnameEscape(expand("%:p:h"))
endif
endfun
endif
@@ -1028,7 +1034,7 @@ endif
" Select a session to load; default to current session name if present
fun! s:LoadVimSesn()
if strlen(v:this_session) > 0
- let name = escape(v:this_session, ' \t#%$|<>"*?[{`')
+ let name = s:FnameEscape(v:this_session)
else
let name = "Session.vim"
endif
@@ -1040,7 +1046,7 @@ fun! s:SaveVimSesn()
if strlen(v:this_session) == 0
let v:this_session = "Session.vim"
endif
- execute "browse mksession! " . escape(v:this_session, ' \t#%$|<>"*?[{`')
+ execute "browse mksession! " . s:FnameEscape(v:this_session)
endfun
endif
View
10 runtime/scripts.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2007 Apr 29
+" Last change: 2008 Apr 28
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -234,6 +234,10 @@ else
elseif s:line1 =~ '\<DTD\s\+XHTML\s'
set ft=xhtml
+ " PDF
+ elseif s:line1 =~ '^%PDF-'
+ set ft=pdf
+
" XXD output
elseif s:line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
set ft=xxd
@@ -309,6 +313,10 @@ else
elseif s:line1 =~ 'exec\s\+\S*scheme' || s:line2 =~ 'exec\s\+\S*scheme'
set ft=scheme
+ " Git output
+ elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}$\|^tag \S\+$'
+ set ft=git
+
" CVS diff
else
let lnum = 1
View
464 runtime/synmenu.vim
@@ -101,75 +101,80 @@ an 50.20.130 &Syntax.C.Calendar :cal SetSyn("calendar")<CR>