1 /* vi:set ts=8 sts=4 sw=4 noet: 2 * 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 features 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 * For Unix, Mac and Win32 use +huge by default. These days CPUs are fast and 58 * Memory is cheap. 59 * Use +big for older systems: Other MS-Windows and VMS. 60 * Otherwise use +normal 61 */ 62 #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \ 63 && !defined(FEAT_BIG) && !defined(FEAT_HUGE) 64 # if defined(UNIX) || defined(MSWIN) || defined(MACOS_X) 65 # define FEAT_HUGE 66 # else 67 # if defined(MSWIN) || defined(VMS) || defined(AMIGA) 68 # define FEAT_BIG 69 # else 70 # define FEAT_NORMAL 71 # 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 /* 97 * These features used to be optional but are now always enabled: 98 * +windows Multiple windows. Without this there is no help 99 * window and no status lines. 100 * +vertsplit Vertically split windows. 101 * +cmdhist Command line history. 102 * +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. 108 * +cmdline_compl completion of mappings/abbreviations in cmdline mode. 109 * +insert_expand CTRL-N/CTRL-P/CTRL-X in insert mode. 110 * +modify_fname modifiers for file name. E.g., "%:p:h". 111 * +comments 'comments' option. 112 * +title 'title' and 'icon' options 113 * 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 119 */ 120 121 /* 122 * Message history is fixed at 200 message, 20 for the tiny version. 123 */ 124 #ifdef FEAT_SMALL 125 # define MAX_MSG_HIST_LEN 200 126 #else 127 # define MAX_MSG_HIST_LEN 20 128 #endif 129 130 /* 131 * +jumplist Jumplist, CTRL-O and CTRL-I commands. 132 */ 133 #ifdef FEAT_SMALL 134 # define FEAT_JUMPLIST 135 #endif 136 137 #if defined(FEAT_SMALL) 138 # 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 157 // #define OLD_DIGRAPHS 158 #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 177 #ifdef FEAT_NORMAL 178 # define VIM_BACKTICK // internal backtick expansion 179 #endif 180 181 /* 182 * +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. 190 * Also 'numberwidth'. 191 */ 192 #ifdef FEAT_NORMAL 193 # define FEAT_LINEBREAK 194 #endif 195 196 /* 197 * +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 221 # ifdef FEAT_SEARCHPATH // FEAT_SEARCHPATH is required 222 # 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. 235 * 236 * Disabled for EBCDIC as it requires multibyte. 237 */ 238 #if defined(FEAT_BIG) && !defined(DISABLE_RIGHTLEFT) && !defined(EBCDIC) 239 # define FEAT_RIGHTLEFT 240 #endif 241 242 /* 243 * +arabic Arabic keymap and shaping support. 244 * Requires FEAT_RIGHTLEFT 245 * 246 * Disabled for EBCDIC as it requires multibyte. 247 */ 248 #if defined(FEAT_BIG) && !defined(DISABLE_ARABIC) && !defined(EBCDIC) 249 # 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: 269 * On z/OS Unix we have the problem that /bin/sort sorts ASCII instead of 270 * 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 */ 274 #if !defined(EBCDIC) 275 # define FEAT_TAG_BINS 276 #endif 277 278 /* 279 * +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. 288 * +float Floating point variables. 289 */ 290 #ifdef FEAT_NORMAL 291 # define FEAT_EVAL 292 # if defined(HAVE_FLOAT_FUNCS) || defined(MSWIN) || defined(MACOS_X) 293 # define FEAT_FLOAT 294 # endif 295 #endif 296 297 #ifdef FEAT_EVAL 298 # define HAVE_SANDBOX 299 #endif 300 301 /* 302 * +profile Profiling for functions and scripts. 303 */ 304 #if defined(FEAT_HUGE) \ 305 && defined(FEAT_EVAL) \ 306 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \ 307 || defined(MSWIN)) 308 # define FEAT_PROFILE 309 #endif 310 311 /* 312 * +reltime reltime() function 313 */ 314 #if defined(FEAT_NORMAL) \ 315 && defined(FEAT_EVAL) \ 316 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \ 317 || defined(MSWIN)) 318 # define FEAT_RELTIME 319 #endif 320 321 /* 322 * +timers timer_start() 323 */ 324 #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(MSWIN) || defined(VMS) ) 325 # define FEAT_TIMERS 326 #endif 327 328 /* 329 * +textobjects Text objects: "vaw", "das", etc. 330 */ 331 #if defined(FEAT_NORMAL) && defined(FEAT_EVAL) 332 # define FEAT_TEXTOBJ 333 #endif 334 335 /* 336 * Insert mode completion with 'completefunc'. 337 */ 338 #if defined(FEAT_EVAL) 339 # define FEAT_COMPL_FUNC 340 #endif 341 342 /* 343 * +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 /* 356 * +diff Displaying diffs in a nice way. 357 * Requires +windows and +autocmd. 358 */ 359 #if defined(FEAT_NORMAL) 360 # define FEAT_DIFF 361 #endif 362 363 /* 364 * +statusline 'statusline', 'rulerformat' and special format of 365 * 'titlestring' and 'iconstring' options. 366 */ 367 #ifdef FEAT_NORMAL 368 # define FEAT_STL_OPT 369 # ifndef FEAT_CMDL_INFO 370 # define FEAT_CMDL_INFO // 'ruler' is required for 'statusline' 371 # endif 372 #endif 373 374 /* 375 * +byte_offset '%o' in 'statusline' and builtin functions line2byte() 376 * and byte2line(). 377 * Note: Required for Macintosh. 378 */ 379 #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 */ 394 #if defined(FEAT_NORMAL) 395 # define FEAT_WILDMENU 396 #endif 397 398 /* 399 * +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 406 // #define VIMINFO_FILE "$HOME/foo/.viminfo" 407 // #define VIMINFO_FILE2 "~/bar/.viminfo" 408 #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 /* 419 * +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 /* 427 * +spell spell checking 428 * 429 * Disabled for EBCDIC: * Doesn't work (SIGSEGV). 430 */ 431 #if (defined(FEAT_NORMAL) || defined(PROTO)) && !defined(EBCDIC) 432 # define FEAT_SPELL 433 #endif 434 435 /* 436 * +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. 442 * 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 451 // #define NO_BUILTIN_TCAPS 452 #endif 453 454 #if !defined(NO_BUILTIN_TCAPS) 455 # ifdef FEAT_BIG 456 # define ALL_BUILTIN_TCAPS 457 # else 458 # define SOME_BUILTIN_TCAPS // default 459 # 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 /* 482 * +cryptv Encryption (by Mohsin Ahmed <mosh@sasi.com>). 483 */ 484 #if defined(FEAT_NORMAL) && !defined(FEAT_CRYPT) || defined(PROTO) 485 # define FEAT_CRYPT 486 #endif 487 488 /* 489 * +mksession ":mksession" command. 490 * fully depends on +eval 491 */ 492 #if defined(FEAT_EVAL) 493 # 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 /* 510 * +multi_byte_ime Win32 IME input method. Only for far-east Windows, so 511 * IME can be used to input chars. Not tested much! 512 */ 513 #if defined(FEAT_GUI_MSWIN) && !defined(FEAT_MBYTE_IME) 514 // #define FEAT_MBYTE_IME 515 #endif 516 517 #if defined(FEAT_BIG) && defined(FEAT_GUI_HAIKU) && !defined(FEAT_MBYTE_IME) 518 # define FEAT_MBYTE_IME 519 #endif 520 521 // Use iconv() when it's available. 522 #if (defined(HAVE_ICONV_H) && defined(HAVE_ICONV)) || defined(DYNAMIC_ICONV) 523 # define USE_ICONV 524 #endif 525 526 /* 527 * +xim X Input Method. For entering special languages like 528 * chinese and Japanese. 529 * this is for Unix and VMS only. 530 */ 531 #ifndef FEAT_XIM 532 // #define FEAT_XIM 533 #endif 534 535 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) 536 # define USE_XIM 1 // needed for GTK include files 537 #endif 538 539 #if defined(FEAT_XIM) 540 // # define X_LOCALE // for OS with incomplete locale 541 // support, like old linux versions. 542 #endif 543 544 /* 545 * +xfontset X fontset support. For outputting wide characters. 546 */ 547 #ifndef FEAT_XFONTSET 548 # if defined(HAVE_X11) && !defined(FEAT_GUI_GTK) 549 # define FEAT_XFONTSET 550 # else 551 // # define FEAT_XFONTSET 552 # endif 553 #endif 554 555 /* 556 * +libcall libcall() function 557 */ 558 // Using dlopen() also requires dlsym() to be available. 559 #if defined(HAVE_DLOPEN) && defined(HAVE_DLSYM) 560 # define USE_DLOPEN 561 #endif 562 #if defined(FEAT_EVAL) && (defined(MSWIN) || ((defined(UNIX) || defined(VMS)) \ 563 && (defined(USE_DLOPEN) || defined(HAVE_SHL_LOAD)))) 564 # define FEAT_LIBCALL 565 #endif 566 567 /* 568 * +menu ":menu" command 569 */ 570 #ifdef FEAT_NORMAL 571 # define FEAT_MENU 572 # ifdef FEAT_GUI_MSWIN 573 # define FEAT_TEAROFF 574 # endif 575 #endif 576 577 /* 578 * popup menu in a terminal 579 */ 580 #if defined(FEAT_MENU) && !defined(ALWAYS_USE_GUI) 581 # define FEAT_TERM_POPUP_MENU 582 #endif 583 584 /* 585 * sound - currently only with libcanberra 586 */ 587 #if !defined(FEAT_SOUND) && defined(HAVE_CANBERRA) 588 # define FEAT_SOUND 589 #endif 590 #if defined(FEAT_SOUND) && defined(HAVE_CANBERRA) 591 # define FEAT_SOUND_CANBERRA 592 #endif 593 594 /* 595 * libsodium - add cryptography support 596 */ 597 #if defined(HAVE_SODIUM) && defined(FEAT_BIG) 598 # define FEAT_SODIUM 599 #endif 600 601 // There are two ways to use XPM. 602 #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) \ 612 && (defined(FEAT_GUI_GTK) \ 613 || defined(FEAT_GUI_MSWIN) \ 614 || ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \ 615 && defined(HAVE_XPM)) \ 616 || defined(FEAT_GUI_PHOTON) \ 617 || defined(FEAT_GUI_HAIKU)) 618 619 # define FEAT_TOOLBAR 620 #endif 621 622 623 #if defined(FEAT_TOOLBAR) && !defined(FEAT_MENU) 624 # define FEAT_MENU 625 #endif 626 627 /* 628 * GUI dark theme variant 629 */ 630 #if defined(FEAT_GUI_GTK) && defined(USE_GTK3) 631 # define FEAT_GUI_DARKTHEME 632 #endif 633 634 /* 635 * GUI tabline 636 */ 637 #if defined(FEAT_NORMAL) \ 638 && (defined(FEAT_GUI_GTK) \ 639 || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \ 640 || defined(FEAT_GUI_HAIKU) \ 641 || (defined(FEAT_GUI_MSWIN) \ 642 && (!defined(_MSC_VER) || _MSC_VER > 1020))) 643 # define FEAT_GUI_TABLINE 644 #endif 645 646 /* 647 * +browse ":browse" command. 648 * or just the ":browse" command modifier 649 */ 650 #if defined(FEAT_NORMAL) 651 # define FEAT_BROWSE_CMD 652 # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ 653 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON) 654 # define FEAT_BROWSE 655 # endif 656 #endif 657 658 /* 659 * 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 */ 663 #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL) 664 # define ALWAYS_USE_GUI 665 #endif 666 667 /* 668 * +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) \ 677 || defined(FEAT_GUI_HAIKU) \ 678 || defined(FEAT_GUI_MSWIN) 679 # 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) \ 686 || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \ 687 || defined(FEAT_GUI_MSWIN)) 688 // need a dialog to show error messages when starting from the desktop 689 # define FEAT_GUI_DIALOG 690 #endif 691 #if defined(FEAT_GUI_DIALOG) && \ 692 (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ 693 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \ 694 || defined(FEAT_GUI_PHOTON) \ 695 || defined(FEAT_GUI_HAIKU)) 696 # define FEAT_GUI_TEXTDIALOG 697 # ifndef ALWAYS_USE_GUI 698 # define FEAT_CON_DIALOG 699 # endif 700 #endif 701 702 /* 703 * +termguicolors 'termguicolors' option. 704 */ 705 #if (defined(FEAT_BIG) && defined(FEAT_SYN_HL)) && !defined(ALWAYS_USE_GUI) 706 # define FEAT_TERMGUICOLORS 707 #endif 708 709 /* 710 * +vartabs 'vartabstop' and 'varsofttabstop' options. 711 */ 712 #ifdef FEAT_BIG 713 # define FEAT_VARTABS 714 #endif 715 716 /* 717 * 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 725 * is strongly discouraged: You can lose all your 726 * 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 */ 741 // #define FEAT_XTERM_SAVE 742 743 /* 744 * DEBUG Output a lot of debugging garbage. 745 */ 746 // #define DEBUG 747 748 /* 749 * STARTUPTIME Time the startup process. Writes a file with 750 * timestamps. 751 */ 752 #if defined(FEAT_NORMAL) \ 753 && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \ 754 || defined(MSWIN)) 755 # define STARTUPTIME 1 756 #endif 757 758 /* 759 * MEM_PROFILE Debugging of memory allocation and freeing. 760 */ 761 // #define MEM_PROFILE 762 763 /* 764 * VIMRC_FILE Name of the .vimrc file in current dir. 765 */ 766 // #define VIMRC_FILE ".vimrc" 767 768 /* 769 * EXRC_FILE Name of the .exrc file in current dir. 770 */ 771 // #define EXRC_FILE ".exrc" 772 773 /* 774 * GVIMRC_FILE Name of the .gvimrc file in current dir. 775 */ 776 // #define GVIMRC_FILE ".gvimrc" 777 778 /* 779 * 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 */ 788 // #define USR_VIMRC_FILE "~/foo/.vimrc" 789 // #define USR_VIMRC_FILE2 "~/bar/.vimrc" 790 // #define USR_VIMRC_FILE3 "$VIM/.vimrc" 791 792 /* 793 * VIM_DEFAULTS_FILE Name of the defaults.vim script file 794 */ 795 // #define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim" 796 797 /* 798 * EVIM_FILE Name of the evim.vim script file 799 */ 800 // #define EVIM_FILE "$VIMRUNTIME/evim.vim" 801 802 /* 803 * USR_EXRC_FILE Name of the user .exrc file. 804 * USR_EXRC_FILE2 Name of the alternate user .exrc file. 805 */ 806 // #define USR_EXRC_FILE "~/foo/.exrc" 807 // #define USR_EXRC_FILE2 "~/bar/.exrc" 808 809 /* 810 * USR_GVIMRC_FILE Name of the user .gvimrc file. 811 * USR_GVIMRC_FILE2 Name of the alternate user .gvimrc file. 812 */ 813 // #define USR_GVIMRC_FILE "~/foo/.gvimrc" 814 // #define USR_GVIMRC_FILE2 "~/bar/.gvimrc" 815 // #define USR_GVIMRC_FILE3 "$VIM/.gvimrc" 816 817 /* 818 * SYS_VIMRC_FILE Name of the system-wide .vimrc file. 819 */ 820 // #define SYS_VIMRC_FILE "/etc/vimrc" 821 822 /* 823 * SYS_GVIMRC_FILE Name of the system-wide .gvimrc file. 824 */ 825 // #define SYS_GVIMRC_FILE "/etc/gvimrc" 826 827 /* 828 * DFLT_HELPFILE Name of the help file. 829 */ 830 // # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt.gz" 831 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 */ 841 // # 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" 847 848 /* 849 * SYS_MENU_FILE Name of the default menu.vim file. 850 */ 851 // # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" 852 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 */ 863 // #define SYNTAX_FNAME "/foo/%s.vim" 864 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 /* 873 * RUNTIME_GLOBAL Comma-separated list of directory names for global Vim 874 * runtime directories. 875 * Don't define this if the preprocessor can't handle 876 * string concatenation. 877 * Also set by "--with-global-runtime" configure argument. 878 */ 879 // #define RUNTIME_GLOBAL "/etc/vim" 880 881 /* 882 * 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 */ 888 // #define RUNTIME_GLOBAL_AFTER "/etc/vim/after" 889 890 /* 891 * MODIFIED_BY Name of who modified Vim. Required when distributing 892 * a modified version of Vim. 893 * Also from the "--with-modified-by" configure argument. 894 */ 895 // #define MODIFIED_BY "John Doe" 896 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 */ 907 // #define USE_SYSTEM 908 909 /* 910 * +X11 Unix only. Include code for xterm title saving and X 911 * clipboard. Only works if HAVE_X11 is also defined. 912 */ 913 #if (defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) 914 # 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 942 * +mouse_sgr Unix only: Include code for for SGR-styled mouse. 943 * +mouse_sysmouse Unix only: Include code for FreeBSD and DragonFly 944 * console mouse handling. 945 * +mouse_urxvt Unix only: Include code for for urxvt mouse handling. 946 * +mouse Any mouse support (any of the above enabled). 947 * Always included, since either FEAT_MOUSE_XTERM or 948 * DOS_MOUSE is defined. 949 */ 950 // Amiga console has no mouse support 951 #if defined(UNIX) || defined(VMS) 952 # define FEAT_MOUSE_XTERM 953 # ifdef FEAT_BIG 954 # define FEAT_MOUSE_NET 955 # endif 956 # ifdef FEAT_BIG 957 # define FEAT_MOUSE_DEC 958 # endif 959 # ifdef FEAT_BIG 960 # define FEAT_MOUSE_URXVT 961 # endif 962 #endif 963 #if defined(MSWIN) 964 # define DOS_MOUSE 965 #endif 966 #if defined(__QNX__) 967 # define FEAT_MOUSE_PTERM 968 #endif 969 970 /* 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 */ 977 #if defined(FEAT_NORMAL) && defined(HAVE_GPM) 978 # define FEAT_MOUSE_GPM 979 #endif 980 981 #if defined(FEAT_NORMAL) && defined(HAVE_SYSMOUSE) 982 # define FEAT_SYSMOUSE 983 #endif 984 985 // urxvt is a small variation of mouse_xterm, and shares its code 986 #if defined(FEAT_MOUSE_URXVT) && !defined(FEAT_MOUSE_XTERM) 987 # define FEAT_MOUSE_XTERM 988 #endif 989 990 /* 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 */ 995 996 #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD 997 # define FEAT_CLIPBOARD 998 #endif 999 1000 #ifdef FEAT_GUI 1001 # ifndef FEAT_CLIPBOARD 1002 # define FEAT_CLIPBOARD 1003 # endif 1004 #endif 1005 1006 #if defined(FEAT_NORMAL) \ 1007 && (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) 1023 # define MSWIN_FIND_REPLACE // include code for find/replace dialog 1024 # define MSWIN_FR_BUFSIZE 256 1025 #endif 1026 1027 #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF) \ 1028 || defined(MSWIN_FIND_REPLACE) 1029 # define FIND_REPLACE_DIALOG 1 1030 #endif 1031 1032 /* 1033 * +clientserver Remote control via the remote_send() function 1034 * and the --remote argument 1035 */ 1036 #if (defined(MSWIN) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL) 1037 # define FEAT_CLIENTSERVER 1038 #endif 1039 1040 /* 1041 * +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) 1045 # ifdef MSWIN 1046 // Always enabled on MS-Windows. 1047 # define FEAT_AUTOSERVERNAME 1048 # else 1049 // Enable here if you don't use configure. 1050 // # define FEAT_AUTOSERVERNAME 1051 # endif 1052 #endif 1053 1054 /* 1055 * +termresponse send t_RV to obtain terminal response. Used for xterm 1056 * to check if mouse dragging can be used and if term 1057 * codes can be obtained. 1058 */ 1059 #if defined(HAVE_TGETENT) 1060 # 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 1068 // Win32 console can change cursor shape 1069 # if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) 1070 # define MCH_CURSOR_SHAPE 1071 # endif 1072 # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \ 1073 || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \ 1074 || defined(FEAT_GUI_PHOTON) 1075 # define FEAT_MOUSESHAPE 1076 # endif 1077 #endif 1078 1079 // GUI and some consoles can change the shape of the cursor. The code is also 1080 // needed for the 'mouseshape' and 'concealcursor' options. 1081 #if defined(FEAT_GUI) \ 1082 || defined(MCH_CURSOR_SHAPE) \ 1083 || defined(FEAT_MOUSESHAPE) \ 1084 || defined(FEAT_CONCEAL) \ 1085 || (defined(UNIX) && defined(FEAT_NORMAL)) 1086 # define CURSOR_SHAPE 1087 #endif 1088 1089 #if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \ 1090 || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) 1091 # define MZSCHEME_GUI_THREADS 1092 #endif 1093 1094 /* 1095 * +ARP Amiga only. Use arp.library, DOS 2.0 is not required. 1096 */ 1097 #if defined(AMIGA) && !defined(NO_ARP) && !defined(__amigaos4__) \ 1098 && !defined(__MORPHOS__) && !defined(__AROS__) 1099 # define FEAT_ARP 1100 #endif 1101 1102 /* 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. 1109 * +lua Lua interface: "--enable-luainterp" 1110 * +mzscheme MzScheme interface: "--enable-mzscheme" 1111 * +perl Perl interface: "--enable-perlinterp" 1112 * +python Python interface: "--enable-pythoninterp" 1113 * +tcl TCL interface: "--enable-tclinterp" 1114 * +netbeans_intg Netbeans integration 1115 * +channel Inter process communication 1116 * +GUI_Athena Athena GUI 1117 * +GUI_Motif Motif GUI 1118 */ 1119 1120 /* 1121 * These features are automatically detected: 1122 * +terminfo 1123 * +tgetent 1124 */ 1125 1126 /* 1127 * The Netbeans feature requires +eval. 1128 */ 1129 #if !defined(FEAT_EVAL) && defined(FEAT_NETBEANS_INTG) 1130 # undef FEAT_NETBEANS_INTG 1131 #endif 1132 1133 /* 1134 * The +channel feature requires +eval. 1135 */ 1136 #if !defined(FEAT_EVAL) && defined(FEAT_JOB_CHANNEL) 1137 # undef FEAT_JOB_CHANNEL 1138 #endif 1139 1140 /* 1141 * +terminal ":terminal" command. Runs a terminal in a window. 1142 * requires +channel 1143 */ 1144 #if defined(FEAT_TERMINAL) && !defined(FEAT_JOB_CHANNEL) 1145 # undef FEAT_TERMINAL 1146 #endif 1147 #if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE) 1148 # define CURSOR_SHAPE 1149 #endif 1150 #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 /* 1156 * +autoshelldir 'autoshelldir' option. 1157 */ 1158 #if defined(FEAT_TERMINAL) 1159 # define FEAT_AUTOSHELLDIR 1160 #endif 1161 /* 1162 * +textprop and +popupwin Text PROPerties and POPUP windows 1163 */ 1164 #if defined(FEAT_EVAL) && defined(FEAT_SYN_HL) 1165 # define FEAT_PROP_POPUP 1166 #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 1173 1174 /* 1175 * +signs Allow signs to be displayed to the left of text lines. 1176 * Adds the ":sign" command. 1177 */ 1178 #if defined(FEAT_BIG) || defined(FEAT_NETBEANS_INTG) || defined(FEAT_PROP_POPUP) 1179 # define FEAT_SIGNS 1180 # if ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \ 1181 && defined(HAVE_X11_XPM_H)) \ 1182 || defined(FEAT_GUI_GTK) \ 1183 || (defined(MSWIN) && defined(FEAT_GUI)) 1184 # 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) \ 1194 || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN)) \ 1195 && ( ((defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)) \ 1196 && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)) \ 1197 || defined(FEAT_NETBEANS_INTG) || defined(FEAT_EVAL)) 1198 # define FEAT_BEVAL_GUI 1199 # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \ 1200 && !defined(FEAT_GUI_MSWIN) 1201 # define FEAT_XFONTSET 1202 # endif 1203 #endif 1204 1205 #if defined(FEAT_BEVAL_GUI) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) 1206 # define FEAT_BEVAL_TIP // balloon eval used for toolbar tooltip 1207 #endif 1208 1209 /* 1210 * +balloon_eval_term Allow balloon expression evaluation in the terminal. 1211 */ 1212 #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \ 1213 (defined(UNIX) || defined(VMS) || \ 1214 (defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)))) 1215 # define FEAT_BEVAL_TERM 1216 #endif 1217 1218 #if defined(FEAT_BEVAL_GUI) || defined(FEAT_BEVAL_TERM) 1219 # define FEAT_BEVAL 1220 #endif 1221 1222 // both Motif and Athena are X11 and share some code 1223 #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) 1224 # define FEAT_GUI_X11 1225 #endif 1226 1227 #if defined(FEAT_NETBEANS_INTG) 1228 // NetBeans uses menus. 1229 # if !defined(FEAT_MENU) 1230 # define FEAT_MENU 1231 # endif 1232 #endif 1233 1234 #if 0 1235 /* 1236 * +footer Motif only: Add a message area at the bottom of the 1237 * main window area. 1238 */ 1239 # define FEAT_FOOTER 1240 #endif 1241 1242 /* 1243 * +autochdir 'autochdir' option. 1244 */ 1245 #if defined(FEAT_NETBEANS_INTG) || defined(FEAT_BIG) 1246 # define FEAT_AUTOCHDIR 1247 #endif 1248 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 1256 1257 /* 1258 * +filterpipe 1259 */ 1260 #if (defined(UNIX) && !defined(USE_SYSTEM)) \ 1261 || (defined(MSWIN) && defined(FEAT_GUI_MSWIN)) 1262 # define FEAT_FILTERPIPE 1263 #endif 1264 1265 /* 1266 * +vtp: Win32 virtual console. 1267 */ 1268 #if (!defined(FEAT_GUI) || defined(VIMDLL)) && defined(MSWIN) 1269 # define FEAT_VTP 1270 #endif 1271 #define SYS_VIMRC_FILE "/usr/local/etc/vim/vimrc" 1272 #define SYS_GVIMRC_FILE "/usr/local/etc/vim/gvimrc" 1273