📄 option.h
字号:
/* 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.
*/
/*
* option.h: definition of global variables for settable options
*
* EXTERN is only defined in main.c (and vim.h)
*/
#ifndef EXTERN
# define EXTERN extern
# define INIT(x)
#else
# ifndef INIT
# define INIT(x) x
# endif
#endif
/* default values for p_efm 'errorformat' */
#ifdef AMIGA
/* don't use [^0-9] here, Manx C can't handle it */
# define EFM_DFLT "%f>%l:%c:%t:%n:%m,%f:%l: %t%*[^0123456789]%n: %m,%f %l %t%*[^0123456789]%n: %m,%*[^\"]\"%f\"%*[^0123456789]%l: %m,%f:%l:%m"
#else
# if defined MSDOS || defined WIN32
# define EFM_DFLT "%f(%l) : %t%*[^0-9]%n: %m,%*[^\"]\"%f\"%*[^0-9]%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%m"
# else
# if defined(__EMX__) /* put most common here (i.e. gcc format) at front */
# define EFM_DFLT "%f:%l:%m,%*[^\"]\"%f\"%*[^0-9]%l: %m,\"%f\"%*[^0-9]%l: %m,%f(%l:%c) : %m"
# else
# if defined(__QNX__)
# define EFM_DFLT "%f(%l):%*[^WE]%t%*[^0123456789]%n:%m"
# else /* Unix, probably */
# define EFM_DFLT "%*[^\"]\"%f\"%*[^0-9]%l: %m,\"%f\"%*[^0-9]%l: %m,%f:%l:%m,\"%f\"\\, line %l%*[^0-9]%c%*[^ ] %m"
# endif
# endif
# endif
#endif
#define GEFM_DFLT "%f:%l%m,%f %l%m"
/* default values for b_p_ff 'fileformat' and p_ffs 'fileformats' */
#define FF_DOS "dos"
#define FF_MAC "mac"
#define FF_UNIX "unix"
#ifdef USE_CRNL
# define FF_DFLT "dos"
# define FFS_DFLT "dos,unix"
# define FFS_VI "dos,unix" /* also autodetect in compatible mode */
# define TA_DFLT TRUE
#else
# ifdef USE_CR
# define FF_DFLT "mac"
# define FFS_DFLT "mac,unix,dos"
# else
# define FF_DFLT "unix"
# define FFS_DFLT "unix,dos"
# endif
# define FFS_VI ""
# define TA_DFLT FALSE
#endif
#ifdef MULTI_BYTE
#define FE_ANSI "ansi"
#define FE_UNICODE "unicode"
#define FE_DBJPN "japan"
#define FE_DBKOR "korea"
#define FE_DBCHT "taiwan"
#define FE_DBCHS "prc"
#define FE_HEBREW "hebrew"
#define FE_FARSI "farsi"
/* default value for 'fileencoding' */
#define FE_DFLT FE_ANSI
#endif
/* end-of-line style */
#define EOL_UNKNOWN -1 /* not defined yet */
#define EOL_UNIX 0 /* NL */
#define EOL_DOS 1 /* CR NL */
#define EOL_MAC 2 /* CR */
/* Formatting options for p_fo 'formatoptions' */
#define FO_WRAP 't'
#define FO_WRAP_COMS 'c'
#define FO_RET_COMS 'r'
#define FO_OPEN_COMS 'o'
#define FO_Q_COMS 'q'
#define FO_Q_SECOND '2'
#define FO_INS_VI 'v'
#define FO_INS_LONG 'l'
#define FO_INS_BLANK 'b'
#define FO_DFLT_VI "vt"
#define FO_DFLT "tcq"
#define FO_ALL "tcroq2vlb," /* for do_set() */
/* characters for the p_cpo option: */
#define CPO_ALTREAD 'a' /* ":read" sets alternate file name */
#define CPO_ALTWRITE 'A' /* ":write" sets alternate file name */
#define CPO_BAR 'b' /* "\|" ends a mapping */
#define CPO_BSLASH 'B' /* backslash in mapping is not special */
#define CPO_SEARCH 'c'
#define CPO_DOTTAG 'd' /* "./tags" in 'tags' is in current dir */
#define CPO_EXECBUF 'e'
#define CPO_EMPTYREGION 'E' /* operating on empty region is an error */
#define CPO_FNAMER 'f' /* set file name for ":r file" */
#define CPO_FNAMEW 'F' /* set file name for ":w file" */
#define CPO_JOINSP 'j' /* only use two spaces for join after '.' */
#define CPO_KEYCODE 'k' /* don't recognize raw key code in mappings */
#define CPO_LITERAL 'l' /* take char after backslash in [] literal */
#define CPO_LISTWM 'L' /* 'list' changes wrapmargin */
#define CPO_SHOWMATCH 'm'
#define CPO_LINEOFF 'o'
#define CPO_REDO 'r'
#define CPO_BUFOPT 's'
#define CPO_BUFOPTGLOB 'S'
#define CPO_TAGPAT 't'
#define CPO_UNDO 'u' /* "u" undoes itself */
#define CPO_CW 'w' /* "cw" only changes one blank */
#define CPO_FWRITE 'W' /* "w!" doesn't overwrite readonly files */
#define CPO_ESC 'x'
#define CPO_YANK 'y'
#define CPO_DOLLAR '$'
#define CPO_FILTER '!'
#define CPO_MATCH '%'
#define CPO_STAR '*' /* ":*" means ":@" */
#define CPO_SPECI '<' /* don't recognize <> in mappings */
#define CPO_DEFAULT "aABceFs"
#define CPO_ALL "aAbBcdeEfFjklLmorsStuwWxy$!%*<"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],"
/* characters for p_mouse option: */
#define MOUSE_NORMAL 'n' /* use mouse in Normal mode */
#define MOUSE_VISUAL 'v' /* use mouse in Visual/Select mode */
#define MOUSE_INSERT 'i' /* use mouse in Insert mode */
#define MOUSE_COMMAND 'c' /* use mouse in Command-line mode */
#define MOUSE_HELP 'h' /* use mouse in help buffers */
#define MOUSE_RETURN 'r' /* use mouse for hit-return message */
#define MOUSE_A "nvich" /* used for 'a' flag */
#define MOUSE_ALL "anvichr" /* all possible characters */
/* characters for p_shm option: */
#define SHM_RO 'r' /* readonly */
#define SHM_MOD 'm' /* modified */
#define SHM_FILE 'f' /* (file 1 of 2) */
#define SHM_LAST 'i' /* last line incomplete */
#define SHM_TEXT 'x' /* tx instead of textmode */
#define SHM_LINES 'l' /* "L" instead of "lines" */
#define SHM_NEW 'n' /* "[New]" instead of "[New file]" */
#define SHM_WRI 'w' /* "[w]" instead of "written" */
#define SHM_A "rmfixlnw" /* represented by 'a' flag */
#define SHM_WRITE 'W' /* don't use "written" at all */
#define SHM_TRUNC 't' /* trunctate message */
#define SHM_OVER 'o' /* overwrite file messages */
#define SHM_OVERALL 'O' /* overwrite more messages */
#define SHM_SEARCH 's' /* no search hit bottom messages */
#define SHM_ATTENTION 'A' /* no ATTENTION messages */
#define SHM_INTRO 'I' /* intro messages */
#define SHM_ALL "rmfixlnwaWtoOsAI" /* all possible flags for 'shm' */
/* characters for p_guioptions: */
#define GO_ASEL 'a' /* autoselect */
#define GO_BOT 'b' /* use bottom scrollbar */
#define GO_FORG 'f' /* start GUI in foreground */
#define GO_GREY 'g' /* use grey menu items */
#define GO_ICON 'i' /* use Vim icon */
#define GO_LEFT 'l' /* use left scrollbar */
#define GO_MENUS 'm' /* use menu bar */
#define GO_POINTER 'p' /* pointer enter/leave callbacks */
#define GO_RIGHT 'r' /* use right scrollbar */
#define GO_TEAROFF 't' /* add tear-off menu items */
#define GO_TOOLBAR 'T' /* add toolbar */
#define GO_ALL "abfgilmprtT" /* all possible flags for 'go' */
/* flags for 'comments' option */
#define COM_NEST 'n' /* comments strings nest */
#define COM_BLANK 'b' /* needs blank after string */
#define COM_START 's' /* start of comment */
#define COM_MIDDLE 'm' /* middle of comment */
#define COM_END 'e' /* end of comment */
#define COM_FIRST 'f' /* first line comment only */
#define COM_LEFT 'l' /* left adjusted */
#define COM_RIGHT 'r' /* right adjusted */
#define COM_ALL "nbsmeflr" /* all flags for 'comments' option */
#define COM_MAX_LEN 50 /* maximum length of a part */
/* flags used for parsed 'wildmode' */
#define WIM_FULL 1
#define WIM_LONGEST 2
#define WIM_LIST 4
/*
* The following are actual variabables for the options
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -