hokorobi | c3989f1 | 2024-09-29 10:08:40 +0200 | [diff] [blame] | 1 | *ft_ada.txt* For Vim version 9.1. Last change: 2024 Sep 29 |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | ADA FILE TYPE PLUG-INS REFERENCE MANUAL~ |
| 5 | |
| 6 | ADA *ada.vim* |
| 7 | |
| 8 | 1. Syntax Highlighting |ft-ada-syntax| |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 9 | 2. File type Plug-in |ft-ada-plugin| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 10 | 3. Omni Completion |ft-ada-omni| |
| 11 | 3.1 Omni Completion with "gnat xref" |gnat-xref| |
| 12 | 3.2 Omni Completion with "ctags" |ada-ctags| |
| 13 | 4. Compiler Support |ada-compiler| |
| 14 | 4.1 GNAT |compiler-gnat| |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 15 | 4.2 Dec Ada |compiler-decada| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 16 | 5. References |ada-reference| |
| 17 | 5.1 Options |ft-ada-options| |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 18 | 5.2 Commands |ft-ada-commands| |
| 19 | 5.3 Variables |ft-ada-variables| |
| 20 | 5.4 Constants |ft-ada-constants| |
| 21 | 5.5 Functions |ft-ada-functions| |
| 22 | 6. Extra Plug-ins |ada-extra-plugins| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 23 | |
| 24 | ============================================================================== |
| 25 | 1. Syntax Highlighting ~ |
| 26 | *ft-ada-syntax* |
| 27 | |
| 28 | This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes |
| 29 | support for objected-programming, protected types, and so on. It handles code |
| 30 | written for the original Ada language ("Ada83", "Ada87", "Ada95") as well, |
| 31 | though code which uses Ada 2005-only keywords will be wrongly colored (such |
| 32 | code should be fixed anyway). For more information about Ada, see |
| 33 | http://www.adapower.com. |
| 34 | |
| 35 | The Ada mode handles a number of situations cleanly. |
| 36 | |
| 37 | For example, it knows that the "-" in "-5" is a number, but the same character |
| 38 | in "A-5" is an operator. Normally, a "with" or "use" clause referencing |
| 39 | another compilation unit is coloured the same way as C's "#include" is coloured. |
| 40 | If you have "Conditional" or "Repeat" groups coloured differently, then "end |
| 41 | if" and "end loop" will be coloured as part of those respective groups. |
| 42 | |
| 43 | You can set these to different colours using vim's "highlight" command (e.g., |
| 44 | to change how loops are displayed, enter the command ":hi Repeat" followed by |
| 45 | the colour specification; on simple terminals the colour specification |
| 46 | ctermfg=White often shows well). |
| 47 | |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 48 | There are several options you can select in this Ada mode. See |ft-ada-options| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 49 | for a complete list. |
| 50 | |
hokorobi | c3989f1 | 2024-09-29 10:08:40 +0200 | [diff] [blame] | 51 | To enable them, assign a value to the option. For example, to turn one on: > |
| 52 | let g:ada_standard_types = 1 |
| 53 | < |
| 54 | To disable them use ":unlet". Example: > |
| 55 | unlet g:ada_standard_types |
| 56 | < |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 57 | You can just use ":" and type these into the command line to set these |
| 58 | temporarily before loading an Ada file. You can make these option settings |
| 59 | permanent by adding the "let" command(s), without a colon, to your "~/.vimrc" |
| 60 | file. |
| 61 | |
| 62 | Even on a slow (90Mhz) PC this mode works quickly, but if you find the |
| 63 | performance unacceptable, turn on |g:ada_withuse_ordinary|. |
| 64 | |
| 65 | Syntax folding instructions (|fold-syntax|) are added when |g:ada_folding| is |
| 66 | set. |
| 67 | |
| 68 | ============================================================================== |
| 69 | 2. File type Plug-in ~ |
| 70 | *ft-ada-indent* *ft-ada-plugin* |
| 71 | |
| 72 | The Ada plug-in provides support for: |
| 73 | |
| 74 | - auto indenting (|indent.txt|) |
| 75 | - insert completion (|i_CTRL-N|) |
| 76 | - user completion (|i_CTRL-X_CTRL-U|) |
| 77 | - tag searches (|tagsrch.txt|) |
| 78 | - Quick Fix (|quickfix.txt|) |
| 79 | - backspace handling (|'backspace'|) |
| 80 | - comment handling (|'comments'|, |'commentstring'|) |
| 81 | |
| 82 | The plug-in only activates the features of the Ada mode whenever an Ada |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 83 | file is opened and adds Ada related entries to the main and pop-up menu. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 84 | |
| 85 | ============================================================================== |
| 86 | 3. Omni Completion ~ |
| 87 | *ft-ada-omni* |
| 88 | |
| 89 | The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either |
Bram Moolenaar | 47c532e | 2022-03-19 15:18:53 +0000 | [diff] [blame] | 90 | by "gnat xref -v" or the "Universal Ctags" (https://ctags.io). The complete |
| 91 | function will automatically detect which tool was used to create the tags |
| 92 | file. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 93 | |
| 94 | ------------------------------------------------------------------------------ |
| 95 | 3.1 Omni Completion with "gnat xref" ~ |
| 96 | *gnat-xref* |
| 97 | |
| 98 | GNAT XREF uses the compiler internal information (ali-files) to produce the |
| 99 | tags file. This has the advantage to be 100% correct and the option of deep |
| 100 | nested analysis. However the code must compile, the generator is quite |
| 101 | slow and the created tags file contains only the basic Ctags information for |
| 102 | each entry - not enough for some of the more advanced Vim code browser |
| 103 | plug-ins. |
| 104 | |
| 105 | NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic |
| 106 | output - If nothing is printed then usually the parameters are wrong. |
| 107 | Here some important tips: |
| 108 | |
| 109 | 1) You need to compile your code first and use the "-aO" option to point to |
| 110 | your .ali files. |
| 111 | 2) "gnat xref -v ../Include/adacl.ads" won't work - use the "gnat xref -v |
| 112 | -aI../Include adacl.ads" instead. |
| 113 | 3) "gnat xref -v -aI../Include *.ad?" won't work - use "cd ../Include" and |
| 114 | then "gnat xref -v *.ad?" |
| 115 | 4) Project manager support is completely broken - don't even try "gnat xref |
| 116 | -Padacl.gpr". |
Bram Moolenaar | 6aa8cea | 2017-06-05 14:44:35 +0200 | [diff] [blame] | 117 | 5) Vim is faster when the tags file is sorted - use "sort --unique |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 118 | --ignore-case --output=tags tags" . |
| 119 | 6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark |
| 120 | the file assorted. |
| 121 | |
| 122 | ------------------------------------------------------------------------------ |
| 123 | 3.2 Omni Completion with "ctags"~ |
| 124 | *ada-ctags* |
| 125 | |
Bram Moolenaar | 47c532e | 2022-03-19 15:18:53 +0000 | [diff] [blame] | 126 | Universal/Exuberant Ctags use their own multi-language code parser. The |
| 127 | parser is quite fast, produces a lot of extra information and can run on files |
| 128 | which currently do not compile. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 129 | |
Bram Moolenaar | 47c532e | 2022-03-19 15:18:53 +0000 | [diff] [blame] | 130 | There are also lots of other Vim-tools which use Universal/Exuberant Ctags. |
| 131 | Universal Ctags is preferred, Exuberant Ctags is no longer being developed. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 132 | |
Bram Moolenaar | 47c532e | 2022-03-19 15:18:53 +0000 | [diff] [blame] | 133 | You will need to install Universal Ctags which is available from |
| 134 | https://ctags.io |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 135 | |
Bram Moolenaar | 47c532e | 2022-03-19 15:18:53 +0000 | [diff] [blame] | 136 | The Ada parser for Universal/Exuberant Ctags is fairly new - don't expect |
| 137 | complete support yet. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 138 | |
| 139 | ============================================================================== |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 140 | 4. Compiler Support ~ |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 141 | *ada-compiler* |
| 142 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 143 | The Ada mode supports more than one Ada compiler and will automatically load the |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 144 | compiler set in |g:ada_default_compiler| whenever an Ada source is opened. The |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 145 | provided compiler plug-ins are split into the actual compiler plug-in and a |
| 146 | collection of support functions and variables. This allows the easy |
| 147 | development of specialized compiler plug-ins fine tuned to your development |
| 148 | environment. |
| 149 | |
| 150 | ------------------------------------------------------------------------------ |
| 151 | 4.1 GNAT ~ |
| 152 | *compiler-gnat* |
| 153 | |
| 154 | GNAT is the only free (beer and speech) Ada compiler available. There are |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 155 | several versions available which differ in the licence terms used. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 156 | |
| 157 | The GNAT compiler plug-in will perform a compile on pressing <F7> and then |
| 158 | immediately shows the result. You can set the project file to be used by |
hokorobi | 6db3fc5 | 2024-09-29 10:10:51 +0200 | [diff] [blame] | 159 | setting: > |
| 160 | call g:gnat.Set_Project_File ('my_project.gpr') |
| 161 | < |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 162 | Setting a project file will also create a Vim session (|views-sessions|) so - |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 163 | like with the GPS - opened files, window positions etc. will be remembered |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 164 | separately for all projects. |
| 165 | |
| 166 | *gnat_members* |
| 167 | GNAT OBJECT ~ |
| 168 | |
| 169 | *g:gnat.Make()* |
| 170 | g:gnat.Make() |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 171 | Calls |g:gnat.Make_Command| and displays the result inside a |
zeertzjq | d086b8f | 2024-02-25 15:42:52 +0800 | [diff] [blame] | 172 | |quickfix| window. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 173 | |
| 174 | *g:gnat.Pretty()* |
| 175 | g:gnat.Pretty() |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 176 | Calls |g:gnat.Pretty_Program| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 177 | |
| 178 | *g:gnat.Find()* |
| 179 | g:gnat.Find() |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 180 | Calls |g:gnat.Find_Program| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 181 | |
| 182 | *g:gnat.Tags()* |
| 183 | g:gnat.Tags() |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 184 | Calls |g:gnat.Tags_Command| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 185 | |
| 186 | *g:gnat.Set_Project_File()* |
| 187 | g:gnat.Set_Project_File([{file}]) |
| 188 | Set gnat project file and load associated session. An open |
| 189 | project will be closed and the session written. If called |
| 190 | without file name the file selector opens for selection of a |
| 191 | project file. If called with an empty string then the project |
| 192 | and associated session are closed. |
| 193 | |
| 194 | *g:gnat.Project_File* |
| 195 | g:gnat.Project_File string |
| 196 | Current project file. |
| 197 | |
| 198 | *g:gnat.Make_Command* |
| 199 | g:gnat.Make_Command string |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 200 | External command used for |g:gnat.Make()| (|'makeprg'|). |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 201 | |
| 202 | *g:gnat.Pretty_Program* |
| 203 | g:gnat.Pretty_Program string |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 204 | External command used for |g:gnat.Pretty()| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 205 | |
| 206 | *g:gnat.Find_Program* |
| 207 | g:gnat.Find_Program string |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 208 | External command used for |g:gnat.Find()| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 209 | |
| 210 | *g:gnat.Tags_Command* |
| 211 | g:gnat.Tags_Command string |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 212 | External command used for |g:gnat.Tags()| |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 213 | |
| 214 | *g:gnat.Error_Format* |
| 215 | g:gnat.Error_Format string |
| 216 | Error format (|'errorformat'|) |
| 217 | |
| 218 | ------------------------------------------------------------------------------ |
| 219 | 4.2 Dec Ada ~ |
| 220 | *compiler-hpada* *compiler-decada* |
| 221 | *compiler-vaxada* *compiler-compaqada* |
| 222 | |
| 223 | Dec Ada (also known by - in chronological order - VAX Ada, Dec Ada, Compaq Ada |
| 224 | and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will |
| 225 | compile the current unit. |
| 226 | |
| 227 | The Dec Ada compiler expects the package name and not the file name to be |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 228 | passed as a parameter. The compiler plug-in supports the usual file name |
| 229 | convention to convert the file into a unit name. Both '-' and '__' are allowed |
| 230 | as separators. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 231 | |
| 232 | *decada_members* |
| 233 | DEC ADA OBJECT ~ |
| 234 | |
| 235 | *g:decada.Make()* |
| 236 | g:decada.Make() function |
Bram Moolenaar | f91787c | 2010-07-17 12:47:16 +0200 | [diff] [blame] | 237 | Calls |g:decada.Make_Command| and displays the result inside a |
| 238 | |quickfix| window. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 239 | |
| 240 | *g:decada.Unit_Name()* |
| 241 | g:decada.Unit_Name() function |
| 242 | Get the Unit name for the current file. |
| 243 | |
| 244 | *g:decada.Make_Command* |
| 245 | g:decada.Make_Command string |
Bram Moolenaar | f91787c | 2010-07-17 12:47:16 +0200 | [diff] [blame] | 246 | External command used for |g:decada.Make()| (|'makeprg'|). |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 247 | |
| 248 | *g:decada.Error_Format* |
Bram Moolenaar | d2f3a8b | 2018-06-19 14:35:59 +0200 | [diff] [blame] | 249 | g:decada.Error_Format string |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 250 | Error format (|'errorformat'|). |
| 251 | |
| 252 | ============================================================================== |
| 253 | 5. References ~ |
| 254 | *ada-reference* |
| 255 | |
| 256 | ------------------------------------------------------------------------------ |
| 257 | 5.1 Options ~ |
| 258 | *ft-ada-options* |
| 259 | |
| 260 | *g:ada_standard_types* |
| 261 | g:ada_standard_types bool (true when exists) |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 262 | Highlight types in package Standard (e.g., "Float"). |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 263 | |
| 264 | *g:ada_space_errors* |
| 265 | *g:ada_no_trail_space_error* |
| 266 | *g:ada_no_tab_space_error* |
| 267 | *g:ada_all_tab_usage* |
| 268 | g:ada_space_errors bool (true when exists) |
| 269 | Highlight extraneous errors in spaces ... |
| 270 | g:ada_no_trail_space_error |
| 271 | - but ignore trailing spaces at the end of a line |
| 272 | g:ada_no_tab_space_error |
| 273 | - but ignore tabs after spaces |
| 274 | g:ada_all_tab_usage |
| 275 | - highlight all tab use |
| 276 | |
| 277 | *g:ada_line_errors* |
| 278 | g:ada_line_errors bool (true when exists) |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 279 | Highlight lines which are too long. Note: This highlighting |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 280 | option is quite CPU intensive. |
| 281 | |
| 282 | *g:ada_rainbow_color* |
| 283 | g:ada_rainbow_color bool (true when exists) |
| 284 | Use rainbow colours for '(' and ')'. You need the |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 285 | rainbow_parenthesis for this to work. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 286 | |
| 287 | *g:ada_folding* |
| 288 | g:ada_folding set ('sigpft') |
| 289 | Use folding for Ada sources. |
| 290 | 's': activate syntax folding on load |
| 291 | 'p': fold packages |
| 292 | 'f': fold functions and procedures |
| 293 | 't': fold types |
| 294 | 'c': fold conditionals |
| 295 | 'g': activate gnat pretty print folding on load |
| 296 | 'i': lone 'is' folded with line above |
| 297 | 'b': lone 'begin' folded with line above |
| 298 | 'p': lone 'private' folded with line above |
| 299 | 'x': lone 'exception' folded with line above |
| 300 | 'i': activate indent folding on load |
| 301 | |
| 302 | Note: Syntax folding is in an early (unusable) stage and |
| 303 | indent or gnat pretty folding is suggested. |
| 304 | |
| 305 | For gnat pretty folding to work the following settings are |
| 306 | suggested: -cl3 -M79 -c2 -c3 -c4 -A1 -A2 -A3 -A4 -A5 |
| 307 | |
| 308 | For indent folding to work the following settings are |
| 309 | suggested: shiftwidth=3 softtabstop=3 |
| 310 | |
| 311 | *g:ada_abbrev* |
| 312 | g:ada_abbrev bool (true when exists) |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 313 | Add some abbreviations. This feature is more or less superseded |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 314 | by the various completion methods. |
| 315 | |
| 316 | *g:ada_withuse_ordinary* |
| 317 | g:ada_withuse_ordinary bool (true when exists) |
| 318 | Show "with" and "use" as ordinary keywords (when used to |
| 319 | reference other compilation units they're normally highlighted |
| 320 | specially). |
| 321 | |
| 322 | *g:ada_begin_preproc* |
| 323 | g:ada_begin_preproc bool (true when exists) |
| 324 | Show all begin-like keywords using the colouring of C |
| 325 | preprocessor commands. |
| 326 | |
| 327 | *g:ada_omni_with_keywords* |
| 328 | g:ada_omni_with_keywords |
| 329 | Add Keywords, Pragmas, Attributes to omni-completions |
| 330 | (|compl-omni|). Note: You can always complete then with user |
| 331 | completion (|i_CTRL-X_CTRL-U|). |
| 332 | |
| 333 | *g:ada_extended_tagging* |
| 334 | g:ada_extended_tagging enum ('jump', 'list') |
| 335 | use extended tagging, two options are available |
| 336 | 'jump': use tjump to jump. |
| 337 | 'list': add tags quick fix list. |
| 338 | Normal tagging does not support function or operator |
| 339 | overloading as these features are not available in C and |
| 340 | tagging was originally developed for C. |
| 341 | |
| 342 | *g:ada_extended_completion* |
| 343 | g:ada_extended_completion |
| 344 | Uses extended completion for <C-N> and <C-R> completions |
| 345 | (|i_CTRL-N|). In this mode the '.' is used as part of the |
| 346 | identifier so that 'Object.Method' or 'Package.Procedure' are |
| 347 | completed together. |
| 348 | |
| 349 | *g:ada_gnat_extensions* |
| 350 | g:ada_gnat_extensions bool (true when exists) |
| 351 | Support GNAT extensions. |
| 352 | |
| 353 | *g:ada_with_gnat_project_files* |
| 354 | g:ada_with_gnat_project_files bool (true when exists) |
| 355 | Add gnat project file keywords and Attributes. |
| 356 | |
| 357 | *g:ada_default_compiler* |
| 358 | g:ada_default_compiler string |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 359 | set default compiler. Currently supported are 'gnat' and |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 360 | 'decada'. |
| 361 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 362 | An "exists" type is a boolean considered true when the variable is defined and |
| 363 | false when the variable is undefined. The value to which the variable is set |
| 364 | makes no difference. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 365 | |
| 366 | ------------------------------------------------------------------------------ |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 367 | 5.2 Commands ~ |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 368 | *ft-ada-commands* |
| 369 | |
| 370 | :AdaRainbow *:AdaRainbow* |
| 371 | Toggles rainbow colour (|g:ada_rainbow_color|) mode for |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 372 | '(' and ')'. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 373 | |
| 374 | :AdaLines *:AdaLines* |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 375 | Toggles line error (|g:ada_line_errors|) display. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 376 | |
| 377 | :AdaSpaces *:AdaSpaces* |
| 378 | Toggles space error (|g:ada_space_errors|) display. |
| 379 | |
| 380 | :AdaTagDir *:AdaTagDir* |
| 381 | Creates tags file for the directory of the current file. |
| 382 | |
| 383 | :AdaTagFile *:AdaTagFile* |
| 384 | Creates tags file for the current file. |
| 385 | |
| 386 | :AdaTypes *:AdaTypes* |
| 387 | Toggles standard types (|g:ada_standard_types|) colour. |
| 388 | |
| 389 | :GnatFind *:GnatFind* |
| 390 | Calls |g:gnat.Find()| |
| 391 | |
| 392 | :GnatPretty *:GnatPretty* |
| 393 | Calls |g:gnat.Pretty()| |
| 394 | |
| 395 | :GnatTags *:GnatTags* |
| 396 | Calls |g:gnat.Tags()| |
| 397 | |
| 398 | ------------------------------------------------------------------------------ |
| 399 | 5.3 Variables ~ |
| 400 | *ft-ada-variables* |
| 401 | |
| 402 | *g:gnat* |
| 403 | g:gnat object |
| 404 | Control object which manages GNAT compiles. The object |
| 405 | is created when the first Ada source code is loaded provided |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 406 | that |g:ada_default_compiler| is set to 'gnat'. See |
Bram Moolenaar | f91787c | 2010-07-17 12:47:16 +0200 | [diff] [blame] | 407 | |gnat_members| for details. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 408 | |
| 409 | *g:decada* |
| 410 | g:decada object |
| 411 | Control object which manages Dec Ada compiles. The object |
| 412 | is created when the first Ada source code is loaded provided |
Bram Moolenaar | 9855d6b | 2010-07-18 14:34:51 +0200 | [diff] [blame] | 413 | that |g:ada_default_compiler| is set to 'decada'. See |
| 414 | |decada_members| for details. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 415 | |
| 416 | ------------------------------------------------------------------------------ |
| 417 | 5.4 Constants ~ |
| 418 | *ft-ada-constants* |
| 419 | |
| 420 | All constants are locked. See |:lockvar| for details. |
| 421 | |
| 422 | *g:ada#WordRegex* |
| 423 | g:ada#WordRegex string |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 424 | Regular expression to search for Ada words. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 425 | |
| 426 | *g:ada#DotWordRegex* |
| 427 | g:ada#DotWordRegex string |
| 428 | Regular expression to search for Ada words separated by dots. |
| 429 | |
| 430 | *g:ada#Comment* |
| 431 | g:ada#Comment string |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 432 | Regular expression to search for Ada comments. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 433 | |
| 434 | *g:ada#Keywords* |
| 435 | g:ada#Keywords list of dictionaries |
| 436 | List of keywords, attributes etc. pp. in the format used by |
| 437 | omni completion. See |complete-items| for details. |
| 438 | |
| 439 | *g:ada#Ctags_Kinds* |
| 440 | g:ada#Ctags_Kinds dictionary of lists |
| 441 | Dictionary of the various kinds of items which the Ada support |
| 442 | for Ctags generates. |
| 443 | |
| 444 | ------------------------------------------------------------------------------ |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 445 | 5.5 Functions ~ |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 446 | *ft-ada-functions* |
| 447 | |
| 448 | ada#Word([{line}, {col}]) *ada#Word()* |
| 449 | Return full name of Ada entity under the cursor (or at given |
| 450 | line/column), stripping white space/newlines as necessary. |
| 451 | |
| 452 | ada#List_Tag([{line}, {col}]) *ada#Listtags()* |
| 453 | List all occurrences of the Ada entity under the cursor (or at |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 454 | given line/column) inside the quick-fix window. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 455 | |
| 456 | ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()* |
| 457 | List all occurrences of the Ada entity under the cursor (or at |
| 458 | given line/column) in the tag jump list. Mode can either be |
| 459 | 'tjump' or 'stjump'. |
| 460 | |
| 461 | ada#Create_Tags ({option}) *ada#Create_Tags()* |
| 462 | Creates tag file using Ctags. The option can either be 'file' |
| 463 | for the current file, 'dir' for the directory of the current |
| 464 | file or a file name. |
| 465 | |
| 466 | gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()* |
| 467 | Adds the tag file header (!_TAG_) information to the current |
| 468 | file which are missing from the GNAT XREF output. |
| 469 | |
| 470 | ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()* |
| 471 | Toggles highlighting options on or off. Used for the Ada menu. |
| 472 | |
| 473 | *gnat#New()* |
| 474 | gnat#New () |
| 475 | Create a new gnat object. See |g:gnat| for details. |
| 476 | |
| 477 | |
| 478 | ============================================================================== |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 479 | 6. Extra Plugins ~ |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 480 | *ada-extra-plugins* |
| 481 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 482 | You can optionally install the following extra plug-ins. They work well with |
| 483 | Ada and enhance the ability of the Ada mode: |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 484 | |
| 485 | backup.vim |
| 486 | http://www.vim.org/scripts/script.php?script_id=1537 |
| 487 | Keeps as many backups as you like so you don't have to. |
| 488 | |
| 489 | rainbow_parenthsis.vim |
| 490 | http://www.vim.org/scripts/script.php?script_id=1561 |
| 491 | Very helpful since Ada uses only '(' and ')'. |
| 492 | |
| 493 | nerd_comments.vim |
| 494 | http://www.vim.org/scripts/script.php?script_id=1218 |
| 495 | Excellent commenting and uncommenting support for almost any |
| 496 | programming language. |
| 497 | |
| 498 | matchit.vim |
| 499 | http://www.vim.org/scripts/script.php?script_id=39 |
| 500 | '%' jumping for any language. The normal '%' jump only works for '{}' |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 501 | style languages. The Ada mode will set the needed search patterns. |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 502 | |
| 503 | taglist.vim |
| 504 | http://www.vim.org/scripts/script.php?script_id=273 |
| 505 | Source code explorer sidebar. There is a patch for Ada available. |
| 506 | |
| 507 | The GNU Ada Project distribution (http://gnuada.sourceforge.net) of Vim |
| 508 | contains all of the above. |
| 509 | |
| 510 | ============================================================================== |
| 511 | vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab |
| 512 | vim: filetype=help |