blob: 50979f04c8ef6365530ae994d664de29e866bf9c [file] [log] [blame]
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +00001/* vi:set ts=8 sts=4 sw=4:
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.
38 * +huge all possible featues enabled.
39 *
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)
49/* #define FEAT_TINY */
50/* #define FEAT_SMALL */
51/* #define FEAT_NORMAL */
52/* #define FEAT_BIG */
53/* #define FEAT_HUGE */
54#endif
55
56/*
57 * These executables are made available with the +big feature, because they
58 * are supposed to have enough RAM: Win32 (console & GUI), dos32, OS/2 and VMS.
59 * The dos16 version has very little RAM available, use +small.
60 */
61#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
62 && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
63# if defined(MSWIN) || defined(DJGPP) || defined(OS2) || defined(VMS) || defined(MACOS) || defined(AMIGA)
64# define FEAT_BIG
65# else
66# ifdef MSDOS
67# define FEAT_SMALL
68# else
69# define FEAT_NORMAL
70# endif
71# endif
72#endif
73
74/*
75 * Each feature implies including the "smaller" ones.
76 */
77#ifdef FEAT_HUGE
78# define FEAT_BIG
79#endif
80#ifdef FEAT_BIG
81# define FEAT_NORMAL
82#endif
83#ifdef FEAT_NORMAL
84# define FEAT_SMALL
85#endif
86#ifdef FEAT_SMALL
87# define FEAT_TINY
88#endif
89
90/*
91 * Optional code (see ":help +feature-list")
92 * =============
93 */
94
95/*
96 * +windows Multiple windows. Without this there is no help
97 * window and no status lines.
98 */
99#ifdef FEAT_SMALL
100# define FEAT_WINDOWS
101#endif
102
103/*
104 * +listcmds Vim commands for the buffer list and the argument
105 * list. Without this there is no ":buffer" ":bnext",
106 * ":bdel", ":argdelete", etc.
107 */
108#ifdef FEAT_NORMAL
109# define FEAT_LISTCMDS
110#endif
111
112/*
113 * +vertsplit Vertically split windows.
114 */
115#ifdef FEAT_NORMAL
116# define FEAT_VERTSPLIT
117#endif
118#if defined(FEAT_VERTSPLIT) && !defined(FEAT_WINDOWS)
119# define FEAT_WINDOWS
120#endif
121
122/*
123 * +cmdhist Command line history.
124 */
125#ifdef FEAT_SMALL
126# define FEAT_CMDHIST
127#endif
128
129/*
Bram Moolenaar4770d092006-01-12 23:22:24 +0000130 * Message history is fixed at 100 message, 20 for the tiny version.
131 */
132#ifdef FEAT_SMALL
133# define MAX_MSG_HIST_LEN 100
134#else
135# define MAX_MSG_HIST_LEN 20
136#endif
137
138/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139 * +jumplist Jumplist, CTRL-O and CTRL-I commands.
140 */
141#ifdef FEAT_SMALL
142# define FEAT_JUMPLIST
143#endif
144
145/* the cmdline-window requires FEAT_VERTSPLIT and FEAT_CMDHIST */
146#if defined(FEAT_VERTSPLIT) && defined(FEAT_CMDHIST)
147# define FEAT_CMDWIN
148#endif
149
150/*
151 * +folding Fold lines.
152 */
153#ifdef FEAT_NORMAL
154# define FEAT_FOLDING
155#endif
156
157/*
158 * +digraphs Digraphs.
159 * In insert mode and on the command line you will be
160 * able to use digraphs. The CTRL-K command will work.
161 * Define OLD_DIGRAPHS to get digraphs compatible with
162 * Vim 5.x. The new ones are from RFC 1345.
163 */
164#ifdef FEAT_NORMAL
165# define FEAT_DIGRAPHS
166/* #define OLD_DIGRAPHS */
167#endif
168
169/*
170 * +langmap 'langmap' option. Only useful when you put your
171 * keyboard in a special language mode, e.g. for typing
172 * greek.
173 */
174#ifdef FEAT_BIG
175# define FEAT_LANGMAP
176#endif
177
178/*
179 * +keymap 'keymap' option. Allows you to map typed keys in
180 * Insert mode for a special language.
181 */
182#ifdef FEAT_BIG
183# define FEAT_KEYMAP
184#endif
185
186/*
187 * +localmap Mappings and abbreviations local to a buffer.
188 */
189#ifdef FEAT_NORMAL
190# define FEAT_LOCALMAP
191#endif
192
193/*
194 * +insert_expand CTRL-N/CTRL-P/CTRL-X in insert mode. Takes about
195 * 4Kbyte of code.
196 */
197#ifdef FEAT_NORMAL
198# define FEAT_INS_EXPAND
199#endif
200
201/*
202 * +cmdline_compl completion of mappings/abbreviations in cmdline mode.
203 * Takes a few Kbyte of code.
204 */
205#ifdef FEAT_NORMAL
206# define FEAT_CMDL_COMPL
207#endif
208
209#ifdef FEAT_NORMAL
210# define VIM_BACKTICK /* internal backtick expansion */
211#endif
212
213/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000214 * +visual Visual mode.
215 * +visualextra Extra features for Visual mode (mostly block operators).
216 */
217#ifdef FEAT_SMALL
218# define FEAT_VISUAL
219# ifdef FEAT_NORMAL
220# define FEAT_VISUALEXTRA
221# endif
222#else
223# ifdef FEAT_CLIPBOARD
224# undef FEAT_CLIPBOARD /* can't use clipboard without Visual mode */
225# endif
226#endif
227
228/*
229 * +virtualedit 'virtualedit' option and its implementation
230 */
231#ifdef FEAT_NORMAL
232# define FEAT_VIRTUALEDIT
233#endif
234
235/*
236 * +vreplace "gR" and "gr" commands.
237 */
238#ifdef FEAT_NORMAL
239# define FEAT_VREPLACE
240#endif
241
242/*
243 * +cmdline_info 'showcmd' and 'ruler' options.
244 */
245#ifdef FEAT_NORMAL
246# define FEAT_CMDL_INFO
247#endif
248
249/*
250 * +linebreak 'showbreak', 'breakat' and 'linebreak' options.
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000251 * Also 'numberwidth'.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000252 */
253#ifdef FEAT_NORMAL
254# define FEAT_LINEBREAK
255#endif
256
257/*
258 * +ex_extra ":retab", ":right", ":left", ":center", ":normal".
259 */
260#ifdef FEAT_NORMAL
261# define FEAT_EX_EXTRA
262#endif
263
264/*
265 * +extra_search 'hlsearch' and 'incsearch' options.
266 */
267#ifdef FEAT_NORMAL
268# define FEAT_SEARCH_EXTRA
269#endif
270
271/*
272 * +quickfix Quickfix commands.
273 */
274#ifdef FEAT_NORMAL
275# define FEAT_QUICKFIX
276#endif
277
278/*
279 * +file_in_path "gf" and "<cfile>" commands.
280 */
281#ifdef FEAT_NORMAL
282# define FEAT_SEARCHPATH
283#endif
284
285/*
286 * +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
287 */
288#ifdef FEAT_NORMAL
289# ifdef FEAT_SEARCHPATH /* FEAT_SEARCHPATH is required */
290# define FEAT_FIND_ID
291# endif
292#endif
293
294/*
295 * +path_extra up/downwards searching in 'path' and 'tags'.
296 */
297#ifdef FEAT_NORMAL
298# define FEAT_PATH_EXTRA
299#endif
300
301/*
302 * +rightleft Right-to-left editing/typing support.
303 */
304#ifdef FEAT_BIG
305# define FEAT_RIGHTLEFT
306#endif
307
308/*
309 * +farsi Farsi (Persian language) Keymap support.
310 * Requires FEAT_RIGHTLEFT.
311 */
312#ifdef FEAT_BIG
313# define FEAT_FKMAP
314#endif
315#ifdef FEAT_FKMAP
316# ifndef FEAT_RIGHTLEFT
317# define FEAT_RIGHTLEFT
318# endif
319#endif
320
321/*
322 * +arabic Arabic keymap and shaping support.
323 * Requires FEAT_RIGHTLEFT and FEAT_MBYTE.
324 */
325#if defined(FEAT_BIG) && !defined(WIN16) && SIZEOF_INT >= 4 && !defined(EBCDIC)
326# define FEAT_ARABIC
327#endif
328#ifdef FEAT_ARABIC
329# ifndef FEAT_RIGHTLEFT
330# define FEAT_RIGHTLEFT
331# endif
332#endif
333
334/*
335 * +emacs_tags When FEAT_EMACS_TAGS defined: Include support for
336 * emacs style TAGS file.
337 */
338#ifdef FEAT_BIG
339# define FEAT_EMACS_TAGS
340#endif
341
342/*
343 * +tag_binary Can use a binary search for the tags file.
344 *
345 * Disabled for EBCDIC:
346 * On OS/390 Unix we have the problem that /bin/sort sorts ASCII instead of
347 * EBCDIC. With this binary search doesn't work, as VIM expects a tag file
348 * sorted by character values. I'm not sure how to fix this. Should we really
349 * do a EBCDIC to ASCII conversion for this??
350 */
351#if defined(FEAT_NORMAL) && !defined(EBCDIC)
352# define FEAT_TAG_BINS
353#endif
354
355/*
356 * +tag_old_static Old style static tags: "file:tag file ..". Slows
357 * down tag searching a bit.
358 */
359#ifdef FEAT_NORMAL
360# define FEAT_TAG_OLDSTATIC
361#endif
362
363/*
364 * +tag_any_white Allow any white space to separate the fields in a tags
365 * file. When not defined, only a TAB is allowed.
366 */
367/* #define FEAT_TAG_ANYWHITE */
368
369/*
370 * +cscope Unix only: Cscope support.
371 */
372#if defined(UNIX) && defined(FEAT_BIG) && !defined(FEAT_CSCOPE) && !defined(MACOS_X)
373# define FEAT_CSCOPE
374#endif
375
376/*
377 * +eval Built-in script language and expression evaluation,
378 * ":let", ":if", etc.
379 */
380#ifdef FEAT_NORMAL
381# define FEAT_EVAL
382#endif
383
384/*
Bram Moolenaar05159a02005-02-26 23:04:13 +0000385 * +profile Profiling for functions and scripts.
386 */
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000387#if defined(FEAT_HUGE) \
Bram Moolenaar1e015462005-09-25 22:16:38 +0000388 && defined(FEAT_EVAL) \
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000389 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
390 || defined(WIN3264))
Bram Moolenaar05159a02005-02-26 23:04:13 +0000391# define FEAT_PROFILE
392#endif
393
394/*
Bram Moolenaar1e015462005-09-25 22:16:38 +0000395 * +textobjects Text objects: "vaw", "das", etc.
396 */
397#if defined(FEAT_NORMAL) && defined(FEAT_EVAL)
398# define FEAT_TEXTOBJ
399#endif
400
401/*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000402 * Insert mode completion with 'completefunc'.
403 */
404#if defined(FEAT_INS_EXPAND) && defined(FEAT_EVAL)
405# define FEAT_COMPL_FUNC
406#endif
407
408/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000409 * +user_commands Allow the user to define his own commands.
410 */
411#ifdef FEAT_NORMAL
412# define FEAT_USR_CMDS
413#endif
414
415/*
416 * +printer ":hardcopy" command
417 * +postscript Printing uses PostScript file output.
418 */
419#if defined(FEAT_NORMAL) && (defined(MSWIN) || defined(FEAT_EVAL)) \
420 && !defined(AMIGA)
421# define FEAT_PRINTER
422#endif
423#if defined(FEAT_PRINTER) && ((defined(MSWIN) && defined(MSWINPS)) \
424 || (!defined(MSWIN) && defined(FEAT_EVAL)))
425# define FEAT_POSTSCRIPT
426#endif
427
428/*
429 * +modify_fname modifiers for file name. E.g., "%:p:h".
430 */
431#ifdef FEAT_NORMAL
432# define FEAT_MODIFY_FNAME
433#endif
434
435/*
436 * +autocmd ":autocmd" command
437 */
438#ifdef FEAT_NORMAL
439# define FEAT_AUTOCMD
440#endif
441
442/*
443 * +diff Displaying diffs in a nice way.
444 * Requires +windows and +autocmd.
445 */
446#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) && defined(FEAT_AUTOCMD)
447# define FEAT_DIFF
448#endif
449
450/*
451 * +title 'title' and 'icon' options
452 * +statusline 'statusline', 'rulerformat' and special format of
453 * 'titlestring' and 'iconstring' options.
454 * +byte_offset '%o' in 'statusline' and builtin functions line2byte()
455 * and byte2line().
456 * Note: Required for Macintosh.
457 */
458#if defined(FEAT_NORMAL) && !defined(MSDOS)
459# define FEAT_TITLE
460#endif
461
462#ifdef FEAT_NORMAL
463# define FEAT_STL_OPT
464# ifndef FEAT_CMDL_INFO
465# define FEAT_CMDL_INFO /* 'ruler' is required for 'statusline' */
466# endif
467#endif
468
469#ifdef FEAT_NORMAL
470# define FEAT_BYTEOFF
471#endif
472
473/*
474 * +wildignore 'wildignore' and 'backupskip' options
475 * Needed for Unix to make "crontab -e" work.
476 */
477#if defined(FEAT_NORMAL) || defined(UNIX)
478# define FEAT_WILDIGN
479#endif
480
481/*
482 * +wildmenu 'wildmenu' option
483 */
484#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)
485# define FEAT_WILDMENU
486#endif
487
488/*
489 * +osfiletype filetype checking in autocommand patterns.
490 * Only on systems that support filetypes (RISC OS).
491 */
492#if 0
493# define FEAT_OSFILETYPE
494# define DFLT_OFT "Text"
495#endif
496
497/*
498 * +viminfo reading/writing the viminfo file. Takes about 8Kbyte
499 * of code.
500 * VIMINFO_FILE Location of user .viminfo file (should start with $).
501 * VIMINFO_FILE2 Location of alternate user .viminfo file.
502 */
503#ifdef FEAT_NORMAL
504# define FEAT_VIMINFO
505/* #define VIMINFO_FILE "$HOME/foo/.viminfo" */
506/* #define VIMINFO_FILE2 "~/bar/.viminfo" */
507#endif
508
509/*
510 * +syntax syntax highlighting. When using this, it's a good
511 * idea to have +autocmd and +eval too.
512 */
513#if defined(FEAT_NORMAL) || defined(PROTO)
514# define FEAT_SYN_HL
515#endif
516
517/*
Bram Moolenaar2b48ad52006-03-12 21:56:11 +0000518 * +spell spell checking
519 */
520#if defined(FEAT_NORMAL) || defined(PROTO)
521# define FEAT_SPELL
522#endif
523
524/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000525 * +builtin_terms Choose one out of the following four:
526 *
527 * NO_BUILTIN_TCAPS Do not include any builtin termcap entries (used only
528 * with HAVE_TGETENT defined).
529 *
530 * (nothing) Machine specific termcap entries will be included.
531 * This is default for win16 to save static data.
532 *
533 * SOME_BUILTIN_TCAPS Include most useful builtin termcap entries (used only
534 * with NO_BUILTIN_TCAPS not defined).
535 * This is the default.
536 *
537 * ALL_BUILTIN_TCAPS Include all builtin termcap entries
538 * (used only with NO_BUILTIN_TCAPS not defined).
539 */
540#ifdef HAVE_TGETENT
541/* #define NO_BUILTIN_TCAPS */
542#endif
543
544#if !defined(NO_BUILTIN_TCAPS) && !defined(FEAT_GUI_W16)
545# ifdef FEAT_BIG
546# define ALL_BUILTIN_TCAPS
547# else
548# define SOME_BUILTIN_TCAPS /* default */
549# endif
550#endif
551
552/*
553 * +lispindent lisp indenting (From Eric Fischer).
554 * +cindent C code indenting (From Eric Fischer).
555 * +smartindent smart C code indenting when the 'si' option is set.
556 *
557 * These two need to be defined when making prototypes.
558 */
559#if defined(FEAT_NORMAL) || defined(PROTO)
560# define FEAT_LISP
561#endif
562
563#if defined(FEAT_NORMAL) || defined(PROTO)
564# define FEAT_CINDENT
565#endif
566
567#ifdef FEAT_NORMAL
568# define FEAT_SMARTINDENT
569#endif
570
571/*
572 * +comments 'comments' option.
573 */
574#ifdef FEAT_NORMAL
575# define FEAT_COMMENTS
576#endif
577
578/*
579 * +cryptv Encryption (by Mohsin Ahmed <mosh@sasi.com>).
580 */
581#if defined(FEAT_NORMAL) || defined(PROTO)
582# define FEAT_CRYPT
583#endif
584
585/*
586 * +mksession ":mksession" command.
587 * Requires +windows and +vertsplit.
588 */
589#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) && defined(FEAT_VERTSPLIT)
590# define FEAT_SESSION
591#endif
592
593/*
594 * +multi_lang Multi language support. ":menutrans", ":language", etc.
595 * +gettext Message translations (requires +multi_lang)
596 * (only when "lang" archive unpacked)
597 */
598#ifdef FEAT_NORMAL
599# define FEAT_MULTI_LANG
600#endif
601#if defined(HAVE_GETTEXT) && defined(FEAT_MULTI_LANG) \
602 && (defined(HAVE_LOCALE_H) || defined(X_LOCALE))
603# define FEAT_GETTEXT
604#endif
605
606/*
607 * +multi_byte Generic multi-byte character handling. Doesn't work
608 * with 16 bit ints. Required for GTK+ 2.
609 *
610 * Disabled for EBCDIC:
611 * Multibyte support doesn't work on OS390 Unix currently.
612 */
613#if (defined(FEAT_BIG) || defined(HAVE_GTK2) || defined(FEAT_ARABIC)) \
614 && !defined(FEAT_MBYTE) && !defined(WIN16) \
615 && SIZEOF_INT >= 4 && !defined(EBCDIC)
616# define FEAT_MBYTE
617#endif
618
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000619/* Define this if you want to use 16 bit Unicode only, reduces memory used for
620 * the screen structures. */
621/* #define UNICODE16 */
622
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623/*
624 * +multi_byte_ime Win32 IME input method. Requires +multi_byte.
625 * Only for far-east Windows, so IME can be used to input
626 * chars. Not tested much!
627 */
628#if defined(FEAT_GUI_W32) && !defined(FEAT_MBYTE_IME)
629/* #define FEAT_MBYTE_IME */
630# endif
631
632#if defined(FEAT_MBYTE_IME) && !defined(FEAT_MBYTE)
633# define FEAT_MBYTE
634#endif
635
636#if defined(FEAT_MBYTE) && SIZEOF_INT < 4 && !defined(PROTO)
637 Error: Can only handle multi-byte feature with 32 bit int or larger
638#endif
639
640/* Use iconv() when it's available. */
641#if defined(FEAT_MBYTE) && ((defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) \
642 || defined(DYNAMIC_ICONV))
643# define USE_ICONV
644#endif
645
646/*
647 * +xim X Input Method. For entering special languages like
648 * chinese and Japanese.
649 * +hangul_input Internal Hangul input method. Must be included
650 * through configure: "--enable-hangulin"
651 * Both are for Unix and VMS only.
652 */
653#ifndef FEAT_XIM
654/* #define FEAT_XIM */
655#endif
656
657#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
658# define USE_XIM 1 /* needed for GTK include files */
659#endif
660
661#ifdef FEAT_HANGULIN
662# define HANGUL_DEFAULT_KEYBOARD 2 /* 2 or 3 bulsik keyboard */
663# define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed,
664 * turn to english mode
665 */
666# if !defined(FEAT_XFONTSET) && defined(HAVE_X11)
667# define FEAT_XFONTSET /* Hangul input requires xfontset */
668# endif
669# if defined(FEAT_XIM) && !defined(LINT)
670 Error: You should select only ONE of XIM and HANGUL INPUT
671# endif
672#endif
673#if defined(FEAT_HANGULIN) || defined(FEAT_XIM)
674/* # define X_LOCALE */ /* for OS with incomplete locale
675 support, like old linux versions. */
676/* # define SLOW_XSERVER */ /* for extremely slow X server */
677#endif
678
679/*
680 * +xfontset X fontset support. For outputting wide characters.
681 */
682#ifndef FEAT_XFONTSET
Bram Moolenaar9372a112005-12-06 19:59:18 +0000683# if defined(FEAT_MBYTE) && defined(HAVE_X11) && !defined(HAVE_GTK2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000684# define FEAT_XFONTSET
685# else
686/* # define FEAT_XFONTSET */
687# endif
688#endif
689
690/*
691 * +libcall libcall() function
692 */
693/* Using dlopen() also requires dlsym() to be available. */
694#if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM)
695# define USE_DLOPEN
696#endif
697#if defined(FEAT_EVAL) && (defined(WIN3264) || ((defined(UNIX) || defined(VMS)) \
698 && (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD))))
699# define FEAT_LIBCALL
700#endif
701
702/*
703 * +scrollbind synchronization of split windows
704 */
705#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)
706# define FEAT_SCROLLBIND
707#endif
708
709/*
710 * +menu ":menu" command
711 */
712#ifdef FEAT_NORMAL
713# define FEAT_MENU
714# ifdef FEAT_GUI_W32
715# define FEAT_TEAROFF
716# endif
717#endif
718
719/* There are two ways to use XPM. */
720#if (defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF)) \
721 || defined(HAVE_X11_XPM_H)
722# define HAVE_XPM 1
723#endif
724
725/*
726 * +toolbar Include code for a toolbar (for the Win32 GUI, GTK
727 * always has it). But only if menus are enabled.
728 */
729#if defined(FEAT_NORMAL) && defined(FEAT_MENU) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000730 && (defined(FEAT_GUI_GTK) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000731 || defined(FEAT_GUI_MSWIN) \
732 || ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
733 && defined(HAVE_XPM)) \
734 || defined(FEAT_GUI_PHOTON))
735# define FEAT_TOOLBAR
736#endif
Bram Moolenaar843ee412004-06-30 16:16:41 +0000737
738
Bram Moolenaar071d4272004-06-13 20:20:40 +0000739#if defined(FEAT_TOOLBAR) && !defined(FEAT_MENU)
740# define FEAT_MENU
741#endif
742
743/*
Bram Moolenaar32466aa2006-02-24 23:53:04 +0000744 * GUI tabline
745 */
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000746#if defined(FEAT_GUI_GTK) && defined(FEAT_WINDOWS)
Bram Moolenaar32466aa2006-02-24 23:53:04 +0000747# define FEAT_GUI_TABLINE
748#endif
749
750/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000751 * +browse ":browse" command.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000752 */
Bram Moolenaar9372a112005-12-06 19:59:18 +0000753#if defined(FEAT_NORMAL) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754# define FEAT_BROWSE
755#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000756
757/*
758 * +dialog_gui Use GUI dialog.
759 * +dialog_con May use Console dialog.
760 * When none of these defined there is no dialog support.
761 */
762#ifdef FEAT_NORMAL
763# if ((defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) \
764 && defined(HAVE_X11_XPM_H)) \
765 || defined(FEAT_GUI_GTK) \
766 || defined(FEAT_GUI_PHOTON) \
767 || defined(FEAT_GUI_MSWIN) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000768 || defined(FEAT_GUI_MAC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000769# define FEAT_CON_DIALOG
770# define FEAT_GUI_DIALOG
771# else
772# define FEAT_CON_DIALOG
773# endif
774#endif
775#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000776 || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000777/* need a dialog to show error messages when starting from the desktop */
778# define FEAT_GUI_DIALOG
779#endif
780#if defined(FEAT_GUI_DIALOG) && \
781 (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
Bram Moolenaar9372a112005-12-06 19:59:18 +0000782 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000783 || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
784# define FEAT_GUI_TEXTDIALOG
785#endif
786
787/* Mac specific thing: Codewarrior interface. */
788#ifdef FEAT_GUI_MAC
789# define FEAT_CW_EDITOR
790#endif
791
792/*
793 * Preferences:
794 * ============
795 */
796
797/*
798 * +writebackup 'writebackup' is default on:
799 * Use a backup file while overwriting a file. But it's
800 * deleted again when 'backup' is not set. Changing this
801 * is strongly discouraged: You can loose all your
802 * changes when the computer crashes while writing the
803 * file.
804 * VMS note: It does work on VMS as well, but because of
805 * version handling it does not have any purpose.
806 * Overwrite will write to the new version.
807 */
808#ifndef VMS
809# define FEAT_WRITEBACKUP
810#endif
811
812/*
813 * +xterm_save The t_ti and t_te entries for the builtin xterm will
814 * be set to save the screen when starting Vim and
815 * restoring it when exiting.
816 */
817/* #define FEAT_XTERM_SAVE */
818
819/*
820 * DEBUG Output a lot of debugging garbage.
821 */
822/* #define DEBUG */
823
824/*
825 * STARTUPTIME Time the startup process. Writes a "vimstartup" file
826 * with timestamps.
827 */
828/* #define STARTUPTIME "vimstartup" */
829
830/*
831 * MEM_PROFILE Debugging of memory allocation and freeing.
832 */
833/* #define MEM_PROFILE */
834
835/*
836 * VIMRC_FILE Name of the .vimrc file in current dir.
837 */
838/* #define VIMRC_FILE ".vimrc" */
839
840/*
841 * EXRC_FILE Name of the .exrc file in current dir.
842 */
843/* #define EXRC_FILE ".exrc" */
844
845/*
846 * GVIMRC_FILE Name of the .gvimrc file in current dir.
847 */
848/* #define GVIMRC_FILE ".gvimrc" */
849
850/*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000851 * SESSION_FILE Name of the default ":mksession" file.
852 */
853#define SESSION_FILE "Session.vim"
854
855/*
856 * USR_VIMRC_FILE Name of the user .vimrc file.
857 * USR_VIMRC_FILE2 Name of alternate user .vimrc file.
858 * USR_VIMRC_FILE3 Name of alternate user .vimrc file.
859 */
860/* #define USR_VIMRC_FILE "~/foo/.vimrc" */
861/* #define USR_VIMRC_FILE2 "~/bar/.vimrc" */
862/* #define USR_VIMRC_FILE3 "$VIM/.vimrc" */
863
864/*
865 * EVIM_FILE Name of the evim.vim script file
866 */
867/* #define EVIM_FILE "$VIMRUNTIME/evim.vim" */
868
869/*
870 * USR_EXRC_FILE Name of the user .exrc file.
871 * USR_EXRC_FILE2 Name of the alternate user .exrc file.
872 */
873/* #define USR_EXRC_FILE "~/foo/.exrc" */
874/* #define USR_EXRC_FILE2 "~/bar/.exrc" */
875
876/*
877 * USR_GVIMRC_FILE Name of the user .gvimrc file.
878 * USR_GVIMRC_FILE2 Name of the alternate user .gvimrc file.
879 */
880/* #define USR_GVIMRC_FILE "~/foo/.gvimrc" */
881/* #define USR_GVIMRC_FILE2 "~/bar/.gvimrc" */
882/* #define USR_GVIMRC_FILE3 "$VIM/.gvimrc" */
883
884/*
885 * SYS_VIMRC_FILE Name of the system-wide .vimrc file.
886 */
887/* #define SYS_VIMRC_FILE "/etc/vimrc" */
888
889/*
890 * SYS_GVIMRC_FILE Name of the system-wide .gvimrc file.
891 */
892/* #define SYS_GVIMRC_FILE "/etc/gvimrc" */
893
894/*
895 * DFLT_HELPFILE Name of the help file.
896 */
897/* # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt.gz" */
898
899/*
900 * File names for:
901 * FILETYPE_FILE switch on file type detection
902 * FTPLUGIN_FILE switch on loading filetype plugin files
903 * INDENT_FILE switch on loading indent files
904 * FTOFF_FILE switch off file type detection
905 * FTPLUGOF_FILE switch off loading settings files
906 * INDOFF_FILE switch off loading indent files
907 */
908/* # define FILETYPE_FILE "filetype.vim" */
909/* # define FTPLUGIN_FILE "ftplugin.vim" */
910/* # define INDENT_FILE "indent.vim" */
911/* # define FTOFF_FILE "ftoff.vim" */
912/* # define FTPLUGOF_FILE "ftplugof.vim" */
913/* # define INDOFF_FILE "indoff.vim" */
914
915/*
916 * SYS_MENU_FILE Name of the default menu.vim file.
917 */
918/* # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" */
919
920/*
921 * SYS_OPTWIN_FILE Name of the default optwin.vim file.
922 */
923#ifndef SYS_OPTWIN_FILE
924# define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
925#endif
926
927/*
928 * SYNTAX_FNAME Name of a syntax file, where %s is the syntax name.
929 */
930/* #define SYNTAX_FNAME "/foo/%s.vim" */
931
932/*
933 * RUNTIME_DIRNAME Generic name for the directory of the runtime files.
934 */
935#ifndef RUNTIME_DIRNAME
936# define RUNTIME_DIRNAME "runtime"
937#endif
938
939/*
940 * RUNTIME_GLOBAL Directory name for global Vim runtime directory.
941 * Don't define this if the preprocessor can't handle
942 * string concatenation.
943 * Also set by "--with-global-runtime" configure argument.
944 */
945/* #define RUNTIME_GLOBAL "/etc/vim" */
946
947/*
948 * MODIFIED_BY Name of who modified Vim. Required when distributing
949 * a modifed version of Vim.
950 * Also from the "--with-modified-by" configure argument.
951 */
952/* #define MODIFIED_BY "John Doe" */
953
954/*
955 * Machine dependent:
956 * ==================
957 */
958
959/*
960 * +fork Unix only: fork() support (detected by configure)
961 * +system Use system() instead of fork/exec for starting a
962 * shell. Doesn't work for the GUI!
963 */
964/* #define USE_SYSTEM */
965
966/*
967 * +X11 Unix only. Include code for xterm title saving and X
968 * clipboard. Only works if HAVE_X11 is also defined.
969 */
Bram Moolenaar843ee412004-06-30 16:16:41 +0000970#if (defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971# define WANT_X11
972#endif
973
974/*
975 * XSMP - X11 Session Management Protocol
976 * It may be preferred to disable this if the GUI supports it (e.g.,
977 * GNOME/KDE) and implement save-yourself etc. through that, but it may also
978 * be cleaner to have all SM-aware vims do the same thing (libSM does not
979 * depend upon X11).
980 * If your GUI wants to support SM itself, change this ifdef.
981 * I'm assuming that any X11 implementation will cope with this for now.
982 */
983#if defined(HAVE_X11) && defined(WANT_X11) && defined(HAVE_X11_SM_SMLIB_H)
984# define USE_XSMP
985#endif
986#if defined(USE_XSMP_INTERACT) && !defined(USE_XSMP)
987# undef USE_XSMP_INTERACT
988#endif
989
990/*
991 * +mouse_xterm Unix only: Include code for xterm mouse handling.
992 * +mouse_dec idem, for Dec mouse handling.
993 * +mouse_jsbterm idem, for Jsbterm mouse handling.
994 * +mouse_netterm idem, for Netterm mouse handling.
995 * (none) MS-DOS mouse support.
996 * +mouse_gpm Unix only: Include code for Linux console mouse
997 * handling.
998 * +mouse_pterm PTerm mouse support for QNX
999 * +mouse Any mouse support (any of the above enabled).
1000 */
1001/* OS/2 and Amiga console have no mouse support */
Bram Moolenaar5b962cf2005-12-12 21:58:40 +00001002#if !defined(AMIGA) && !defined(OS2)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001003# ifdef FEAT_NORMAL
1004# define FEAT_MOUSE_XTERM
1005# endif
1006# ifdef FEAT_BIG
1007# define FEAT_MOUSE_NET
1008# endif
1009# ifdef FEAT_BIG
1010# define FEAT_MOUSE_DEC
1011# endif
1012# if defined(FEAT_NORMAL) && (defined(MSDOS) || defined(WIN3264))
1013# define DOS_MOUSE
1014# endif
1015# if defined(FEAT_NORMAL) && defined(__QNX__)
1016# define FEAT_MOUSE_PTERM
1017# endif
1018#endif
1019
1020#if defined(FEAT_NORMAL) && defined(HAVE_GPM)
1021# define FEAT_MOUSE_GPM
1022#endif
1023/* Define FEAT_MOUSE when any of the above is defined or FEAT_GUI. */
1024#if !defined(FEAT_MOUSE_TTY) && (defined(FEAT_MOUSE_XTERM) \
1025 || defined(FEAT_MOUSE_NET) || defined(FEAT_MOUSE_DEC) \
1026 || defined(DOS_MOUSE) || defined(FEAT_MOUSE_GPM) \
1027 || defined(FEAT_MOUSE_JSB) || defined(FEAT_MOUSE_PTERM))
1028# define FEAT_MOUSE_TTY /* include non-GUI mouse support */
1029#endif
1030#if !defined(FEAT_MOUSE) && (defined(FEAT_MOUSE_TTY) || defined(FEAT_GUI))
1031# define FEAT_MOUSE /* include generic mouse support */
1032#endif
1033
1034/*
1035 * +clipboard Clipboard support. Always used for the GUI.
1036 * +xterm_clipboard Unix only: Include code for handling the clipboard
1037 * in an xterm like in the GUI.
1038 */
1039#ifdef FEAT_GUI
1040# ifndef FEAT_CLIPBOARD
1041# define FEAT_CLIPBOARD
1042# ifndef FEAT_VISUAL
1043# define FEAT_VISUAL
1044# endif
1045# endif
1046#endif
1047
1048#if defined(FEAT_NORMAL) && defined(FEAT_VISUAL) \
1049 && (defined(UNIX) || defined(VMS)) \
1050 && defined(WANT_X11) && defined(HAVE_X11)
1051# define FEAT_XCLIPBOARD
1052# ifndef FEAT_CLIPBOARD
1053# define FEAT_CLIPBOARD
1054# endif
1055#endif
1056
1057/*
1058 * +dnd Drag'n'drop support. Always used for the GTK+ GUI.
1059 */
1060#if defined(FEAT_CLIPBOARD) && defined(FEAT_GUI_GTK)
1061# define FEAT_DND
1062#endif
1063
1064#if defined(FEAT_GUI_MSWIN) && defined(FEAT_SMALL)
1065# define MSWIN_FIND_REPLACE /* include code for find/replace dialog */
1066# define MSWIN_FR_BUFSIZE 256
1067#endif
1068
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00001069#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +00001070 || defined(MSWIN_FIND_REPLACE)
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00001071# define FIND_REPLACE_DIALOG 1
1072#endif
1073
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074/*
1075 * +clientserver Remote control via the remote_send() function
1076 * and the --remote argument
1077 */
1078#if (defined(WIN32) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL)
1079# define FEAT_CLIENTSERVER
1080#endif
1081
1082/*
1083 * +termresponse send t_RV to obtain terminal response. Used for xterm
1084 * to check if mouse dragging can be used and if term
1085 * codes can be obtaind.
1086 */
1087#if (defined(FEAT_NORMAL) || defined(FEAT_MOUSE)) && defined(HAVE_TGETENT)
1088# define FEAT_TERMRESPONSE
1089#endif
1090
1091/*
1092 * cursor shape Adjust the shape of the cursor to the mode.
1093 * mouse shape Adjust the shape of the mouse pointer to the mode.
1094 */
1095#ifdef FEAT_NORMAL
1096/* MS-DOS console and Win32 console can change cursor shape */
1097# if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32))
1098# define MCH_CURSOR_SHAPE
1099# endif
1100# if defined(FEAT_GUI_W32) || defined(FEAT_GUI_W16) || defined(FEAT_GUI_MOTIF) \
Bram Moolenaar9372a112005-12-06 19:59:18 +00001101 || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102 || defined(FEAT_GUI_PHOTON)
1103# define FEAT_MOUSESHAPE
1104# endif
1105#endif
1106
1107/* GUI and some consoles can change the shape of the cursor. The code is also
1108 * needed for the 'mouseshape' option. */
Bram Moolenaarac6e65f2005-08-29 22:25:38 +00001109#if defined(FEAT_GUI) || defined(MCH_CURSOR_SHAPE) || defined(FEAT_MOUSESHAPE) \
1110 || (defined(UNIX) && defined(FEAT_NORMAL))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001111# define CURSOR_SHAPE
1112#endif
1113
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001114#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_GTK) \
1115 || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
Bram Moolenaar9372a112005-12-06 19:59:18 +00001116 || defined(FEAT_GUI_MAC))
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001117# define MZSCHEME_GUI_THREADS
1118#endif
1119
Bram Moolenaar071d4272004-06-13 20:20:40 +00001120/*
1121 * +ARP Amiga only. Use arp.library, DOS 2.0 is not required.
1122 */
1123#ifndef NO_ARP
1124# define FEAT_ARP
1125#endif
1126
1127/*
1128 * +GUI_Athena To compile Vim with or without the GUI (gvim) you have
Bram Moolenaarbc045ea2005-06-05 22:01:26 +00001129 * +GUI_Motif to edit the Makefile.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001130 */
1131
1132/*
1133 * +ole Win32 OLE automation: Use Makefile.ovc.
1134 */
1135
1136/*
1137 * These features can only be included by using a configure argument. See the
1138 * Makefile for a line to uncomment.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001139 * +mzscheme MzScheme interface: "--enable-mzscheme"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001140 * +perl Perl interface: "--enable-perlinterp"
1141 * +python Python interface: "--enable-pythoninterp"
1142 * +tcl TCL interface: "--enable-tclinterp"
1143 * +sniff Sniff interface: "--enable-sniff"
1144 * +sun_workshop Sun Workshop integegration
1145 * +netbeans_intg Netbeans integration
1146 */
1147
1148/*
1149 * These features are automatically detected:
1150 * +terminfo
1151 * +tgetent
1152 */
1153
1154/*
1155 * The Sun Workshop features currently only work with Motif.
1156 */
1157#if !defined(FEAT_GUI_MOTIF) && defined(FEAT_SUN_WORKSHOP)
1158# undef FEAT_SUN_WORKSHOP
1159#endif
1160
1161/*
1162 * The Netbeans features currently only work with Motif and GTK and Win32.
1163 * It also requires +listcmds and +eval.
1164 */
1165#if ((!defined(FEAT_GUI_MOTIF) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
1166 || !defined(FEAT_LISTCMDS) || !defined(FEAT_EVAL)) \
1167 && defined(FEAT_NETBEANS_INTG)
1168# undef FEAT_NETBEANS_INTG
1169#endif
1170
1171/*
1172 * +signs Allow signs to be displayed to the left of text lines.
1173 * Adds the ":sign" command.
1174 */
1175#if defined(FEAT_BIG) || defined(FEAT_SUN_WORKSHOP) \
1176 || defined(FEAT_NETBEANS_INTG)
1177# define FEAT_SIGNS
1178# if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
1179 && defined(HAVE_X11_XPM_H)) \
1180 || defined(FEAT_GUI_GTK) \
1181 || (defined(WIN32) && defined(FEAT_GUI))
1182# define FEAT_SIGN_ICONS
1183# endif
1184#endif
1185
1186/*
1187 * +balloon_eval Allow balloon expression evaluation. Used with a
1188 * debugger and for tooltips.
1189 * Only for GUIs where it was implemented.
1190 */
1191#if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
1192 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) \
1193 && ( (defined(FEAT_TOOLBAR) \
1194 && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
1195 || defined(FEAT_SUN_WORKSHOP) \
Bram Moolenaar44ecf652005-03-07 23:09:59 +00001196 || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001197# define FEAT_BEVAL
1198# if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
Bram Moolenaar9372a112005-12-06 19:59:18 +00001199 && !defined(FEAT_GUI_W32)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001200# define FEAT_XFONTSET
1201# endif
1202#endif
1203
1204#if defined(FEAT_BEVAL) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
1205# define FEAT_BEVAL_TIP /* balloon eval used for toolbar tooltip */
1206#endif
1207
Bram Moolenaara23ccb82006-02-27 00:08:02 +00001208/* both Motif and Athena are X11 and share some code */
1209#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
1210# define FEAT_GUI_X11
1211#endif
1212
Bram Moolenaar071d4272004-06-13 20:20:40 +00001213#if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
1214/*
1215 * The following features are (currently) only used by Sun Visual WorkShop 6
1216 * and NetBeans. These features could be used with other integrations with
1217 * debuggers so I've used separate feature defines.
1218 */
1219# if !defined(FEAT_MENU)
1220# define FEAT_MENU
1221# endif
1222#endif
1223
1224#if defined(FEAT_SUN_WORKSHOP)
1225/*
1226 * Use an alternative method of X input for a secondary
1227 * command input.
1228 */
1229# define ALT_X_INPUT
1230
1231/*
1232 * +footer Motif only: Add a message area at the bottom of the
1233 * main window area.
1234 */
1235# define FEAT_FOOTER
1236
1237#endif