blob: bcfc4a40c0a2efc9578c3f571cb0e0d85d1afe09 [file] [log] [blame]
Bram Moolenaaredf3f972016-08-29 22:49:24 +02001/* vi:set ts=8 sts=4 sw=4 noet:
Bram Moolenaar071d4272004-06-13 20:20:40 +00002 *
3 * VIM - Vi IMproved by Bram Moolenaar
4 *
5 * Do ":help uganda" in Vim to read copying and usage conditions.
6 * Do ":help credits" in Vim to see a list of people who contributed.
7 */
8/*
9 * feature.h: Defines for optional code and preferences
10 *
11 * Edit this file to include/exclude parts of Vim, before compiling.
12 * The only other file that may be edited is Makefile, it contains machine
13 * specific options.
14 *
15 * To include specific options, change the "#if*" and "#endif" into comments,
16 * or uncomment the "#define".
17 * To exclude specific options, change the "#define" into a comment.
18 */
19
20/*
21 * When adding a new feature:
22 * - Add a #define below.
23 * - Add a message in the table above ex_version().
24 * - Add a string to f_has().
Christian Brabandte085dfd2023-09-30 12:49:18 +020025 * - Add a feature to ":help feature-list" in doc/builtin.txt.
Bram Moolenaar071d4272004-06-13 20:20:40 +000026 * - Add feature to ":help +feature-list" in doc/various.txt.
27 * - Add comment for the documentation of commands that use the feature.
28 */
29
30/*
31 * Basic choices:
32 * ==============
33 *
Martin Tournoij7904fa42022-10-04 16:28:45 +010034 * +tiny no optional features enabled, not even +eval
35 * +normal a default selection of features enabled
Bram Moolenaar3577c6f2008-06-24 21:16:56 +000036 * +huge all possible features enabled.
Bram Moolenaar071d4272004-06-13 20:20:40 +000037 *
Martin Tournoij25f3a142022-10-08 19:26:41 +010038 * When +normal is used, +tiny is also included. +huge implies +normal, etc.
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 */
40
41/*
Martin Tournoij7904fa42022-10-04 16:28:45 +010042 * +small is now an alias for +tiny
43 */
44#if defined(FEAT_SMALL)
45# undef FEAT_SMALL
46# if !defined(FEAT_TINY)
47# define FEAT_TINY
48# endif
49#endif
50
51/*
Martin Tournoij25f3a142022-10-08 19:26:41 +010052 * +big is now an alias for +normal
53 */
54#if defined(FEAT_BIG)
55# undef FEAT_BIG
56# if !defined(FEAT_NORMAL)
57# define FEAT_NORMAL
58# endif
59#endif
60
61/*
Bram Moolenaar071d4272004-06-13 20:20:40 +000062 * Uncomment one of these to override the default. For unix use a configure
63 * argument, see Makefile.
64 */
Martin Tournoij25f3a142022-10-08 19:26:41 +010065#if !defined(FEAT_TINY) && !defined(FEAT_NORMAL) && !defined(FEAT_HUGE)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +010066// #define FEAT_TINY
Bram Moolenaar9bf703d2019-11-30 19:44:38 +010067// #define FEAT_NORMAL
Bram Moolenaar9bf703d2019-11-30 19:44:38 +010068// #define FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +000069#endif
70
71/*
Bram Moolenaar23c4f712016-01-20 22:11:59 +010072 * For Unix, Mac and Win32 use +huge by default. These days CPUs are fast and
73 * Memory is cheap.
Bram Moolenaar23c4f712016-01-20 22:11:59 +010074 * Otherwise use +normal
Bram Moolenaar071d4272004-06-13 20:20:40 +000075 */
Martin Tournoij25f3a142022-10-08 19:26:41 +010076#if !defined(FEAT_TINY) && !defined(FEAT_NORMAL) && !defined(FEAT_HUGE)
Bram Moolenaar4f974752019-02-17 17:44:42 +010077# if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
Bram Moolenaar23c4f712016-01-20 22:11:59 +010078# define FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +000079# else
Martin Tournoij25f3a142022-10-08 19:26:41 +010080# define FEAT_NORMAL
Bram Moolenaar071d4272004-06-13 20:20:40 +000081# endif
82#endif
83
84/*
85 * Each feature implies including the "smaller" ones.
86 */
87#ifdef FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +000088# define FEAT_NORMAL
89#endif
90#ifdef FEAT_NORMAL
Bram Moolenaar071d4272004-06-13 20:20:40 +000091# define FEAT_TINY
92#endif
93
94/*
95 * Optional code (see ":help +feature-list")
96 * =============
97 */
98
99/*
Bram Moolenaarffc07162019-08-17 20:17:51 +0200100 * These features used to be optional but are now always enabled:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101 * +windows Multiple windows. Without this there is no help
102 * window and no status lines.
Bram Moolenaarf80f40a2022-08-25 16:02:23 +0100103 * +autocmd Automatic commands
Bram Moolenaar44a2f922016-03-19 22:11:51 +0100104 * +vertsplit Vertically split windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105 * +cmdhist Command line history.
Bram Moolenaarffc07162019-08-17 20:17:51 +0200106 * +localmap Mappings and abbreviations local to a buffer.
107 * +visual Visual mode
108 * +visualextra Extra features for Visual mode (mostly block operators).
109 * +virtualedit 'virtualedit' option and its implementation
110 * +user_commands Allow the user to define his own commands.
111 * +multi_byte Generic multi-byte character handling.
Bram Moolenaar0a52df52019-08-18 22:26:31 +0200112 * +cmdline_compl completion of mappings/abbreviations in cmdline mode.
Bram Moolenaare2c453d2019-08-21 14:37:09 +0200113 * +insert_expand CTRL-N/CTRL-P/CTRL-X in insert mode.
Bram Moolenaarb005cd82019-09-04 15:54:55 +0200114 * +modify_fname modifiers for file name. E.g., "%:p:h".
Bram Moolenaar8c96af92019-09-28 19:05:57 +0200115 * +comments 'comments' option.
Bram Moolenaar651fca82021-11-29 20:39:38 +0000116 * +title 'title' and 'icon' options
Bram Moolenaar739f13a2021-12-13 13:12:53 +0000117 * +jumplist Jumplist, CTRL-O and CTRL-I commands.
Bram Moolenaar8e145b82022-05-21 20:17:31 +0100118 * +lispindent lisp indenting (From Eric Fischer).
119 * +cindent C code indenting (From Eric Fischer).
120 * +smartindent smart C code indenting when the 'si' option is set.
Bram Moolenaar88774872022-08-16 20:24:29 +0100121 * +textobjects Text objects: "vaw", "das", etc.
Bram Moolenaarf80f40a2022-08-25 16:02:23 +0100122 * +file_in_path "gf" and "<cfile>" commands.
Bram Moolenaar2bd9dbc2022-08-25 18:12:06 +0100123 * +path_extra up/downwards searching in 'path' and 'tags'.
Bram Moolenaar074fbd42022-08-26 16:41:14 +0100124 * +wildignore 'wildignore' and 'backupskip' options
Bram Moolenaar54162322022-08-26 16:58:51 +0100125 * +wildmenu 'wildmenu' option
Bram Moolenaar2ee347f2022-08-26 17:53:44 +0100126 * +builtin_terms all builtin termcap entries included
Bram Moolenaar73e28dc2022-09-17 21:08:33 +0100127 * +float Floating point variables.
Martin Tournoij7904fa42022-10-04 16:28:45 +0100128 * +cmdwin Command line window.
Martin Tournoijba43e762022-10-13 22:12:15 +0100129 * +cmdline_info 'showcmd' and 'ruler' options.
Bram Moolenaarffc07162019-08-17 20:17:51 +0200130 *
131 * Obsolete:
132 * +tag_old_static Old style static tags: "file:tag file ..".
133 * Support was removed in 8.1.1093.
134 * +farsi Farsi (Persian language) Keymap support.
135 * Removed in patch 8.1.0932
Bram Moolenaarc8ac3a02022-09-04 12:29:28 +0100136 * +footer Motif only: Add a message area at the bottom of the
137 * main window area.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000138 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139
140/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141 * +folding Fold lines.
142 */
143#ifdef FEAT_NORMAL
144# define FEAT_FOLDING
145#endif
146
147/*
148 * +digraphs Digraphs.
149 * In insert mode and on the command line you will be
150 * able to use digraphs. The CTRL-K command will work.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000151 */
152#ifdef FEAT_NORMAL
153# define FEAT_DIGRAPHS
Bram Moolenaar071d4272004-06-13 20:20:40 +0000154#endif
155
156/*
157 * +langmap 'langmap' option. Only useful when you put your
158 * keyboard in a special language mode, e.g. for typing
159 * greek.
160 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100161#ifdef FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000162# define FEAT_LANGMAP
163#endif
164
165/*
166 * +keymap 'keymap' option. Allows you to map typed keys in
167 * Insert mode for a special language.
168 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100169#ifdef FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000170# define FEAT_KEYMAP
171#endif
172
Bram Moolenaar071d4272004-06-13 20:20:40 +0000173#ifdef FEAT_NORMAL
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100174# define VIM_BACKTICK // internal backtick expansion
Bram Moolenaar071d4272004-06-13 20:20:40 +0000175#endif
176
177/*
Bram Moolenaarae906c82022-10-12 11:12:49 +0100178 * +linebreak 'showbreak', 'breakat' and 'linebreak' options.
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000179 * Also 'numberwidth'.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180 */
181#ifdef FEAT_NORMAL
182# define FEAT_LINEBREAK
183#endif
184
185/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000186 * +extra_search 'hlsearch' and 'incsearch' options.
187 */
188#ifdef FEAT_NORMAL
189# define FEAT_SEARCH_EXTRA
190#endif
191
192/*
193 * +quickfix Quickfix commands.
194 */
195#ifdef FEAT_NORMAL
196# define FEAT_QUICKFIX
197#endif
198
199/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000200 * +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
201 */
202#ifdef FEAT_NORMAL
Bram Moolenaarf80f40a2022-08-25 16:02:23 +0100203# define FEAT_FIND_ID
Bram Moolenaar071d4272004-06-13 20:20:40 +0000204#endif
205
206/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000207 * +rightleft Right-to-left editing/typing support.
Bram Moolenaarae906c82022-10-12 11:12:49 +0100208 * Note that this isn't perfect, but enough users say they
209 * use it to keep supporting it.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100211#if defined(FEAT_HUGE) && !defined(DISABLE_RIGHTLEFT)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212# define FEAT_RIGHTLEFT
213#endif
214
215/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000216 * +arabic Arabic keymap and shaping support.
Bram Moolenaar2be7cb72019-01-12 16:10:51 +0100217 * Requires FEAT_RIGHTLEFT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000218 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100219#if defined(FEAT_HUGE) && !defined(DISABLE_ARABIC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000220# define FEAT_ARABIC
221#endif
222#ifdef FEAT_ARABIC
223# ifndef FEAT_RIGHTLEFT
224# define FEAT_RIGHTLEFT
225# endif
226#endif
227
228/*
229 * +emacs_tags When FEAT_EMACS_TAGS defined: Include support for
230 * emacs style TAGS file.
231 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100232#ifdef FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233# define FEAT_EMACS_TAGS
234#endif
235
236/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237 * +cscope Unix only: Cscope support.
238 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100239#if defined(UNIX) && defined(FEAT_HUGE) && !defined(FEAT_CSCOPE) && !defined(MACOS_X)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000240# define FEAT_CSCOPE
241#endif
242
243/*
244 * +eval Built-in script language and expression evaluation,
245 * ":let", ":if", etc.
246 */
247#ifdef FEAT_NORMAL
248# define FEAT_EVAL
249#endif
250
Bram Moolenaareffed932018-08-14 13:38:17 +0200251#ifdef FEAT_EVAL
252# define HAVE_SANDBOX
253#endif
254
Bram Moolenaar071d4272004-06-13 20:20:40 +0000255/*
Bram Moolenaar05159a02005-02-26 23:04:13 +0000256 * +profile Profiling for functions and scripts.
257 */
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000258#if defined(FEAT_HUGE) \
Bram Moolenaar1e015462005-09-25 22:16:38 +0000259 && defined(FEAT_EVAL) \
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000260 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100261 || defined(MSWIN))
Bram Moolenaar05159a02005-02-26 23:04:13 +0000262# define FEAT_PROFILE
263#endif
264
265/*
Bram Moolenaar76916e62006-03-21 21:23:25 +0000266 * +reltime reltime() function
267 */
268#if defined(FEAT_NORMAL) \
269 && defined(FEAT_EVAL) \
Evan Miller25448072022-12-30 10:42:23 +0000270 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) \
Bram Moolenaara9a6b032023-02-05 18:00:42 +0000271 && (!defined(MACOS_X) || defined(HAVE_DISPATCH_DISPATCH_H))) \
272 || defined(MSWIN))
Bram Moolenaar76916e62006-03-21 21:23:25 +0000273# define FEAT_RELTIME
274#endif
275
276/*
Bram Moolenaar975b5272016-03-15 23:10:59 +0100277 * +timers timer_start()
278 */
Bram Moolenaar074fbd42022-08-26 16:41:14 +0100279#if defined(FEAT_RELTIME) && (defined(UNIX) || defined(MSWIN) || defined(VMS))
Bram Moolenaar975b5272016-03-15 23:10:59 +0100280# define FEAT_TIMERS
281#endif
282
283/*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000284 * Insert mode completion with 'completefunc'.
285 */
Bram Moolenaare2c453d2019-08-21 14:37:09 +0200286#if defined(FEAT_EVAL)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000287# define FEAT_COMPL_FUNC
288#endif
289
290/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000291 * +printer ":hardcopy" command
292 * +postscript Printing uses PostScript file output.
293 */
294#if defined(FEAT_NORMAL) && (defined(MSWIN) || defined(FEAT_EVAL)) \
295 && !defined(AMIGA)
296# define FEAT_PRINTER
297#endif
298#if defined(FEAT_PRINTER) && ((defined(MSWIN) && defined(MSWINPS)) \
299 || (!defined(MSWIN) && defined(FEAT_EVAL)))
300# define FEAT_POSTSCRIPT
301#endif
302
303/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304 * +diff Displaying diffs in a nice way.
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000305 * Can be enabled in autoconf already.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000306 */
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000307#if defined(FEAT_NORMAL) && !defined(FEAT_DIFF)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000308# define FEAT_DIFF
309#endif
310
311/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000312 * +statusline 'statusline', 'rulerformat' and special format of
313 * 'titlestring' and 'iconstring' options.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000314 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000315#ifdef FEAT_NORMAL
316# define FEAT_STL_OPT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317#endif
318
Bram Moolenaar651fca82021-11-29 20:39:38 +0000319/*
320 * +byte_offset '%o' in 'statusline' and builtin functions line2byte()
321 * and byte2line().
322 * Note: Required for Macintosh.
323 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000324#ifdef FEAT_NORMAL
325# define FEAT_BYTEOFF
326#endif
327
328/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000329 * +viminfo reading/writing the viminfo file. Takes about 8Kbyte
330 * of code.
331 * VIMINFO_FILE Location of user .viminfo file (should start with $).
332 * VIMINFO_FILE2 Location of alternate user .viminfo file.
333 */
334#ifdef FEAT_NORMAL
335# define FEAT_VIMINFO
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100336// #define VIMINFO_FILE "$HOME/foo/.viminfo"
337// #define VIMINFO_FILE2 "~/bar/.viminfo"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000338#endif
339
340/*
341 * +syntax syntax highlighting. When using this, it's a good
Bram Moolenaarf80f40a2022-08-25 16:02:23 +0100342 * idea to have +eval too.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000343 */
344#if defined(FEAT_NORMAL) || defined(PROTO)
345# define FEAT_SYN_HL
346#endif
347
348/*
Bram Moolenaarf80f40a2022-08-25 16:02:23 +0100349 * +conceal 'conceal' option. Depends on syntax highlighting
Bram Moolenaar860cae12010-06-05 23:22:07 +0200350 * as this is how the concealed text is defined.
351 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100352#if defined(FEAT_NORMAL) && defined(FEAT_SYN_HL)
Bram Moolenaar860cae12010-06-05 23:22:07 +0200353# define FEAT_CONCEAL
354#endif
355
356/*
Bram Moolenaar2b48ad52006-03-12 21:56:11 +0000357 * +spell spell checking
358 */
Bram Moolenaar424bcae2022-01-31 14:59:41 +0000359#if (defined(FEAT_NORMAL) || defined(PROTO))
Bram Moolenaar2b48ad52006-03-12 21:56:11 +0000360# define FEAT_SPELL
361#endif
362
363/*
Bram Moolenaar2ee347f2022-08-26 17:53:44 +0100364 * +cryptv Encryption (originally by Mohsin Ahmed <mosh@sasi.com>).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000365 */
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200366#if defined(FEAT_NORMAL) && !defined(FEAT_CRYPT) || defined(PROTO)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000367# define FEAT_CRYPT
368#endif
369
370/*
Bram Moolenaardda01c02023-05-08 22:11:07 +0100371 * libsodium - add advanced cryptography support
Bram Moolenaar2ee347f2022-08-26 17:53:44 +0100372 */
Bram Moolenaardda01c02023-05-08 22:11:07 +0100373#if defined(HAVE_SODIUM) && defined(FEAT_CRYPT)
Bram Moolenaar2ee347f2022-08-26 17:53:44 +0100374# define FEAT_SODIUM
375#endif
376
377/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000378 * +mksession ":mksession" command.
Bram Moolenaarf96ae0b2019-07-28 15:21:55 +0200379 * fully depends on +eval
Bram Moolenaar071d4272004-06-13 20:20:40 +0000380 */
Bram Moolenaarf96ae0b2019-07-28 15:21:55 +0200381#if defined(FEAT_EVAL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000382# define FEAT_SESSION
383#endif
384
385/*
386 * +multi_lang Multi language support. ":menutrans", ":language", etc.
387 * +gettext Message translations (requires +multi_lang)
388 * (only when "lang" archive unpacked)
389 */
390#ifdef FEAT_NORMAL
391# define FEAT_MULTI_LANG
392#endif
393#if defined(HAVE_GETTEXT) && defined(FEAT_MULTI_LANG) \
394 && (defined(HAVE_LOCALE_H) || defined(X_LOCALE))
395# define FEAT_GETTEXT
396#endif
397
398/*
Bram Moolenaar30276f22019-01-24 17:59:39 +0100399 * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
400 * IME can be used to input chars. Not tested much!
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401 */
Bram Moolenaar4f974752019-02-17 17:44:42 +0100402#if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100403// #define FEAT_MBYTE_IME
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100404#endif
405
Martin Tournoij25f3a142022-10-08 19:26:41 +0100406#if defined(FEAT_HUGE) && defined(FEAT_GUI_HAIKU) && !defined(FEAT_MBYTE_IME)
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100407# define FEAT_MBYTE_IME
408#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000409
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100410// Use iconv() when it's available.
Bram Moolenaar2be7cb72019-01-12 16:10:51 +0100411#if (defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) || defined(DYNAMIC_ICONV)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000412# define USE_ICONV
413#endif
414
415/*
416 * +xim X Input Method. For entering special languages like
417 * chinese and Japanese.
Bram Moolenaar54612582019-11-21 17:13:31 +0100418 * this is for Unix and VMS only.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000419 */
420#ifndef FEAT_XIM
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100421// #define FEAT_XIM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000422#endif
423
424#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100425# define USE_XIM 1 // needed for GTK include files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000426#endif
427
Bram Moolenaar54612582019-11-21 17:13:31 +0100428#if defined(FEAT_XIM)
429// # define X_LOCALE // for OS with incomplete locale
430 // support, like old linux versions.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000431#endif
432
433/*
434 * +xfontset X fontset support. For outputting wide characters.
435 */
436#ifndef FEAT_XFONTSET
Bram Moolenaar2be7cb72019-01-12 16:10:51 +0100437# if defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438# define FEAT_XFONTSET
439# else
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100440// # define FEAT_XFONTSET
Bram Moolenaar071d4272004-06-13 20:20:40 +0000441# endif
442#endif
443
444/*
445 * +libcall libcall() function
446 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100447// Using dlopen() also requires dlsym() to be available.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000448#if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
449# define USE_DLOPEN
450#endif
Bram Moolenaar4f974752019-02-17 17:44:42 +0100451#if defined(FEAT_EVAL) && (defined(MSWIN) || ((defined(UNIX) || defined(VMS)) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452 && (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD))))
453# define FEAT_LIBCALL
454#endif
455
456/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457 * +menu ":menu" command
458 */
459#ifdef FEAT_NORMAL
460# define FEAT_MENU
Bram Moolenaar4f974752019-02-17 17:44:42 +0100461# ifdef FEAT_GUI_MSWIN
Bram Moolenaar071d4272004-06-13 20:20:40 +0000462# define FEAT_TEAROFF
463# endif
464#endif
465
Bram Moolenaaraef8c3d2018-03-03 18:59:16 +0100466/*
467 * popup menu in a terminal
468 */
Bram Moolenaare2c453d2019-08-21 14:37:09 +0200469#if defined(FEAT_MENU) && !defined(ALWAYS_USE_GUI)
Bram Moolenaaraef8c3d2018-03-03 18:59:16 +0100470# define FEAT_TERM_POPUP_MENU
471#endif
472
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200473/*
Yee Cheng Chin4314e4f2022-10-08 13:50:05 +0100474 * sound
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200475 */
Bram Moolenaar21606672019-06-14 20:40:58 +0200476#if !defined(FEAT_SOUND) && defined(HAVE_CANBERRA)
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200477# define FEAT_SOUND
478#endif
Bram Moolenaar28e67e02019-08-15 23:05:49 +0200479#if defined(FEAT_SOUND) && defined(HAVE_CANBERRA)
480# define FEAT_SOUND_CANBERRA
481#endif
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200482
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100483// There are two ways to use XPM.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000484#if (defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF)) \
485 || defined(HAVE_X11_XPM_H)
486# define HAVE_XPM 1
487#endif
488
489/*
490 * +toolbar Include code for a toolbar (for the Win32 GUI, GTK
491 * always has it). But only if menus are enabled.
492 */
493#if defined(FEAT_NORMAL) && defined(FEAT_MENU) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000494 && (defined(FEAT_GUI_GTK) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000495 || defined(FEAT_GUI_MSWIN) \
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100496 || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XPM)) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100497 || defined(FEAT_GUI_PHOTON) \
498 || defined(FEAT_GUI_HAIKU))
499
Bram Moolenaar071d4272004-06-13 20:20:40 +0000500# define FEAT_TOOLBAR
501#endif
Bram Moolenaar843ee412004-06-30 16:16:41 +0000502
503
Bram Moolenaar071d4272004-06-13 20:20:40 +0000504#if defined(FEAT_TOOLBAR) && !defined(FEAT_MENU)
505# define FEAT_MENU
506#endif
507
508/*
Bram Moolenaar50bf7ce2019-09-15 13:17:00 +0200509 * GUI dark theme variant
510 */
511#if defined(FEAT_GUI_GTK) && defined(USE_GTK3)
512# define FEAT_GUI_DARKTHEME
513#endif
514
515/*
Bram Moolenaar32466aa2006-02-24 23:53:04 +0000516 * GUI tabline
517 */
Bram Moolenaar4033c552017-09-16 20:54:51 +0200518#if defined(FEAT_NORMAL) \
Bram Moolenaarf193fff2006-04-27 00:02:13 +0000519 && (defined(FEAT_GUI_GTK) \
Bram Moolenaarfc1421e2006-04-20 22:17:20 +0000520 || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100521 || defined(FEAT_GUI_HAIKU) \
K.Takatac351dc12022-01-24 11:24:08 +0000522 || defined(FEAT_GUI_MSWIN))
Bram Moolenaar32466aa2006-02-24 23:53:04 +0000523# define FEAT_GUI_TABLINE
524#endif
525
526/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527 * +browse ":browse" command.
Bram Moolenaard812df62008-11-09 12:46:09 +0000528 * or just the ":browse" command modifier
Bram Moolenaar071d4272004-06-13 20:20:40 +0000529 */
Bram Moolenaard812df62008-11-09 12:46:09 +0000530#if defined(FEAT_NORMAL)
531# define FEAT_BROWSE_CMD
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100532# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar097148e2020-08-11 21:58:20 +0200533 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON)
Bram Moolenaard812df62008-11-09 12:46:09 +0000534# define FEAT_BROWSE
535# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000536#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000537
538/*
Bram Moolenaarf939c4e2013-01-23 13:41:00 +0100539 * On some systems, when we compile with the GUI, we always use it. On Mac
540 * there is no terminal version, and on Windows we can't figure out how to
541 * fork one off with :gui.
542 */
Bram Moolenaar097148e2020-08-11 21:58:20 +0200543#if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
Bram Moolenaarf939c4e2013-01-23 13:41:00 +0100544# define ALWAYS_USE_GUI
545#endif
546
547/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548 * +dialog_gui Use GUI dialog.
549 * +dialog_con May use Console dialog.
550 * When none of these defined there is no dialog support.
551 */
552#ifdef FEAT_NORMAL
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100553# if (defined(FEAT_GUI_MOTIF) && defined(HAVE_X11_XPM_H)) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000554 || defined(FEAT_GUI_GTK) \
555 || defined(FEAT_GUI_PHOTON) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100556 || defined(FEAT_GUI_HAIKU) \
Bram Moolenaar097148e2020-08-11 21:58:20 +0200557 || defined(FEAT_GUI_MSWIN)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000558# define FEAT_CON_DIALOG
559# define FEAT_GUI_DIALOG
560# else
561# define FEAT_CON_DIALOG
562# endif
563#endif
564#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100565 || defined(FEAT_GUI_GTK) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100566 || defined(FEAT_GUI_MSWIN))
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100567// need a dialog to show error messages when starting from the desktop
Bram Moolenaar071d4272004-06-13 20:20:40 +0000568# define FEAT_GUI_DIALOG
569#endif
570#if defined(FEAT_GUI_DIALOG) && \
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100571 (defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000572 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
Bram Moolenaar097148e2020-08-11 21:58:20 +0200573 || defined(FEAT_GUI_PHOTON) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100574 || defined(FEAT_GUI_HAIKU))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000575# define FEAT_GUI_TEXTDIALOG
Bram Moolenaarf939c4e2013-01-23 13:41:00 +0100576# ifndef ALWAYS_USE_GUI
577# define FEAT_CON_DIALOG
578# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000579#endif
580
Bram Moolenaar8e9eb3a2016-04-24 15:00:11 +0200581/*
Bram Moolenaar61be73b2016-04-29 22:59:22 +0200582 * +termguicolors 'termguicolors' option.
Bram Moolenaar8e9eb3a2016-04-24 15:00:11 +0200583 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100584#if (defined(FEAT_NORMAL) && defined(FEAT_SYN_HL)) && !defined(ALWAYS_USE_GUI)
Bram Moolenaar61be73b2016-04-29 22:59:22 +0200585# define FEAT_TERMGUICOLORS
Bram Moolenaar8e9eb3a2016-04-24 15:00:11 +0200586#endif
587
Bram Moolenaar071d4272004-06-13 20:20:40 +0000588/*
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200589 * +vartabs 'vartabstop' and 'varsofttabstop' options.
590 */
Martin Tournoij25f3a142022-10-08 19:26:41 +0100591#ifdef FEAT_HUGE
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200592# define FEAT_VARTABS
593#endif
594
595/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000596 * Preferences:
597 * ============
598 */
599
600/*
601 * +writebackup 'writebackup' is default on:
602 * Use a backup file while overwriting a file. But it's
603 * deleted again when 'backup' is not set. Changing this
Bram Moolenaare37d50a2008-08-06 17:06:04 +0000604 * is strongly discouraged: You can lose all your
Bram Moolenaar071d4272004-06-13 20:20:40 +0000605 * changes when the computer crashes while writing the
606 * file.
607 * VMS note: It does work on VMS as well, but because of
608 * version handling it does not have any purpose.
609 * Overwrite will write to the new version.
610 */
611#ifndef VMS
612# define FEAT_WRITEBACKUP
613#endif
614
615/*
616 * +xterm_save The t_ti and t_te entries for the builtin xterm will
617 * be set to save the screen when starting Vim and
618 * restoring it when exiting.
619 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100620// #define FEAT_XTERM_SAVE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000621
622/*
623 * DEBUG Output a lot of debugging garbage.
624 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100625// #define DEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000626
627/*
Bram Moolenaar3f269672009-11-03 11:11:11 +0000628 * STARTUPTIME Time the startup process. Writes a file with
629 * timestamps.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000630 */
Bram Moolenaar3f269672009-11-03 11:11:11 +0000631#if defined(FEAT_NORMAL) \
632 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100633 || defined(MSWIN))
Bram Moolenaar3f269672009-11-03 11:11:11 +0000634# define STARTUPTIME 1
635#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000636
637/*
638 * MEM_PROFILE Debugging of memory allocation and freeing.
639 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100640// #define MEM_PROFILE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000641
642/*
643 * VIMRC_FILE Name of the .vimrc file in current dir.
644 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100645// #define VIMRC_FILE ".vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000646
647/*
648 * EXRC_FILE Name of the .exrc file in current dir.
649 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100650// #define EXRC_FILE ".exrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000651
652/*
653 * GVIMRC_FILE Name of the .gvimrc file in current dir.
654 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100655// #define GVIMRC_FILE ".gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000656
657/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658 * SESSION_FILE Name of the default ":mksession" file.
659 */
660#define SESSION_FILE "Session.vim"
661
662/*
663 * USR_VIMRC_FILE Name of the user .vimrc file.
664 * USR_VIMRC_FILE2 Name of alternate user .vimrc file.
665 * USR_VIMRC_FILE3 Name of alternate user .vimrc file.
666 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100667// #define USR_VIMRC_FILE "~/foo/.vimrc"
668// #define USR_VIMRC_FILE2 "~/bar/.vimrc"
669// #define USR_VIMRC_FILE3 "$VIM/.vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000670
671/*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +0200672 * VIM_DEFAULTS_FILE Name of the defaults.vim script file
673 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100674// #define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +0200675
676/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000677 * EVIM_FILE Name of the evim.vim script file
678 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100679// #define EVIM_FILE "$VIMRUNTIME/evim.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000680
681/*
682 * USR_EXRC_FILE Name of the user .exrc file.
683 * USR_EXRC_FILE2 Name of the alternate user .exrc file.
684 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100685// #define USR_EXRC_FILE "~/foo/.exrc"
686// #define USR_EXRC_FILE2 "~/bar/.exrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000687
688/*
689 * USR_GVIMRC_FILE Name of the user .gvimrc file.
690 * USR_GVIMRC_FILE2 Name of the alternate user .gvimrc file.
691 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100692// #define USR_GVIMRC_FILE "~/foo/.gvimrc"
693// #define USR_GVIMRC_FILE2 "~/bar/.gvimrc"
694// #define USR_GVIMRC_FILE3 "$VIM/.gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000695
696/*
697 * SYS_VIMRC_FILE Name of the system-wide .vimrc file.
698 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100699// #define SYS_VIMRC_FILE "/etc/vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700
701/*
702 * SYS_GVIMRC_FILE Name of the system-wide .gvimrc file.
703 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100704// #define SYS_GVIMRC_FILE "/etc/gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705
706/*
707 * DFLT_HELPFILE Name of the help file.
708 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100709// # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt.gz"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710
711/*
712 * File names for:
Bram Moolenaarc81dfaa2023-06-08 22:16:23 +0100713 * FILETYPE_FILE used for file type detection
714 * FTPLUGIN_FILE used for loading filetype plugin files
715 * INDENT_FILE used for loading indent files
716 * FTOFF_FILE used for file type detection
717 * FTPLUGOF_FILE used for loading settings files
718 * INDOFF_FILE used for loading indent files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000719 */
Bram Moolenaarc81dfaa2023-06-08 22:16:23 +0100720#ifndef FILETYPE_FILE
721# define FILETYPE_FILE "filetype.vim"
722#endif
723#ifndef FTPLUGIN_FILE
724# define FTPLUGIN_FILE "ftplugin.vim"
725#endif
726#ifndef INDENT_FILE
727# define INDENT_FILE "indent.vim"
728#endif
729#ifndef FTOFF_FILE
730# define FTOFF_FILE "ftoff.vim"
731#endif
732#ifndef FTPLUGOF_FILE
733# define FTPLUGOF_FILE "ftplugof.vim"
734#endif
735#ifndef INDOFF_FILE
736# define INDOFF_FILE "indoff.vim"
737#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000738
739/*
740 * SYS_MENU_FILE Name of the default menu.vim file.
741 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100742// # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000743
744/*
745 * SYS_OPTWIN_FILE Name of the default optwin.vim file.
746 */
747#ifndef SYS_OPTWIN_FILE
748# define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
749#endif
750
751/*
752 * SYNTAX_FNAME Name of a syntax file, where %s is the syntax name.
753 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100754// #define SYNTAX_FNAME "/foo/%s.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000755
756/*
757 * RUNTIME_DIRNAME Generic name for the directory of the runtime files.
758 */
759#ifndef RUNTIME_DIRNAME
760# define RUNTIME_DIRNAME "runtime"
761#endif
762
763/*
Bram Moolenaar9d302ad2018-12-21 11:48:51 +0100764 * RUNTIME_GLOBAL Comma-separated list of directory names for global Vim
765 * runtime directories.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000766 * Don't define this if the preprocessor can't handle
767 * string concatenation.
768 * Also set by "--with-global-runtime" configure argument.
769 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100770// #define RUNTIME_GLOBAL "/etc/vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000771
772/*
Bram Moolenaar9d302ad2018-12-21 11:48:51 +0100773 * RUNTIME_GLOBAL_AFTER Comma-separated list of directory names for global Vim
774 * runtime after directories.
775 * Don't define this if the preprocessor can't handle
776 * string concatenation.
777 * Also set by "--with-global-runtime" configure argument.
778 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100779// #define RUNTIME_GLOBAL_AFTER "/etc/vim/after"
Bram Moolenaar9d302ad2018-12-21 11:48:51 +0100780
781/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000782 * MODIFIED_BY Name of who modified Vim. Required when distributing
Bram Moolenaar84a05ac2013-05-06 04:24:17 +0200783 * a modified version of Vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000784 * Also from the "--with-modified-by" configure argument.
785 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100786// #define MODIFIED_BY "John Doe"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000787
788/*
789 * Machine dependent:
790 * ==================
791 */
792
793/*
794 * +fork Unix only: fork() support (detected by configure)
795 * +system Use system() instead of fork/exec for starting a
796 * shell. Doesn't work for the GUI!
797 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100798// #define USE_SYSTEM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000799
800/*
801 * +X11 Unix only. Include code for xterm title saving and X
802 * clipboard. Only works if HAVE_X11 is also defined.
803 */
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100804#if defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000805# define WANT_X11
806#endif
807
808/*
809 * XSMP - X11 Session Management Protocol
810 * It may be preferred to disable this if the GUI supports it (e.g.,
811 * GNOME/KDE) and implement save-yourself etc. through that, but it may also
812 * be cleaner to have all SM-aware vims do the same thing (libSM does not
813 * depend upon X11).
814 * If your GUI wants to support SM itself, change this ifdef.
815 * I'm assuming that any X11 implementation will cope with this for now.
816 */
817#if defined(HAVE_X11) && defined(WANT_X11) && defined(HAVE_X11_SM_SMLIB_H)
818# define USE_XSMP
819#endif
820#if defined(USE_XSMP_INTERACT) && !defined(USE_XSMP)
821# undef USE_XSMP_INTERACT
822#endif
823
824/*
825 * +mouse_xterm Unix only: Include code for xterm mouse handling.
826 * +mouse_dec idem, for Dec mouse handling.
827 * +mouse_jsbterm idem, for Jsbterm mouse handling.
828 * +mouse_netterm idem, for Netterm mouse handling.
829 * (none) MS-DOS mouse support.
830 * +mouse_gpm Unix only: Include code for Linux console mouse
831 * handling.
832 * +mouse_pterm PTerm mouse support for QNX
Dominique Pelleb49dfd02023-04-14 21:54:25 +0100833 * +mouse_sgr Unix only: Include code for SGR-styled mouse.
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000834 * +mouse_sysmouse Unix only: Include code for FreeBSD and DragonFly
835 * console mouse handling.
Dominique Pelleb49dfd02023-04-14 21:54:25 +0100836 * +mouse_urxvt Unix only: Include code for urxvt mouse handling.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000837 * +mouse Any mouse support (any of the above enabled).
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200838 * Always included, since either FEAT_MOUSE_XTERM or
839 * DOS_MOUSE is defined.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000840 */
Bram Moolenaar6f345a12019-12-17 21:27:18 +0100841// Amiga console has no mouse support
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200842#if defined(UNIX) || defined(VMS)
843# define FEAT_MOUSE_XTERM
Martin Tournoij25f3a142022-10-08 19:26:41 +0100844# ifdef FEAT_NORMAL
Bram Moolenaar071d4272004-06-13 20:20:40 +0000845# define FEAT_MOUSE_NET
Bram Moolenaar071d4272004-06-13 20:20:40 +0000846# define FEAT_MOUSE_DEC
Bram Moolenaarc8427482011-10-20 21:09:35 +0200847# define FEAT_MOUSE_URXVT
848# endif
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200849#endif
850#if defined(MSWIN)
851# define DOS_MOUSE
852#endif
853#if defined(__QNX__)
854# define FEAT_MOUSE_PTERM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000855#endif
856
Bram Moolenaarf6dcbb22013-04-15 15:40:33 +0200857/*
858 * Note: Only one of the following may be defined:
859 * FEAT_MOUSE_GPM
860 * FEAT_SYSMOUSE
861 * FEAT_MOUSE_JSB
862 * FEAT_MOUSE_PTERM
863 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864#if defined(FEAT_NORMAL) && defined(HAVE_GPM)
865# define FEAT_MOUSE_GPM
Bram Moolenaar33fc4a62022-02-23 18:07:38 +0000866/*
867 * +mouse_gpm/dyn Load libgpm dynamically.
868 */
869# ifndef DYNAMIC_GPM
870// # define DYNAMIC_GPM
871# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000872#endif
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000873
874#if defined(FEAT_NORMAL) && defined(HAVE_SYSMOUSE)
875# define FEAT_SYSMOUSE
876#endif
Bram Moolenaarc8427482011-10-20 21:09:35 +0200877
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200878// urxvt is a small variation of mouse_xterm, and shares its code
Bram Moolenaarc8427482011-10-20 21:09:35 +0200879#if defined(FEAT_MOUSE_URXVT) && !defined(FEAT_MOUSE_XTERM)
880# define FEAT_MOUSE_XTERM
881#endif
882
Bram Moolenaar071d4272004-06-13 20:20:40 +0000883/*
884 * +clipboard Clipboard support. Always used for the GUI.
885 * +xterm_clipboard Unix only: Include code for handling the clipboard
886 * in an xterm like in the GUI.
887 */
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100888
889#ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
890# define FEAT_CLIPBOARD
891#endif
892
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893#ifdef FEAT_GUI
894# ifndef FEAT_CLIPBOARD
895# define FEAT_CLIPBOARD
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896# endif
897#endif
898
Bram Moolenaarf7ff6e82014-03-23 15:13:05 +0100899#if defined(FEAT_NORMAL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000900 && (defined(UNIX) || defined(VMS)) \
901 && defined(WANT_X11) && defined(HAVE_X11)
902# define FEAT_XCLIPBOARD
903# ifndef FEAT_CLIPBOARD
904# define FEAT_CLIPBOARD
905# endif
906#endif
907
908/*
909 * +dnd Drag'n'drop support. Always used for the GTK+ GUI.
910 */
911#if defined(FEAT_CLIPBOARD) && defined(FEAT_GUI_GTK)
912# define FEAT_DND
913#endif
914
Martin Tournoij7904fa42022-10-04 16:28:45 +0100915#if defined(FEAT_GUI_MSWIN)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100916# define MSWIN_FIND_REPLACE // include code for find/replace dialog
Bram Moolenaar071d4272004-06-13 20:20:40 +0000917# define MSWIN_FR_BUFSIZE 256
918#endif
919
Bram Moolenaar7b0294c2004-10-11 10:16:09 +0000920#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000921 || defined(MSWIN_FIND_REPLACE)
Bram Moolenaar7b0294c2004-10-11 10:16:09 +0000922# define FIND_REPLACE_DIALOG 1
923#endif
924
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925/*
926 * +clientserver Remote control via the remote_send() function
927 * and the --remote argument
928 */
Bram Moolenaar4f974752019-02-17 17:44:42 +0100929#if (defined(MSWIN) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000930# define FEAT_CLIENTSERVER
931#endif
932
933/*
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100934 * +autoservername Automatically generate a servername for clientserver
935 * when --servername is not passed on the command line.
936 */
937#if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
Bram Moolenaar4f974752019-02-17 17:44:42 +0100938# ifdef MSWIN
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100939 // Always enabled on MS-Windows.
Bram Moolenaar23921432017-11-13 22:08:16 +0100940# define FEAT_AUTOSERVERNAME
941# else
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100942 // Enable here if you don't use configure.
943// # define FEAT_AUTOSERVERNAME
Bram Moolenaar23921432017-11-13 22:08:16 +0100944# endif
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100945#endif
946
947/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948 * +termresponse send t_RV to obtain terminal response. Used for xterm
949 * to check if mouse dragging can be used and if term
Bram Moolenaar3d27a452007-05-10 17:44:18 +0000950 * codes can be obtained.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000951 */
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200952#if defined(HAVE_TGETENT)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000953# define FEAT_TERMRESPONSE
954#endif
955
956/*
957 * cursor shape Adjust the shape of the cursor to the mode.
958 * mouse shape Adjust the shape of the mouse pointer to the mode.
959 */
960#ifdef FEAT_NORMAL
Bram Moolenaarafde13b2019-04-28 19:46:49 +0200961// Win32 console can change cursor shape
962# if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000963# define MCH_CURSOR_SHAPE
964# endif
Bram Moolenaar4f974752019-02-17 17:44:42 +0100965# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100966 || defined(FEAT_GUI_GTK) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000967 || defined(FEAT_GUI_PHOTON)
968# define FEAT_MOUSESHAPE
969# endif
970#endif
971
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100972// GUI and some consoles can change the shape of the cursor. The code is also
973// needed for the 'mouseshape' and 'concealcursor' options.
Bram Moolenaarf5963f72010-07-23 22:10:27 +0200974#if defined(FEAT_GUI) \
975 || defined(MCH_CURSOR_SHAPE) \
976 || defined(FEAT_MOUSESHAPE) \
977 || defined(FEAT_CONCEAL) \
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000978 || (defined(UNIX) && defined(FEAT_NORMAL))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000979# define CURSOR_SHAPE
980#endif
981
Bram Moolenaar4f974752019-02-17 17:44:42 +0100982#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
Bram Moolenaar0b962e52022-04-03 18:02:37 +0100983 || defined(FEAT_GUI_MOTIF))
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000984# define MZSCHEME_GUI_THREADS
985#endif
986
Bram Moolenaar071d4272004-06-13 20:20:40 +0000987/*
988 * +ARP Amiga only. Use arp.library, DOS 2.0 is not required.
989 */
Bram Moolenaar36fe7b22020-11-25 15:45:38 +0100990#if defined(AMIGA) && !defined(NO_ARP) && !defined(__amigaos4__) \
Bram Moolenaard49a35a2020-11-25 21:55:45 +0100991 && !defined(__MORPHOS__) && !defined(__AROS__)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000992# define FEAT_ARP
993#endif
994
Bram Moolenaar071d4272004-06-13 20:20:40 +0000995/*
996 * +ole Win32 OLE automation: Use Makefile.ovc.
997 */
998
999/*
1000 * These features can only be included by using a configure argument. See the
1001 * Makefile for a line to uncomment.
Bram Moolenaar55d5c032010-07-17 23:52:29 +02001002 * +lua Lua interface: "--enable-luainterp"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001003 * +mzscheme MzScheme interface: "--enable-mzscheme"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001004 * +perl Perl interface: "--enable-perlinterp"
1005 * +python Python interface: "--enable-pythoninterp"
1006 * +tcl TCL interface: "--enable-tclinterp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001007 * +netbeans_intg Netbeans integration
Bram Moolenaare0874f82016-01-24 20:36:41 +01001008 * +channel Inter process communication
Bram Moolenaara74fda62019-10-19 17:38:03 +02001009 * +GUI_Motif Motif GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +00001010 */
1011
1012/*
1013 * These features are automatically detected:
1014 * +terminfo
1015 * +tgetent
1016 */
1017
1018/*
Bram Moolenaar0c72fe42018-03-29 16:04:08 +02001019 * The Netbeans feature requires +eval.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001020 */
Bram Moolenaar0c72fe42018-03-29 16:04:08 +02001021#if !defined(FEAT_EVAL) && defined(FEAT_NETBEANS_INTG)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001022# undef FEAT_NETBEANS_INTG
1023#endif
1024
1025/*
Bram Moolenaar835dc632016-02-07 14:27:38 +01001026 * The +channel feature requires +eval.
Bram Moolenaare0874f82016-01-24 20:36:41 +01001027 */
Bram Moolenaar509ce2a2016-03-11 22:52:15 +01001028#if !defined(FEAT_EVAL) && defined(FEAT_JOB_CHANNEL)
1029# undef FEAT_JOB_CHANNEL
Bram Moolenaar835dc632016-02-07 14:27:38 +01001030#endif
1031
1032/*
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001033 * +terminal ":terminal" command. Runs a terminal in a window.
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01001034 * requires +channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001035 */
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01001036#if defined(FEAT_TERMINAL) && !defined(FEAT_JOB_CHANNEL)
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001037# undef FEAT_TERMINAL
1038#endif
Bram Moolenaar3cd43cc2017-08-12 19:51:41 +02001039#if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)
1040# define CURSOR_SHAPE
1041#endif
Bram Moolenaara74fda62019-10-19 17:38:03 +02001042#if defined(FEAT_TERMINAL) && !defined(FEAT_SYN_HL)
1043// simplify the code a bit by enabling +syntax when +terminal is enabled
1044# define FEAT_SYN_HL
1045#endif
1046
1047/*
Bram Moolenaar8b9abfd2021-03-29 20:49:05 +02001048 * +autoshelldir 'autoshelldir' option.
1049 */
1050#if defined(FEAT_TERMINAL)
1051# define FEAT_AUTOSHELLDIR
1052#endif
1053/*
Bram Moolenaar05ad5ff2019-11-30 22:48:27 +01001054 * +textprop and +popupwin Text PROPerties and POPUP windows
Bram Moolenaara74fda62019-10-19 17:38:03 +02001055 */
1056#if defined(FEAT_EVAL) && defined(FEAT_SYN_HL)
Bram Moolenaar05ad5ff2019-11-30 22:48:27 +01001057# define FEAT_PROP_POPUP
Bram Moolenaara74fda62019-10-19 17:38:03 +02001058#endif
1059
Bram Moolenaar9198de32022-08-27 21:30:03 +01001060/*
1061 * +message_window use a popup for messages when 'cmdheight' is zero
1062 */
1063#if defined(FEAT_PROP_POPUP) && defined(FEAT_TIMERS)
1064# define HAS_MESSAGE_WINDOW
1065#endif
1066
Bram Moolenaara74fda62019-10-19 17:38:03 +02001067#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME)
1068// Can limit syntax highlight time to 'redrawtime'.
1069# define SYN_TIME_LIMIT 1
1070#endif
1071
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001072
1073/*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074 * +signs Allow signs to be displayed to the left of text lines.
1075 * Adds the ":sign" command.
1076 */
Martin Tournoij25f3a142022-10-08 19:26:41 +01001077#if defined(FEAT_NORMAL) || defined(FEAT_NETBEANS_INTG) || defined(FEAT_PROP_POPUP)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001078# define FEAT_SIGNS
Bram Moolenaar0b962e52022-04-03 18:02:37 +01001079# if (defined(FEAT_GUI_MOTIF) && defined(HAVE_X11_XPM_H)) \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001080 || defined(FEAT_GUI_GTK) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001081 || (defined(MSWIN) && defined(FEAT_GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001082# define FEAT_SIGN_ICONS
1083# endif
1084#endif
1085
1086/*
1087 * +balloon_eval Allow balloon expression evaluation. Used with a
1088 * debugger and for tooltips.
1089 * Only for GUIs where it was implemented.
1090 */
Bram Moolenaar0b962e52022-04-03 18:02:37 +01001091#if (defined(FEAT_GUI_MOTIF) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001092 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) \
Bram Moolenaarf193fff2006-04-27 00:02:13 +00001093 && ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001094 && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)) \
Bram Moolenaar44ecf652005-03-07 23:09:59 +00001095 || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001096# define FEAT_BEVAL_GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +00001097# if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001098 && !defined(FEAT_GUI_MSWIN)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001099# define FEAT_XFONTSET
1100# endif
1101#endif
1102
Bram Moolenaar0b962e52022-04-03 18:02:37 +01001103#if defined(FEAT_BEVAL_GUI) && defined(FEAT_GUI_MOTIF)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001104# define FEAT_BEVAL_TIP // balloon eval used for toolbar tooltip
Bram Moolenaar071d4272004-06-13 20:20:40 +00001105#endif
1106
Bram Moolenaar51b0f372017-11-18 18:52:04 +01001107/*
1108 * +balloon_eval_term Allow balloon expression evaluation in the terminal.
1109 */
Bram Moolenaarebf142a2018-03-06 18:20:03 +01001110#if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001111 (defined(UNIX) || defined(VMS) || \
1112 (defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))))
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001113# define FEAT_BEVAL_TERM
1114#endif
1115
1116#if defined(FEAT_BEVAL_GUI) || defined(FEAT_BEVAL_TERM)
1117# define FEAT_BEVAL
Bram Moolenaar51b0f372017-11-18 18:52:04 +01001118#endif
1119
Bram Moolenaar0b962e52022-04-03 18:02:37 +01001120// Motif is X11
1121#if defined(FEAT_GUI_MOTIF)
Bram Moolenaara23ccb82006-02-27 00:08:02 +00001122# define FEAT_GUI_X11
1123#endif
1124
Bram Moolenaarbb1969b2019-01-17 15:45:25 +01001125#if defined(FEAT_NETBEANS_INTG)
1126// NetBeans uses menus.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001127# if !defined(FEAT_MENU)
1128# define FEAT_MENU
1129# endif
1130#endif
1131
Bram Moolenaar8dff8182006-04-06 20:18:50 +00001132/*
1133 * +autochdir 'autochdir' option.
1134 */
Martin Tournoij25f3a142022-10-08 19:26:41 +01001135#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_NORMAL)
Bram Moolenaar8dff8182006-04-06 20:18:50 +00001136# define FEAT_AUTOCHDIR
1137#endif
Bram Moolenaar55debbe2010-05-23 23:34:36 +02001138
1139/*
1140 * +persistent_undo 'undofile', 'undodir' options, :wundo and :rundo, and
1141 * implementation.
1142 */
1143#ifdef FEAT_NORMAL
1144# define FEAT_PERSISTENT_UNDO
1145#endif
Bram Moolenaar68a33fc2012-04-25 16:50:48 +02001146
1147/*
1148 * +filterpipe
1149 */
1150#if (defined(UNIX) && !defined(USE_SYSTEM)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001151 || (defined(MSWIN) && defined(FEAT_GUI_MSWIN))
Bram Moolenaar68a33fc2012-04-25 16:50:48 +02001152# define FEAT_FILTERPIPE
1153#endif
Bram Moolenaarcafafb32018-02-22 21:07:09 +01001154
1155/*
1156 * +vtp: Win32 virtual console.
1157 */
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001158#if (!defined(FEAT_GUI) || defined(VIMDLL)) && defined(MSWIN)
Bram Moolenaarcafafb32018-02-22 21:07:09 +01001159# define FEAT_VTP
1160#endif
Bram Moolenaar460ae5d2022-01-01 14:19:49 +00001161
1162#if defined(DYNAMIC_PERL) \
1163 || defined(DYNAMIC_PYTHON) || defined(DYNAMIC_PYTHON3) \
1164 || defined(DYNAMIC_RUBY) \
1165 || defined(DYNAMIC_TCL) \
1166 || defined(DYNAMIC_ICONV) \
1167 || defined(DYNAMIC_GETTEXT) \
1168 || defined(DYNAMIC_MZSCHEME) \
1169 || defined(DYNAMIC_LUA) \
1170 || defined(FEAT_TERMINAL)
1171# define USING_LOAD_LIBRARY
1172#endif
Christian Brabandte085dfd2023-09-30 12:49:18 +02001173
1174/*
Christian Brabandta4dfbfe2023-09-30 18:51:36 +02001175 * currently Unix only: XATTR support
Christian Brabandte085dfd2023-09-30 12:49:18 +02001176 */
1177
Christian Brabandta4dfbfe2023-09-30 18:51:36 +02001178#if defined(FEAT_NORMAL) && defined(HAVE_XATTR) && !defined(MACOS_X)
Christian Brabandte085dfd2023-09-30 12:49:18 +02001179# define FEAT_XATTR
1180#endif