blob: 36761ca499796168021839ca42e9860a3bb1f2cf [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().
25 * - Add a feature to ":help feature-list" in doc/eval.txt.
26 * - 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 *
34 * +tiny almost no features enabled, not even multiple windows
35 * +small few features enabled, as basic as possible
36 * +normal A default selection of features enabled
37 * +big many features enabled, as rich as possible.
Bram Moolenaar3577c6f2008-06-24 21:16:56 +000038 * +huge all possible features enabled.
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 *
40 * When +small is used, +tiny is also included. +normal implies +small, etc.
41 */
42
43/*
44 * Uncomment one of these to override the default. For unix use a configure
45 * argument, see Makefile.
46 */
47#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
48 && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +010049// #define FEAT_TINY
50// #define FEAT_SMALL
51// #define FEAT_NORMAL
52// #define FEAT_BIG
53// #define FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +000054#endif
55
56/*
Bram Moolenaar23c4f712016-01-20 22:11:59 +010057 * For Unix, Mac and Win32 use +huge by default. These days CPUs are fast and
58 * Memory is cheap.
Bram Moolenaara06ecab2016-07-16 14:47:36 +020059 * Use +big for older systems: Other MS-Windows and VMS.
Bram Moolenaar23c4f712016-01-20 22:11:59 +010060 * Otherwise use +normal
Bram Moolenaar071d4272004-06-13 20:20:40 +000061 */
62#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
63 && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
Bram Moolenaar4f974752019-02-17 17:44:42 +010064# if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
Bram Moolenaar23c4f712016-01-20 22:11:59 +010065# define FEAT_HUGE
Bram Moolenaar071d4272004-06-13 20:20:40 +000066# else
Bram Moolenaard0573012017-10-28 21:11:06 +020067# if defined(MSWIN) || defined(VMS) || defined(AMIGA)
Bram Moolenaar23c4f712016-01-20 22:11:59 +010068# define FEAT_BIG
Bram Moolenaar071d4272004-06-13 20:20:40 +000069# else
Bram Moolenaar48e330a2016-02-23 14:53:34 +010070# define FEAT_NORMAL
Bram Moolenaar071d4272004-06-13 20:20:40 +000071# endif
72# endif
73#endif
74
75/*
76 * Each feature implies including the "smaller" ones.
77 */
78#ifdef FEAT_HUGE
79# define FEAT_BIG
80#endif
81#ifdef FEAT_BIG
82# define FEAT_NORMAL
83#endif
84#ifdef FEAT_NORMAL
85# define FEAT_SMALL
86#endif
87#ifdef FEAT_SMALL
88# define FEAT_TINY
89#endif
90
91/*
92 * Optional code (see ":help +feature-list")
93 * =============
94 */
95
96/*
Bram Moolenaarffc07162019-08-17 20:17:51 +020097 * These features used to be optional but are now always enabled:
Bram Moolenaar071d4272004-06-13 20:20:40 +000098 * +windows Multiple windows. Without this there is no help
99 * window and no status lines.
Bram Moolenaar44a2f922016-03-19 22:11:51 +0100100 * +vertsplit Vertically split windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101 * +cmdhist Command line history.
Bram Moolenaarffc07162019-08-17 20:17:51 +0200102 * +localmap Mappings and abbreviations local to a buffer.
103 * +visual Visual mode
104 * +visualextra Extra features for Visual mode (mostly block operators).
105 * +virtualedit 'virtualedit' option and its implementation
106 * +user_commands Allow the user to define his own commands.
107 * +multi_byte Generic multi-byte character handling.
Bram Moolenaar0a52df52019-08-18 22:26:31 +0200108 * +cmdline_compl completion of mappings/abbreviations in cmdline mode.
Bram Moolenaare2c453d2019-08-21 14:37:09 +0200109 * +insert_expand CTRL-N/CTRL-P/CTRL-X in insert mode.
Bram Moolenaarb005cd82019-09-04 15:54:55 +0200110 * +modify_fname modifiers for file name. E.g., "%:p:h".
Bram Moolenaar8c96af92019-09-28 19:05:57 +0200111 * +comments 'comments' option.
Bram Moolenaar651fca82021-11-29 20:39:38 +0000112 * +title 'title' and 'icon' options
Bram Moolenaarffc07162019-08-17 20:17:51 +0200113 *
114 * Obsolete:
115 * +tag_old_static Old style static tags: "file:tag file ..".
116 * Support was removed in 8.1.1093.
117 * +farsi Farsi (Persian language) Keymap support.
118 * Removed in patch 8.1.0932
Bram Moolenaar071d4272004-06-13 20:20:40 +0000119 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000120
121/*
Bram Moolenaar56be9502010-06-06 14:20:26 +0200122 * Message history is fixed at 200 message, 20 for the tiny version.
Bram Moolenaar4770d092006-01-12 23:22:24 +0000123 */
124#ifdef FEAT_SMALL
Bram Moolenaar6773b2b2010-05-30 16:01:37 +0200125# define MAX_MSG_HIST_LEN 200
Bram Moolenaar4770d092006-01-12 23:22:24 +0000126#else
127# define MAX_MSG_HIST_LEN 20
128#endif
129
130/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000131 * +jumplist Jumplist, CTRL-O and CTRL-I commands.
132 */
133#ifdef FEAT_SMALL
134# define FEAT_JUMPLIST
135#endif
136
Bram Moolenaard7663c22019-08-06 21:59:57 +0200137#if defined(FEAT_SMALL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000138# define FEAT_CMDWIN
139#endif
140
141/*
142 * +folding Fold lines.
143 */
144#ifdef FEAT_NORMAL
145# define FEAT_FOLDING
146#endif
147
148/*
149 * +digraphs Digraphs.
150 * In insert mode and on the command line you will be
151 * able to use digraphs. The CTRL-K command will work.
152 * Define OLD_DIGRAPHS to get digraphs compatible with
153 * Vim 5.x. The new ones are from RFC 1345.
154 */
155#ifdef FEAT_NORMAL
156# define FEAT_DIGRAPHS
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100157// #define OLD_DIGRAPHS
Bram Moolenaar071d4272004-06-13 20:20:40 +0000158#endif
159
160/*
161 * +langmap 'langmap' option. Only useful when you put your
162 * keyboard in a special language mode, e.g. for typing
163 * greek.
164 */
165#ifdef FEAT_BIG
166# define FEAT_LANGMAP
167#endif
168
169/*
170 * +keymap 'keymap' option. Allows you to map typed keys in
171 * Insert mode for a special language.
172 */
173#ifdef FEAT_BIG
174# define FEAT_KEYMAP
175#endif
176
Bram Moolenaar071d4272004-06-13 20:20:40 +0000177#ifdef FEAT_NORMAL
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100178# define VIM_BACKTICK // internal backtick expansion
Bram Moolenaar071d4272004-06-13 20:20:40 +0000179#endif
180
181/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182 * +cmdline_info 'showcmd' and 'ruler' options.
183 */
184#ifdef FEAT_NORMAL
185# define FEAT_CMDL_INFO
186#endif
187
188/*
189 * +linebreak 'showbreak', 'breakat' and 'linebreak' options.
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000190 * Also 'numberwidth'.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000191 */
192#ifdef FEAT_NORMAL
193# define FEAT_LINEBREAK
194#endif
195
196/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197 * +extra_search 'hlsearch' and 'incsearch' options.
198 */
199#ifdef FEAT_NORMAL
200# define FEAT_SEARCH_EXTRA
201#endif
202
203/*
204 * +quickfix Quickfix commands.
205 */
206#ifdef FEAT_NORMAL
207# define FEAT_QUICKFIX
208#endif
209
210/*
211 * +file_in_path "gf" and "<cfile>" commands.
212 */
213#ifdef FEAT_NORMAL
214# define FEAT_SEARCHPATH
215#endif
216
217/*
218 * +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
219 */
220#ifdef FEAT_NORMAL
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100221# ifdef FEAT_SEARCHPATH // FEAT_SEARCHPATH is required
Bram Moolenaar071d4272004-06-13 20:20:40 +0000222# define FEAT_FIND_ID
223# endif
224#endif
225
226/*
227 * +path_extra up/downwards searching in 'path' and 'tags'.
228 */
229#ifdef FEAT_NORMAL
230# define FEAT_PATH_EXTRA
231#endif
232
233/*
234 * +rightleft Right-to-left editing/typing support.
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200235 *
236 * Disabled for EBCDIC as it requires multibyte.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237 */
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100238#if defined(FEAT_BIG) && !defined(DISABLE_RIGHTLEFT) && !defined(EBCDIC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000239# define FEAT_RIGHTLEFT
240#endif
241
242/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000243 * +arabic Arabic keymap and shaping support.
Bram Moolenaar2be7cb72019-01-12 16:10:51 +0100244 * Requires FEAT_RIGHTLEFT
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200245 *
246 * Disabled for EBCDIC as it requires multibyte.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247 */
Bram Moolenaar30276f22019-01-24 17:59:39 +0100248#if defined(FEAT_BIG) && !defined(DISABLE_ARABIC) && !defined(EBCDIC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249# define FEAT_ARABIC
250#endif
251#ifdef FEAT_ARABIC
252# ifndef FEAT_RIGHTLEFT
253# define FEAT_RIGHTLEFT
254# endif
255#endif
256
257/*
258 * +emacs_tags When FEAT_EMACS_TAGS defined: Include support for
259 * emacs style TAGS file.
260 */
261#ifdef FEAT_BIG
262# define FEAT_EMACS_TAGS
263#endif
264
265/*
266 * +tag_binary Can use a binary search for the tags file.
267 *
268 * Disabled for EBCDIC:
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200269 * On z/OS Unix we have the problem that /bin/sort sorts ASCII instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270 * EBCDIC. With this binary search doesn't work, as VIM expects a tag file
271 * sorted by character values. I'm not sure how to fix this. Should we really
272 * do a EBCDIC to ASCII conversion for this??
273 */
Bram Moolenaar79473122016-09-06 21:32:11 +0200274#if !defined(EBCDIC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000275# define FEAT_TAG_BINS
276#endif
277
278/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279 * +cscope Unix only: Cscope support.
280 */
281#if defined(UNIX) && defined(FEAT_BIG) && !defined(FEAT_CSCOPE) && !defined(MACOS_X)
282# define FEAT_CSCOPE
283#endif
284
285/*
286 * +eval Built-in script language and expression evaluation,
287 * ":let", ":if", etc.
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000288 * +float Floating point variables.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000289 */
290#ifdef FEAT_NORMAL
291# define FEAT_EVAL
Bram Moolenaar4f974752019-02-17 17:44:42 +0100292# if defined(HAVE_FLOAT_FUNCS) || defined(MSWIN) || defined(MACOS_X)
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000293# define FEAT_FLOAT
294# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295#endif
296
Bram Moolenaareffed932018-08-14 13:38:17 +0200297#ifdef FEAT_EVAL
298# define HAVE_SANDBOX
299#endif
300
Bram Moolenaar071d4272004-06-13 20:20:40 +0000301/*
Bram Moolenaar05159a02005-02-26 23:04:13 +0000302 * +profile Profiling for functions and scripts.
303 */
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000304#if defined(FEAT_HUGE) \
Bram Moolenaar1e015462005-09-25 22:16:38 +0000305 && defined(FEAT_EVAL) \
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000306 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100307 || defined(MSWIN))
Bram Moolenaar05159a02005-02-26 23:04:13 +0000308# define FEAT_PROFILE
309#endif
310
311/*
Bram Moolenaar76916e62006-03-21 21:23:25 +0000312 * +reltime reltime() function
313 */
314#if defined(FEAT_NORMAL) \
315 && defined(FEAT_EVAL) \
316 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100317 || defined(MSWIN))
Bram Moolenaar76916e62006-03-21 21:23:25 +0000318# define FEAT_RELTIME
319#endif
320
321/*
Bram Moolenaar975b5272016-03-15 23:10:59 +0100322 * +timers timer_start()
323 */
Bram Moolenaar4f974752019-02-17 17:44:42 +0100324#if defined(FEAT_RELTIME) && (defined(UNIX) || defined(MSWIN) || defined(VMS) )
Bram Moolenaar975b5272016-03-15 23:10:59 +0100325# define FEAT_TIMERS
326#endif
327
328/*
Bram Moolenaar1e015462005-09-25 22:16:38 +0000329 * +textobjects Text objects: "vaw", "das", etc.
330 */
331#if defined(FEAT_NORMAL) && defined(FEAT_EVAL)
332# define FEAT_TEXTOBJ
333#endif
334
335/*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000336 * Insert mode completion with 'completefunc'.
337 */
Bram Moolenaare2c453d2019-08-21 14:37:09 +0200338#if defined(FEAT_EVAL)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000339# define FEAT_COMPL_FUNC
340#endif
341
342/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000343 * +printer ":hardcopy" command
344 * +postscript Printing uses PostScript file output.
345 */
346#if defined(FEAT_NORMAL) && (defined(MSWIN) || defined(FEAT_EVAL)) \
347 && !defined(AMIGA)
348# define FEAT_PRINTER
349#endif
350#if defined(FEAT_PRINTER) && ((defined(MSWIN) && defined(MSWINPS)) \
351 || (!defined(MSWIN) && defined(FEAT_EVAL)))
352# define FEAT_POSTSCRIPT
353#endif
354
355/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356 * +diff Displaying diffs in a nice way.
357 * Requires +windows and +autocmd.
358 */
Bram Moolenaarf2bd8ef2018-03-04 18:08:14 +0100359#if defined(FEAT_NORMAL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360# define FEAT_DIFF
361#endif
362
363/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000364 * +statusline 'statusline', 'rulerformat' and special format of
365 * 'titlestring' and 'iconstring' options.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000366 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000367#ifdef FEAT_NORMAL
368# define FEAT_STL_OPT
369# ifndef FEAT_CMDL_INFO
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100370# define FEAT_CMDL_INFO // 'ruler' is required for 'statusline'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000371# endif
372#endif
373
Bram Moolenaar651fca82021-11-29 20:39:38 +0000374/*
375 * +byte_offset '%o' in 'statusline' and builtin functions line2byte()
376 * and byte2line().
377 * Note: Required for Macintosh.
378 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000379#ifdef FEAT_NORMAL
380# define FEAT_BYTEOFF
381#endif
382
383/*
384 * +wildignore 'wildignore' and 'backupskip' options
385 * Needed for Unix to make "crontab -e" work.
386 */
387#if defined(FEAT_NORMAL) || defined(UNIX)
388# define FEAT_WILDIGN
389#endif
390
391/*
392 * +wildmenu 'wildmenu' option
393 */
Bram Moolenaar4033c552017-09-16 20:54:51 +0200394#if defined(FEAT_NORMAL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000395# define FEAT_WILDMENU
396#endif
397
398/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000399 * +viminfo reading/writing the viminfo file. Takes about 8Kbyte
400 * of code.
401 * VIMINFO_FILE Location of user .viminfo file (should start with $).
402 * VIMINFO_FILE2 Location of alternate user .viminfo file.
403 */
404#ifdef FEAT_NORMAL
405# define FEAT_VIMINFO
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100406// #define VIMINFO_FILE "$HOME/foo/.viminfo"
407// #define VIMINFO_FILE2 "~/bar/.viminfo"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000408#endif
409
410/*
411 * +syntax syntax highlighting. When using this, it's a good
412 * idea to have +autocmd and +eval too.
413 */
414#if defined(FEAT_NORMAL) || defined(PROTO)
415# define FEAT_SYN_HL
416#endif
417
418/*
Bram Moolenaar860cae12010-06-05 23:22:07 +0200419 * +conceal 'conceal' option. Needs syntax highlighting
420 * as this is how the concealed text is defined.
421 */
422#if defined(FEAT_BIG) && defined(FEAT_SYN_HL)
423# define FEAT_CONCEAL
424#endif
425
426/*
Bram Moolenaar2b48ad52006-03-12 21:56:11 +0000427 * +spell spell checking
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200428 *
Bram Moolenaar860cae12010-06-05 23:22:07 +0200429 * Disabled for EBCDIC: * Doesn't work (SIGSEGV).
Bram Moolenaar2b48ad52006-03-12 21:56:11 +0000430 */
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200431#if (defined(FEAT_NORMAL) || defined(PROTO)) && !defined(EBCDIC)
Bram Moolenaar2b48ad52006-03-12 21:56:11 +0000432# define FEAT_SPELL
433#endif
434
435/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000436 * +builtin_terms Choose one out of the following four:
437 *
438 * NO_BUILTIN_TCAPS Do not include any builtin termcap entries (used only
439 * with HAVE_TGETENT defined).
440 *
441 * (nothing) Machine specific termcap entries will be included.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000442 *
443 * SOME_BUILTIN_TCAPS Include most useful builtin termcap entries (used only
444 * with NO_BUILTIN_TCAPS not defined).
445 * This is the default.
446 *
447 * ALL_BUILTIN_TCAPS Include all builtin termcap entries
448 * (used only with NO_BUILTIN_TCAPS not defined).
449 */
450#ifdef HAVE_TGETENT
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100451// #define NO_BUILTIN_TCAPS
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452#endif
453
Bram Moolenaare89ff042016-02-20 22:17:05 +0100454#if !defined(NO_BUILTIN_TCAPS)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000455# ifdef FEAT_BIG
456# define ALL_BUILTIN_TCAPS
457# else
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100458# define SOME_BUILTIN_TCAPS // default
Bram Moolenaar071d4272004-06-13 20:20:40 +0000459# endif
460#endif
461
462/*
463 * +lispindent lisp indenting (From Eric Fischer).
464 * +cindent C code indenting (From Eric Fischer).
465 * +smartindent smart C code indenting when the 'si' option is set.
466 *
467 * These two need to be defined when making prototypes.
468 */
469#if defined(FEAT_NORMAL) || defined(PROTO)
470# define FEAT_LISP
471#endif
472
473#if defined(FEAT_NORMAL) || defined(PROTO)
474# define FEAT_CINDENT
475#endif
476
477#ifdef FEAT_NORMAL
478# define FEAT_SMARTINDENT
479#endif
480
481/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000482 * +cryptv Encryption (by Mohsin Ahmed <mosh@sasi.com>).
483 */
Bram Moolenaar40e6a712010-05-16 22:32:54 +0200484#if defined(FEAT_NORMAL) && !defined(FEAT_CRYPT) || defined(PROTO)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000485# define FEAT_CRYPT
486#endif
487
488/*
489 * +mksession ":mksession" command.
Bram Moolenaarf96ae0b2019-07-28 15:21:55 +0200490 * fully depends on +eval
Bram Moolenaar071d4272004-06-13 20:20:40 +0000491 */
Bram Moolenaarf96ae0b2019-07-28 15:21:55 +0200492#if defined(FEAT_EVAL)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000493# define FEAT_SESSION
494#endif
495
496/*
497 * +multi_lang Multi language support. ":menutrans", ":language", etc.
498 * +gettext Message translations (requires +multi_lang)
499 * (only when "lang" archive unpacked)
500 */
501#ifdef FEAT_NORMAL
502# define FEAT_MULTI_LANG
503#endif
504#if defined(HAVE_GETTEXT) && defined(FEAT_MULTI_LANG) \
505 && (defined(HAVE_LOCALE_H) || defined(X_LOCALE))
506# define FEAT_GETTEXT
507#endif
508
509/*
Bram Moolenaar30276f22019-01-24 17:59:39 +0100510 * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so
511 * IME can be used to input chars. Not tested much!
Bram Moolenaar071d4272004-06-13 20:20:40 +0000512 */
Bram Moolenaar4f974752019-02-17 17:44:42 +0100513#if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100514// #define FEAT_MBYTE_IME
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100515#endif
516
517#if defined(FEAT_BIG) && defined(FEAT_GUI_HAIKU) && !defined(FEAT_MBYTE_IME)
518# define FEAT_MBYTE_IME
519#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000520
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100521// Use iconv() when it's available.
Bram Moolenaar2be7cb72019-01-12 16:10:51 +0100522#if (defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) || defined(DYNAMIC_ICONV)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523# define USE_ICONV
524#endif
525
526/*
527 * +xim X Input Method. For entering special languages like
528 * chinese and Japanese.
Bram Moolenaar54612582019-11-21 17:13:31 +0100529 * this is for Unix and VMS only.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000530 */
531#ifndef FEAT_XIM
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100532// #define FEAT_XIM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000533#endif
534
535#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100536# define USE_XIM 1 // needed for GTK include files
Bram Moolenaar071d4272004-06-13 20:20:40 +0000537#endif
538
Bram Moolenaar54612582019-11-21 17:13:31 +0100539#if defined(FEAT_XIM)
540// # define X_LOCALE // for OS with incomplete locale
541 // support, like old linux versions.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542#endif
543
544/*
545 * +xfontset X fontset support. For outputting wide characters.
546 */
547#ifndef FEAT_XFONTSET
Bram Moolenaar2be7cb72019-01-12 16:10:51 +0100548# if defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000549# define FEAT_XFONTSET
550# else
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100551// # define FEAT_XFONTSET
Bram Moolenaar071d4272004-06-13 20:20:40 +0000552# endif
553#endif
554
555/*
556 * +libcall libcall() function
557 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100558// Using dlopen() also requires dlsym() to be available.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000559#if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
560# define USE_DLOPEN
561#endif
Bram Moolenaar4f974752019-02-17 17:44:42 +0100562#if defined(FEAT_EVAL) && (defined(MSWIN) || ((defined(UNIX) || defined(VMS)) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000563 && (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD))))
564# define FEAT_LIBCALL
565#endif
566
567/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000568 * +menu ":menu" command
569 */
570#ifdef FEAT_NORMAL
571# define FEAT_MENU
Bram Moolenaar4f974752019-02-17 17:44:42 +0100572# ifdef FEAT_GUI_MSWIN
Bram Moolenaar071d4272004-06-13 20:20:40 +0000573# define FEAT_TEAROFF
574# endif
575#endif
576
Bram Moolenaaraef8c3d2018-03-03 18:59:16 +0100577/*
578 * popup menu in a terminal
579 */
Bram Moolenaare2c453d2019-08-21 14:37:09 +0200580#if defined(FEAT_MENU) && !defined(ALWAYS_USE_GUI)
Bram Moolenaaraef8c3d2018-03-03 18:59:16 +0100581# define FEAT_TERM_POPUP_MENU
582#endif
583
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200584/*
585 * sound - currently only with libcanberra
586 */
Bram Moolenaar21606672019-06-14 20:40:58 +0200587#if !defined(FEAT_SOUND) && defined(HAVE_CANBERRA)
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200588# define FEAT_SOUND
589#endif
Bram Moolenaar28e67e02019-08-15 23:05:49 +0200590#if defined(FEAT_SOUND) && defined(HAVE_CANBERRA)
591# define FEAT_SOUND_CANBERRA
592#endif
Bram Moolenaar427f5b62019-06-09 13:43:51 +0200593
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200594/*
595 * libsodium - add cryptography support
596 */
597#if defined(HAVE_SODIUM) && defined(FEAT_BIG)
598# define FEAT_SODIUM
599#endif
600
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100601// There are two ways to use XPM.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000602#if (defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF)) \
603 || defined(HAVE_X11_XPM_H)
604# define HAVE_XPM 1
605#endif
606
607/*
608 * +toolbar Include code for a toolbar (for the Win32 GUI, GTK
609 * always has it). But only if menus are enabled.
610 */
611#if defined(FEAT_NORMAL) && defined(FEAT_MENU) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000612 && (defined(FEAT_GUI_GTK) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000613 || defined(FEAT_GUI_MSWIN) \
614 || ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
615 && defined(HAVE_XPM)) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100616 || defined(FEAT_GUI_PHOTON) \
617 || defined(FEAT_GUI_HAIKU))
618
Bram Moolenaar071d4272004-06-13 20:20:40 +0000619# define FEAT_TOOLBAR
620#endif
Bram Moolenaar843ee412004-06-30 16:16:41 +0000621
622
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623#if defined(FEAT_TOOLBAR) && !defined(FEAT_MENU)
624# define FEAT_MENU
625#endif
626
627/*
Bram Moolenaar50bf7ce2019-09-15 13:17:00 +0200628 * GUI dark theme variant
629 */
630#if defined(FEAT_GUI_GTK) && defined(USE_GTK3)
631# define FEAT_GUI_DARKTHEME
632#endif
633
634/*
Bram Moolenaar32466aa2006-02-24 23:53:04 +0000635 * GUI tabline
636 */
Bram Moolenaar4033c552017-09-16 20:54:51 +0200637#if defined(FEAT_NORMAL) \
Bram Moolenaarf193fff2006-04-27 00:02:13 +0000638 && (defined(FEAT_GUI_GTK) \
Bram Moolenaarfc1421e2006-04-20 22:17:20 +0000639 || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100640 || defined(FEAT_GUI_HAIKU) \
Bram Moolenaarcf7164a2016-02-20 13:55:06 +0100641 || (defined(FEAT_GUI_MSWIN) \
Bram Moolenaar860cae12010-06-05 23:22:07 +0200642 && (!defined(_MSC_VER) || _MSC_VER > 1020)))
Bram Moolenaar32466aa2006-02-24 23:53:04 +0000643# define FEAT_GUI_TABLINE
644#endif
645
646/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000647 * +browse ":browse" command.
Bram Moolenaard812df62008-11-09 12:46:09 +0000648 * or just the ":browse" command modifier
Bram Moolenaar071d4272004-06-13 20:20:40 +0000649 */
Bram Moolenaard812df62008-11-09 12:46:09 +0000650#if defined(FEAT_NORMAL)
651# define FEAT_BROWSE_CMD
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100652# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
Bram Moolenaar097148e2020-08-11 21:58:20 +0200653 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON)
Bram Moolenaard812df62008-11-09 12:46:09 +0000654# define FEAT_BROWSE
655# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000656#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000657
658/*
Bram Moolenaarf939c4e2013-01-23 13:41:00 +0100659 * On some systems, when we compile with the GUI, we always use it. On Mac
660 * there is no terminal version, and on Windows we can't figure out how to
661 * fork one off with :gui.
662 */
Bram Moolenaar097148e2020-08-11 21:58:20 +0200663#if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
Bram Moolenaarf939c4e2013-01-23 13:41:00 +0100664# define ALWAYS_USE_GUI
665#endif
666
667/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000668 * +dialog_gui Use GUI dialog.
669 * +dialog_con May use Console dialog.
670 * When none of these defined there is no dialog support.
671 */
672#ifdef FEAT_NORMAL
673# if ((defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) \
674 && defined(HAVE_X11_XPM_H)) \
675 || defined(FEAT_GUI_GTK) \
676 || defined(FEAT_GUI_PHOTON) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100677 || defined(FEAT_GUI_HAIKU) \
Bram Moolenaar097148e2020-08-11 21:58:20 +0200678 || defined(FEAT_GUI_MSWIN)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000679# define FEAT_CON_DIALOG
680# define FEAT_GUI_DIALOG
681# else
682# define FEAT_CON_DIALOG
683# endif
684#endif
685#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
Bram Moolenaar8765a4a2010-07-27 22:41:43 +0200686 || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100687 || defined(FEAT_GUI_MSWIN))
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100688// need a dialog to show error messages when starting from the desktop
Bram Moolenaar071d4272004-06-13 20:20:40 +0000689# define FEAT_GUI_DIALOG
690#endif
691#if defined(FEAT_GUI_DIALOG) && \
692 (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000693 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
Bram Moolenaar097148e2020-08-11 21:58:20 +0200694 || defined(FEAT_GUI_PHOTON) \
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100695 || defined(FEAT_GUI_HAIKU))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000696# define FEAT_GUI_TEXTDIALOG
Bram Moolenaarf939c4e2013-01-23 13:41:00 +0100697# ifndef ALWAYS_USE_GUI
698# define FEAT_CON_DIALOG
699# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700#endif
701
Bram Moolenaar8e9eb3a2016-04-24 15:00:11 +0200702/*
Bram Moolenaar61be73b2016-04-29 22:59:22 +0200703 * +termguicolors 'termguicolors' option.
Bram Moolenaar8e9eb3a2016-04-24 15:00:11 +0200704 */
705#if (defined(FEAT_BIG) && defined(FEAT_SYN_HL)) && !defined(ALWAYS_USE_GUI)
Bram Moolenaar61be73b2016-04-29 22:59:22 +0200706# define FEAT_TERMGUICOLORS
Bram Moolenaar8e9eb3a2016-04-24 15:00:11 +0200707#endif
708
Bram Moolenaar071d4272004-06-13 20:20:40 +0000709/*
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200710 * +vartabs 'vartabstop' and 'varsofttabstop' options.
711 */
712#ifdef FEAT_BIG
713# define FEAT_VARTABS
714#endif
715
716/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717 * Preferences:
718 * ============
719 */
720
721/*
722 * +writebackup 'writebackup' is default on:
723 * Use a backup file while overwriting a file. But it's
724 * deleted again when 'backup' is not set. Changing this
Bram Moolenaare37d50a2008-08-06 17:06:04 +0000725 * is strongly discouraged: You can lose all your
Bram Moolenaar071d4272004-06-13 20:20:40 +0000726 * changes when the computer crashes while writing the
727 * file.
728 * VMS note: It does work on VMS as well, but because of
729 * version handling it does not have any purpose.
730 * Overwrite will write to the new version.
731 */
732#ifndef VMS
733# define FEAT_WRITEBACKUP
734#endif
735
736/*
737 * +xterm_save The t_ti and t_te entries for the builtin xterm will
738 * be set to save the screen when starting Vim and
739 * restoring it when exiting.
740 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100741// #define FEAT_XTERM_SAVE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000742
743/*
744 * DEBUG Output a lot of debugging garbage.
745 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100746// #define DEBUG
Bram Moolenaar071d4272004-06-13 20:20:40 +0000747
748/*
Bram Moolenaar3f269672009-11-03 11:11:11 +0000749 * STARTUPTIME Time the startup process. Writes a file with
750 * timestamps.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000751 */
Bram Moolenaar3f269672009-11-03 11:11:11 +0000752#if defined(FEAT_NORMAL) \
753 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +0100754 || defined(MSWIN))
Bram Moolenaar3f269672009-11-03 11:11:11 +0000755# define STARTUPTIME 1
756#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000757
758/*
759 * MEM_PROFILE Debugging of memory allocation and freeing.
760 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100761// #define MEM_PROFILE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000762
763/*
764 * VIMRC_FILE Name of the .vimrc file in current dir.
765 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100766// #define VIMRC_FILE ".vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000767
768/*
769 * EXRC_FILE Name of the .exrc file in current dir.
770 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100771// #define EXRC_FILE ".exrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000772
773/*
774 * GVIMRC_FILE Name of the .gvimrc file in current dir.
775 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100776// #define GVIMRC_FILE ".gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000777
778/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000779 * SESSION_FILE Name of the default ":mksession" file.
780 */
781#define SESSION_FILE "Session.vim"
782
783/*
784 * USR_VIMRC_FILE Name of the user .vimrc file.
785 * USR_VIMRC_FILE2 Name of alternate user .vimrc file.
786 * USR_VIMRC_FILE3 Name of alternate user .vimrc file.
787 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100788// #define USR_VIMRC_FILE "~/foo/.vimrc"
789// #define USR_VIMRC_FILE2 "~/bar/.vimrc"
790// #define USR_VIMRC_FILE3 "$VIM/.vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000791
792/*
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +0200793 * VIM_DEFAULTS_FILE Name of the defaults.vim script file
794 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100795// #define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +0200796
797/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798 * EVIM_FILE Name of the evim.vim script file
799 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100800// #define EVIM_FILE "$VIMRUNTIME/evim.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000801
802/*
803 * USR_EXRC_FILE Name of the user .exrc file.
804 * USR_EXRC_FILE2 Name of the alternate user .exrc file.
805 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100806// #define USR_EXRC_FILE "~/foo/.exrc"
807// #define USR_EXRC_FILE2 "~/bar/.exrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000808
809/*
810 * USR_GVIMRC_FILE Name of the user .gvimrc file.
811 * USR_GVIMRC_FILE2 Name of the alternate user .gvimrc file.
812 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100813// #define USR_GVIMRC_FILE "~/foo/.gvimrc"
814// #define USR_GVIMRC_FILE2 "~/bar/.gvimrc"
815// #define USR_GVIMRC_FILE3 "$VIM/.gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000816
817/*
818 * SYS_VIMRC_FILE Name of the system-wide .vimrc file.
819 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100820// #define SYS_VIMRC_FILE "/etc/vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000821
822/*
823 * SYS_GVIMRC_FILE Name of the system-wide .gvimrc file.
824 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100825// #define SYS_GVIMRC_FILE "/etc/gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000826
827/*
828 * DFLT_HELPFILE Name of the help file.
829 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100830// # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt.gz"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000831
832/*
833 * File names for:
834 * FILETYPE_FILE switch on file type detection
835 * FTPLUGIN_FILE switch on loading filetype plugin files
836 * INDENT_FILE switch on loading indent files
837 * FTOFF_FILE switch off file type detection
838 * FTPLUGOF_FILE switch off loading settings files
839 * INDOFF_FILE switch off loading indent files
840 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100841// # define FILETYPE_FILE "filetype.vim"
842// # define FTPLUGIN_FILE "ftplugin.vim"
843// # define INDENT_FILE "indent.vim"
844// # define FTOFF_FILE "ftoff.vim"
845// # define FTPLUGOF_FILE "ftplugof.vim"
846// # define INDOFF_FILE "indoff.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000847
848/*
849 * SYS_MENU_FILE Name of the default menu.vim file.
850 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100851// # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000852
853/*
854 * SYS_OPTWIN_FILE Name of the default optwin.vim file.
855 */
856#ifndef SYS_OPTWIN_FILE
857# define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
858#endif
859
860/*
861 * SYNTAX_FNAME Name of a syntax file, where %s is the syntax name.
862 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100863// #define SYNTAX_FNAME "/foo/%s.vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864
865/*
866 * RUNTIME_DIRNAME Generic name for the directory of the runtime files.
867 */
868#ifndef RUNTIME_DIRNAME
869# define RUNTIME_DIRNAME "runtime"
870#endif
871
872/*
Bram Moolenaar9d302ad2018-12-21 11:48:51 +0100873 * RUNTIME_GLOBAL Comma-separated list of directory names for global Vim
874 * runtime directories.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000875 * Don't define this if the preprocessor can't handle
876 * string concatenation.
877 * Also set by "--with-global-runtime" configure argument.
878 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100879// #define RUNTIME_GLOBAL "/etc/vim"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000880
881/*
Bram Moolenaar9d302ad2018-12-21 11:48:51 +0100882 * RUNTIME_GLOBAL_AFTER Comma-separated list of directory names for global Vim
883 * runtime after directories.
884 * Don't define this if the preprocessor can't handle
885 * string concatenation.
886 * Also set by "--with-global-runtime" configure argument.
887 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100888// #define RUNTIME_GLOBAL_AFTER "/etc/vim/after"
Bram Moolenaar9d302ad2018-12-21 11:48:51 +0100889
890/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000891 * MODIFIED_BY Name of who modified Vim. Required when distributing
Bram Moolenaar84a05ac2013-05-06 04:24:17 +0200892 * a modified version of Vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893 * Also from the "--with-modified-by" configure argument.
894 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100895// #define MODIFIED_BY "John Doe"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896
897/*
898 * Machine dependent:
899 * ==================
900 */
901
902/*
903 * +fork Unix only: fork() support (detected by configure)
904 * +system Use system() instead of fork/exec for starting a
905 * shell. Doesn't work for the GUI!
906 */
Bram Moolenaar9bf703d2019-11-30 19:44:38 +0100907// #define USE_SYSTEM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908
909/*
910 * +X11 Unix only. Include code for xterm title saving and X
911 * clipboard. Only works if HAVE_X11 is also defined.
912 */
Bram Moolenaar843ee412004-06-30 16:16:41 +0000913#if (defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914# define WANT_X11
915#endif
916
917/*
918 * XSMP - X11 Session Management Protocol
919 * It may be preferred to disable this if the GUI supports it (e.g.,
920 * GNOME/KDE) and implement save-yourself etc. through that, but it may also
921 * be cleaner to have all SM-aware vims do the same thing (libSM does not
922 * depend upon X11).
923 * If your GUI wants to support SM itself, change this ifdef.
924 * I'm assuming that any X11 implementation will cope with this for now.
925 */
926#if defined(HAVE_X11) && defined(WANT_X11) && defined(HAVE_X11_SM_SMLIB_H)
927# define USE_XSMP
928#endif
929#if defined(USE_XSMP_INTERACT) && !defined(USE_XSMP)
930# undef USE_XSMP_INTERACT
931#endif
932
933/*
934 * +mouse_xterm Unix only: Include code for xterm mouse handling.
935 * +mouse_dec idem, for Dec mouse handling.
936 * +mouse_jsbterm idem, for Jsbterm mouse handling.
937 * +mouse_netterm idem, for Netterm mouse handling.
938 * (none) MS-DOS mouse support.
939 * +mouse_gpm Unix only: Include code for Linux console mouse
940 * handling.
941 * +mouse_pterm PTerm mouse support for QNX
Bram Moolenaarcfb80702012-10-21 02:17:45 +0200942 * +mouse_sgr Unix only: Include code for for SGR-styled mouse.
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000943 * +mouse_sysmouse Unix only: Include code for FreeBSD and DragonFly
944 * console mouse handling.
Bram Moolenaar8e7d6222020-12-18 19:49:56 +0100945 * +mouse_urxvt Unix only: Include code for for urxvt mouse handling.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946 * +mouse Any mouse support (any of the above enabled).
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200947 * Always included, since either FEAT_MOUSE_XTERM or
948 * DOS_MOUSE is defined.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000949 */
Bram Moolenaar6f345a12019-12-17 21:27:18 +0100950// Amiga console has no mouse support
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200951#if defined(UNIX) || defined(VMS)
952# define FEAT_MOUSE_XTERM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000953# ifdef FEAT_BIG
954# define FEAT_MOUSE_NET
955# endif
956# ifdef FEAT_BIG
957# define FEAT_MOUSE_DEC
958# endif
Bram Moolenaarc8427482011-10-20 21:09:35 +0200959# ifdef FEAT_BIG
960# define FEAT_MOUSE_URXVT
961# endif
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200962#endif
963#if defined(MSWIN)
964# define DOS_MOUSE
965#endif
966#if defined(__QNX__)
967# define FEAT_MOUSE_PTERM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000968#endif
969
Bram Moolenaarf6dcbb22013-04-15 15:40:33 +0200970/*
971 * Note: Only one of the following may be defined:
972 * FEAT_MOUSE_GPM
973 * FEAT_SYSMOUSE
974 * FEAT_MOUSE_JSB
975 * FEAT_MOUSE_PTERM
976 */
Bram Moolenaar071d4272004-06-13 20:20:40 +0000977#if defined(FEAT_NORMAL) && defined(HAVE_GPM)
978# define FEAT_MOUSE_GPM
979#endif
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000980
981#if defined(FEAT_NORMAL) && defined(HAVE_SYSMOUSE)
982# define FEAT_SYSMOUSE
983#endif
Bram Moolenaarc8427482011-10-20 21:09:35 +0200984
Bram Moolenaara1cb1d12019-10-17 23:00:07 +0200985// urxvt is a small variation of mouse_xterm, and shares its code
Bram Moolenaarc8427482011-10-20 21:09:35 +0200986#if defined(FEAT_MOUSE_URXVT) && !defined(FEAT_MOUSE_XTERM)
987# define FEAT_MOUSE_XTERM
988#endif
989
Bram Moolenaar071d4272004-06-13 20:20:40 +0000990/*
991 * +clipboard Clipboard support. Always used for the GUI.
992 * +xterm_clipboard Unix only: Include code for handling the clipboard
993 * in an xterm like in the GUI.
994 */
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100995
996#ifdef FEAT_CYGWIN_WIN32_CLIPBOARD
997# define FEAT_CLIPBOARD
998#endif
999
Bram Moolenaar071d4272004-06-13 20:20:40 +00001000#ifdef FEAT_GUI
1001# ifndef FEAT_CLIPBOARD
1002# define FEAT_CLIPBOARD
Bram Moolenaar071d4272004-06-13 20:20:40 +00001003# endif
1004#endif
1005
Bram Moolenaarf7ff6e82014-03-23 15:13:05 +01001006#if defined(FEAT_NORMAL) \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001007 && (defined(UNIX) || defined(VMS)) \
1008 && defined(WANT_X11) && defined(HAVE_X11)
1009# define FEAT_XCLIPBOARD
1010# ifndef FEAT_CLIPBOARD
1011# define FEAT_CLIPBOARD
1012# endif
1013#endif
1014
1015/*
1016 * +dnd Drag'n'drop support. Always used for the GTK+ GUI.
1017 */
1018#if defined(FEAT_CLIPBOARD) && defined(FEAT_GUI_GTK)
1019# define FEAT_DND
1020#endif
1021
1022#if defined(FEAT_GUI_MSWIN) && defined(FEAT_SMALL)
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001023# define MSWIN_FIND_REPLACE // include code for find/replace dialog
Bram Moolenaar071d4272004-06-13 20:20:40 +00001024# define MSWIN_FR_BUFSIZE 256
1025#endif
1026
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00001027#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +00001028 || defined(MSWIN_FIND_REPLACE)
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00001029# define FIND_REPLACE_DIALOG 1
1030#endif
1031
Bram Moolenaar071d4272004-06-13 20:20:40 +00001032/*
1033 * +clientserver Remote control via the remote_send() function
1034 * and the --remote argument
1035 */
Bram Moolenaar4f974752019-02-17 17:44:42 +01001036#if (defined(MSWIN) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037# define FEAT_CLIENTSERVER
1038#endif
1039
1040/*
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001041 * +autoservername Automatically generate a servername for clientserver
1042 * when --servername is not passed on the command line.
1043 */
1044#if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
Bram Moolenaar4f974752019-02-17 17:44:42 +01001045# ifdef MSWIN
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001046 // Always enabled on MS-Windows.
Bram Moolenaar23921432017-11-13 22:08:16 +01001047# define FEAT_AUTOSERVERNAME
1048# else
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001049 // Enable here if you don't use configure.
1050// # define FEAT_AUTOSERVERNAME
Bram Moolenaar23921432017-11-13 22:08:16 +01001051# endif
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001052#endif
1053
1054/*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001055 * +termresponse send t_RV to obtain terminal response. Used for xterm
1056 * to check if mouse dragging can be used and if term
Bram Moolenaar3d27a452007-05-10 17:44:18 +00001057 * codes can be obtained.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001058 */
Bram Moolenaara1cb1d12019-10-17 23:00:07 +02001059#if defined(HAVE_TGETENT)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060# define FEAT_TERMRESPONSE
1061#endif
1062
1063/*
1064 * cursor shape Adjust the shape of the cursor to the mode.
1065 * mouse shape Adjust the shape of the mouse pointer to the mode.
1066 */
1067#ifdef FEAT_NORMAL
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001068// Win32 console can change cursor shape
1069# if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001070# define MCH_CURSOR_SHAPE
1071# endif
Bram Moolenaar4f974752019-02-17 17:44:42 +01001072# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +00001073 || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074 || defined(FEAT_GUI_PHOTON)
1075# define FEAT_MOUSESHAPE
1076# endif
1077#endif
1078
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001079// GUI and some consoles can change the shape of the cursor. The code is also
1080// needed for the 'mouseshape' and 'concealcursor' options.
Bram Moolenaarf5963f72010-07-23 22:10:27 +02001081#if defined(FEAT_GUI) \
1082 || defined(MCH_CURSOR_SHAPE) \
1083 || defined(FEAT_MOUSESHAPE) \
1084 || defined(FEAT_CONCEAL) \
Bram Moolenaarac6e65f2005-08-29 22:25:38 +00001085 || (defined(UNIX) && defined(FEAT_NORMAL))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001086# define CURSOR_SHAPE
1087#endif
1088
Bram Moolenaar4f974752019-02-17 17:44:42 +01001089#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
Bram Moolenaar097148e2020-08-11 21:58:20 +02001090 || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001091# define MZSCHEME_GUI_THREADS
1092#endif
1093
Bram Moolenaar071d4272004-06-13 20:20:40 +00001094/*
1095 * +ARP Amiga only. Use arp.library, DOS 2.0 is not required.
1096 */
Bram Moolenaar36fe7b22020-11-25 15:45:38 +01001097#if defined(AMIGA) && !defined(NO_ARP) && !defined(__amigaos4__) \
Bram Moolenaard49a35a2020-11-25 21:55:45 +01001098 && !defined(__MORPHOS__) && !defined(__AROS__)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001099# define FEAT_ARP
1100#endif
1101
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102/*
1103 * +ole Win32 OLE automation: Use Makefile.ovc.
1104 */
1105
1106/*
1107 * These features can only be included by using a configure argument. See the
1108 * Makefile for a line to uncomment.
Bram Moolenaar55d5c032010-07-17 23:52:29 +02001109 * +lua Lua interface: "--enable-luainterp"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001110 * +mzscheme MzScheme interface: "--enable-mzscheme"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001111 * +perl Perl interface: "--enable-perlinterp"
1112 * +python Python interface: "--enable-pythoninterp"
1113 * +tcl TCL interface: "--enable-tclinterp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001114 * +netbeans_intg Netbeans integration
Bram Moolenaare0874f82016-01-24 20:36:41 +01001115 * +channel Inter process communication
Bram Moolenaara74fda62019-10-19 17:38:03 +02001116 * +GUI_Athena Athena GUI
1117 * +GUI_Motif Motif GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +00001118 */
1119
1120/*
1121 * These features are automatically detected:
1122 * +terminfo
1123 * +tgetent
1124 */
1125
1126/*
Bram Moolenaar0c72fe42018-03-29 16:04:08 +02001127 * The Netbeans feature requires +eval.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001128 */
Bram Moolenaar0c72fe42018-03-29 16:04:08 +02001129#if !defined(FEAT_EVAL) && defined(FEAT_NETBEANS_INTG)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001130# undef FEAT_NETBEANS_INTG
1131#endif
1132
1133/*
Bram Moolenaar835dc632016-02-07 14:27:38 +01001134 * The +channel feature requires +eval.
Bram Moolenaare0874f82016-01-24 20:36:41 +01001135 */
Bram Moolenaar509ce2a2016-03-11 22:52:15 +01001136#if !defined(FEAT_EVAL) && defined(FEAT_JOB_CHANNEL)
1137# undef FEAT_JOB_CHANNEL
Bram Moolenaar835dc632016-02-07 14:27:38 +01001138#endif
1139
1140/*
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001141 * +terminal ":terminal" command. Runs a terminal in a window.
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01001142 * requires +channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001143 */
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01001144#if defined(FEAT_TERMINAL) && !defined(FEAT_JOB_CHANNEL)
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001145# undef FEAT_TERMINAL
1146#endif
Bram Moolenaar3cd43cc2017-08-12 19:51:41 +02001147#if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)
1148# define CURSOR_SHAPE
1149#endif
Bram Moolenaara74fda62019-10-19 17:38:03 +02001150#if defined(FEAT_TERMINAL) && !defined(FEAT_SYN_HL)
1151// simplify the code a bit by enabling +syntax when +terminal is enabled
1152# define FEAT_SYN_HL
1153#endif
1154
1155/*
Bram Moolenaar8b9abfd2021-03-29 20:49:05 +02001156 * +autoshelldir 'autoshelldir' option.
1157 */
1158#if defined(FEAT_TERMINAL)
1159# define FEAT_AUTOSHELLDIR
1160#endif
1161/*
Bram Moolenaar05ad5ff2019-11-30 22:48:27 +01001162 * +textprop and +popupwin Text PROPerties and POPUP windows
Bram Moolenaara74fda62019-10-19 17:38:03 +02001163 */
1164#if defined(FEAT_EVAL) && defined(FEAT_SYN_HL)
Bram Moolenaar05ad5ff2019-11-30 22:48:27 +01001165# define FEAT_PROP_POPUP
Bram Moolenaara74fda62019-10-19 17:38:03 +02001166#endif
1167
1168#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME)
1169// Can limit syntax highlight time to 'redrawtime'.
1170# define SYN_TIME_LIMIT 1
1171#endif
1172
Bram Moolenaare4f25e42017-07-07 11:54:15 +02001173
1174/*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001175 * +signs Allow signs to be displayed to the left of text lines.
1176 * Adds the ":sign" command.
1177 */
Bram Moolenaar05ad5ff2019-11-30 22:48:27 +01001178#if defined(FEAT_BIG) || defined(FEAT_NETBEANS_INTG) || defined(FEAT_PROP_POPUP)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001179# define FEAT_SIGNS
1180# if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
1181 && defined(HAVE_X11_XPM_H)) \
1182 || defined(FEAT_GUI_GTK) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001183 || (defined(MSWIN) && defined(FEAT_GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001184# define FEAT_SIGN_ICONS
1185# endif
1186#endif
1187
1188/*
1189 * +balloon_eval Allow balloon expression evaluation. Used with a
1190 * debugger and for tooltips.
1191 * Only for GUIs where it was implemented.
1192 */
1193#if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001194 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) \
Bram Moolenaarf193fff2006-04-27 00:02:13 +00001195 && ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001196 && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)) \
Bram Moolenaar44ecf652005-03-07 23:09:59 +00001197 || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001198# define FEAT_BEVAL_GUI
Bram Moolenaar071d4272004-06-13 20:20:40 +00001199# if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001200 && !defined(FEAT_GUI_MSWIN)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001201# define FEAT_XFONTSET
1202# endif
1203#endif
1204
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001205#if defined(FEAT_BEVAL_GUI) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001206# define FEAT_BEVAL_TIP // balloon eval used for toolbar tooltip
Bram Moolenaar071d4272004-06-13 20:20:40 +00001207#endif
1208
Bram Moolenaar51b0f372017-11-18 18:52:04 +01001209/*
1210 * +balloon_eval_term Allow balloon expression evaluation in the terminal.
1211 */
Bram Moolenaarebf142a2018-03-06 18:20:03 +01001212#if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001213 (defined(UNIX) || defined(VMS) || \
1214 (defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))))
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001215# define FEAT_BEVAL_TERM
1216#endif
1217
1218#if defined(FEAT_BEVAL_GUI) || defined(FEAT_BEVAL_TERM)
1219# define FEAT_BEVAL
Bram Moolenaar51b0f372017-11-18 18:52:04 +01001220#endif
1221
Bram Moolenaar9bf703d2019-11-30 19:44:38 +01001222// both Motif and Athena are X11 and share some code
Bram Moolenaara23ccb82006-02-27 00:08:02 +00001223#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
1224# define FEAT_GUI_X11
1225#endif
1226
Bram Moolenaarbb1969b2019-01-17 15:45:25 +01001227#if defined(FEAT_NETBEANS_INTG)
1228// NetBeans uses menus.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001229# if !defined(FEAT_MENU)
1230# define FEAT_MENU
1231# endif
1232#endif
1233
Bram Moolenaarbb1969b2019-01-17 15:45:25 +01001234#if 0
Bram Moolenaar071d4272004-06-13 20:20:40 +00001235/*
1236 * +footer Motif only: Add a message area at the bottom of the
1237 * main window area.
1238 */
1239# define FEAT_FOOTER
Bram Moolenaar071d4272004-06-13 20:20:40 +00001240#endif
Bram Moolenaar8dff8182006-04-06 20:18:50 +00001241
1242/*
1243 * +autochdir 'autochdir' option.
1244 */
Bram Moolenaarbb1969b2019-01-17 15:45:25 +01001245#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_BIG)
Bram Moolenaar8dff8182006-04-06 20:18:50 +00001246# define FEAT_AUTOCHDIR
1247#endif
Bram Moolenaar55debbe2010-05-23 23:34:36 +02001248
1249/*
1250 * +persistent_undo 'undofile', 'undodir' options, :wundo and :rundo, and
1251 * implementation.
1252 */
1253#ifdef FEAT_NORMAL
1254# define FEAT_PERSISTENT_UNDO
1255#endif
Bram Moolenaar68a33fc2012-04-25 16:50:48 +02001256
1257/*
1258 * +filterpipe
1259 */
1260#if (defined(UNIX) && !defined(USE_SYSTEM)) \
Bram Moolenaar4f974752019-02-17 17:44:42 +01001261 || (defined(MSWIN) && defined(FEAT_GUI_MSWIN))
Bram Moolenaar68a33fc2012-04-25 16:50:48 +02001262# define FEAT_FILTERPIPE
1263#endif
Bram Moolenaarcafafb32018-02-22 21:07:09 +01001264
1265/*
1266 * +vtp: Win32 virtual console.
1267 */
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001268#if (!defined(FEAT_GUI) || defined(VIMDLL)) && defined(MSWIN)
Bram Moolenaarcafafb32018-02-22 21:07:09 +01001269# define FEAT_VTP
1270#endif