1264 lines · 30.8 KB · C
RawDownload
/* vi:set ts=8 sts=4 sw=4: * * VIM - Vi IMproved		by Bram Moolenaar * * Do ":help uganda"  in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. *//* * feature.h: Defines for optional code and preferences * * Edit this file to include/exclude parts of Vim, before compiling. * The only other file that may be edited is Makefile, it contains machine * specific options. * * To include specific options, change the "#if*" and "#endif" into comments, * or uncomment the "#define". * To exclude specific options, change the "#define" into a comment. */ /* * When adding a new feature: * - Add a #define below. * - Add a message in the table above ex_version(). * - Add a string to f_has(). * - Add a feature to ":help feature-list" in doc/eval.txt. * - Add feature to ":help +feature-list" in doc/various.txt. * - Add comment for the documentation of commands that use the feature. */ /* * Basic choices: * ============== * * +tiny		almost no features enabled, not even multiple windows * +small		few features enabled, as basic as possible * +normal		A default selection of features enabled * +big			many features enabled, as rich as possible. * +huge		all possible featues enabled. * * When +small is used, +tiny is also included.  +normal implies +small, etc. */ /* * Uncomment one of these to override the default.  For unix use a configure * argument, see Makefile. */#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \	&& !defined(FEAT_BIG) && !defined(FEAT_HUGE)/* #define FEAT_TINY *//* #define FEAT_SMALL *//* #define FEAT_NORMAL *//* #define FEAT_BIG *//* #define FEAT_HUGE */#endif /* * These executables are made available with the +big feature, because they * are supposed to have enough RAM: Win32 (console & GUI), dos32, OS/2 and VMS. * The dos16 version has very little RAM available, use +small. */#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \	&& !defined(FEAT_BIG) && !defined(FEAT_HUGE)# if defined(MSWIN) || defined(DJGPP) || defined(OS2) || defined(VMS) || defined(MACOS) || defined(AMIGA)#  define FEAT_BIG# else#  ifdef MSDOS#   define FEAT_SMALL#  else#   define FEAT_NORMAL#  endif# endif#endif /* * Each feature implies including the "smaller" ones. */#ifdef FEAT_HUGE# define FEAT_BIG#endif#ifdef FEAT_BIG# define FEAT_NORMAL#endif#ifdef FEAT_NORMAL# define FEAT_SMALL#endif#ifdef FEAT_SMALL# define FEAT_TINY#endif /* * Optional code (see ":help +feature-list") * ============= */ /* * +windows		Multiple windows.  Without this there is no help *			window and no status lines. */#ifdef FEAT_SMALL# define FEAT_WINDOWS#endif /* * +listcmds		Vim commands for the buffer list and the argument *			list.  Without this there is no ":buffer" ":bnext", *			":bdel", ":argdelete", etc. */#ifdef FEAT_NORMAL# define FEAT_LISTCMDS#endif /* * +vertsplit		Vertically split windows. */#ifdef FEAT_NORMAL# define FEAT_VERTSPLIT#endif#if defined(FEAT_VERTSPLIT) && !defined(FEAT_WINDOWS)# define FEAT_WINDOWS#endif /* * +cmdhist		Command line history. */#ifdef FEAT_SMALL# define FEAT_CMDHIST#endif /* * Message history is fixed at 100 message, 20 for the tiny version. */#ifdef FEAT_SMALL# define MAX_MSG_HIST_LEN 100#else# define MAX_MSG_HIST_LEN 20#endif /* * +jumplist		Jumplist, CTRL-O and CTRL-I commands. */#ifdef FEAT_SMALL# define FEAT_JUMPLIST#endif /* the cmdline-window requires FEAT_VERTSPLIT and FEAT_CMDHIST */#if defined(FEAT_VERTSPLIT) && defined(FEAT_CMDHIST)# define FEAT_CMDWIN#endif /* * +folding		Fold lines. */#ifdef FEAT_NORMAL# define FEAT_FOLDING#endif /* * +digraphs		Digraphs. *			In insert mode and on the command line you will be *			able to use digraphs. The CTRL-K command will work. *			Define OLD_DIGRAPHS to get digraphs compatible with *			Vim 5.x.  The new ones are from RFC 1345. */#ifdef FEAT_NORMAL# define FEAT_DIGRAPHS/* #define OLD_DIGRAPHS */#endif /* * +langmap		'langmap' option.  Only useful when you put your *			keyboard in a special language mode, e.g. for typing *			greek. */#ifdef FEAT_BIG# define FEAT_LANGMAP#endif /* * +keymap		'keymap' option.  Allows you to map typed keys in *			Insert mode for a special language. */#ifdef FEAT_BIG# define FEAT_KEYMAP#endif /* * +localmap		Mappings and abbreviations local to a buffer. */#ifdef FEAT_NORMAL# define FEAT_LOCALMAP#endif /* * +insert_expand	CTRL-N/CTRL-P/CTRL-X in insert mode. Takes about *			4Kbyte of code. */#ifdef FEAT_NORMAL# define FEAT_INS_EXPAND#endif /* * +cmdline_compl	completion of mappings/abbreviations in cmdline mode. *			Takes a few Kbyte of code. */#ifdef FEAT_NORMAL# define FEAT_CMDL_COMPL#endif #ifdef FEAT_NORMAL# define VIM_BACKTICK		/* internal backtick expansion */#endif /* * +visual		Visual mode. * +visualextra		Extra features for Visual mode (mostly block operators). */#ifdef FEAT_SMALL# define FEAT_VISUAL# ifdef FEAT_NORMAL#  define FEAT_VISUALEXTRA# endif#else# ifdef FEAT_CLIPBOARD#  undef FEAT_CLIPBOARD	/* can't use clipboard without Visual mode */# endif#endif /* * +virtualedit		'virtualedit' option and its implementation */#ifdef FEAT_NORMAL# define FEAT_VIRTUALEDIT#endif /* * +vreplace		"gR" and "gr" commands. */#ifdef FEAT_NORMAL# define FEAT_VREPLACE#endif /* * +cmdline_info	'showcmd' and 'ruler' options. */#ifdef FEAT_NORMAL# define FEAT_CMDL_INFO#endif /* * +linebreak		'showbreak', 'breakat'  and 'linebreak' options. *			Also 'numberwidth'. */#ifdef FEAT_NORMAL# define FEAT_LINEBREAK#endif /* * +ex_extra		":retab", ":right", ":left", ":center", ":normal". */#ifdef FEAT_NORMAL# define FEAT_EX_EXTRA#endif /* * +extra_search	'hlsearch' and 'incsearch' options. */#ifdef FEAT_NORMAL# define FEAT_SEARCH_EXTRA#endif /* * +quickfix		Quickfix commands. */#ifdef FEAT_NORMAL# define FEAT_QUICKFIX#endif /* * +file_in_path	"gf" and "<cfile>" commands. */#ifdef FEAT_NORMAL# define FEAT_SEARCHPATH#endif /* * +find_in_path	"[I" ":isearch" "^W^I", ":checkpath", etc. */#ifdef FEAT_NORMAL# ifdef FEAT_SEARCHPATH	/* FEAT_SEARCHPATH is required */#  define FEAT_FIND_ID# endif#endif /* * +path_extra		up/downwards searching in 'path' and 'tags'. */#ifdef FEAT_NORMAL# define FEAT_PATH_EXTRA#endif /* * +rightleft		Right-to-left editing/typing support. */#ifdef FEAT_BIG# define FEAT_RIGHTLEFT#endif /* * +farsi		Farsi (Persian language) Keymap support. *			Requires FEAT_RIGHTLEFT. */#ifdef FEAT_BIG# define FEAT_FKMAP#endif#ifdef FEAT_FKMAP# ifndef FEAT_RIGHTLEFT#   define FEAT_RIGHTLEFT# endif#endif /* * +arabic		Arabic keymap and shaping support. *			Requires FEAT_RIGHTLEFT and FEAT_MBYTE. */#if defined(FEAT_BIG) && !defined(WIN16) && SIZEOF_INT >= 4 && !defined(EBCDIC)# define FEAT_ARABIC#endif#ifdef FEAT_ARABIC# ifndef FEAT_RIGHTLEFT#   define FEAT_RIGHTLEFT# endif#endif /* * +emacs_tags		When FEAT_EMACS_TAGS defined: Include support for *			emacs style TAGS file. */#ifdef FEAT_BIG# define FEAT_EMACS_TAGS#endif /* * +tag_binary		Can use a binary search for the tags file. * * Disabled for EBCDIC: * On OS/390 Unix we have the problem that /bin/sort sorts ASCII instead of * EBCDIC.  With this binary search doesn't work, as VIM expects a tag file * sorted by character values.  I'm not sure how to fix this. Should we really * do a EBCDIC to ASCII conversion for this?? */#if defined(FEAT_NORMAL) && !defined(EBCDIC)# define FEAT_TAG_BINS#endif /* * +tag_old_static	Old style static tags: "file:tag  file  ..".  Slows *			down tag searching a bit. */#ifdef FEAT_NORMAL# define FEAT_TAG_OLDSTATIC#endif /* * +tag_any_white	Allow any white space to separate the fields in a tags *			file.  When not defined, only a TAB is allowed. *//* #define FEAT_TAG_ANYWHITE */ /* * +cscope		Unix only: Cscope support. */#if defined(UNIX) && defined(FEAT_BIG) && !defined(FEAT_CSCOPE) && !defined(MACOS_X)# define FEAT_CSCOPE#endif /* * +eval		Built-in script language and expression evaluation, *			":let", ":if", etc. */#ifdef FEAT_NORMAL# define FEAT_EVAL#endif /* * +profile		Profiling for functions and scripts. */#if defined(FEAT_HUGE) \	&& defined(FEAT_EVAL) \	&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \		|| defined(WIN3264))# define FEAT_PROFILE#endif /* * +reltime		reltime() function */#if defined(FEAT_NORMAL) \	&& defined(FEAT_EVAL) \	&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \		|| defined(WIN3264))# define FEAT_RELTIME#endif /* * +textobjects		Text objects: "vaw", "das", etc. */#if defined(FEAT_NORMAL) && defined(FEAT_EVAL)# define FEAT_TEXTOBJ#endif /* *			Insert mode completion with 'completefunc'. */#if defined(FEAT_INS_EXPAND) && defined(FEAT_EVAL)# define FEAT_COMPL_FUNC#endif /* * +user_commands	Allow the user to define his own commands. */#ifdef FEAT_NORMAL# define FEAT_USR_CMDS#endif /* * +printer		":hardcopy" command * +postscript		Printing uses PostScript file output. */#if defined(FEAT_NORMAL) && (defined(MSWIN) || defined(FEAT_EVAL)) \	&& !defined(AMIGA)# define FEAT_PRINTER#endif#if defined(FEAT_PRINTER) && ((defined(MSWIN) && defined(MSWINPS)) \	|| (!defined(MSWIN) && defined(FEAT_EVAL)))# define FEAT_POSTSCRIPT#endif /* * +modify_fname	modifiers for file name.  E.g., "%:p:h". */#ifdef FEAT_NORMAL# define FEAT_MODIFY_FNAME#endif /* * +autocmd		":autocmd" command */#ifdef FEAT_NORMAL# define FEAT_AUTOCMD#endif /* * +diff		Displaying diffs in a nice way. *			Requires +windows and +autocmd. */#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS) && defined(FEAT_AUTOCMD)# define FEAT_DIFF#endif /* * +title		'title' and 'icon' options * +statusline		'statusline', 'rulerformat' and special format of *			'titlestring' and 'iconstring' options. * +byte_offset		'%o' in 'statusline' and builtin functions line2byte() *			and byte2line(). *			Note: Required for Macintosh. */#if defined(FEAT_NORMAL) && !defined(MSDOS)# define FEAT_TITLE#endif #ifdef FEAT_NORMAL# define FEAT_STL_OPT# ifndef FEAT_CMDL_INFO#  define FEAT_CMDL_INFO	/* 'ruler' is required for 'statusline' */# endif#endif #ifdef FEAT_NORMAL# define FEAT_BYTEOFF#endif /* * +wildignore		'wildignore' and 'backupskip' options *			Needed for Unix to make "crontab -e" work. */#if defined(FEAT_NORMAL) || defined(UNIX)# define FEAT_WILDIGN#endif /* * +wildmenu		'wildmenu' option */#if defined(FEAT_NORMAL) && defined(FEAT_WINDOWS)# define FEAT_WILDMENU#endif /* * +osfiletype		filetype checking in autocommand patterns. *			Only on systems that support filetypes (RISC OS).

Lines 1–500 of 1264.