blob: f3985e50e7b545ed33502aa92a3fc4dd388611b9 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001/* vi:set ts=8 sts=4 sw=4:
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/*
10 * option.h: definition of global variables for settable options
11 */
12
13#ifndef EXTERN
14# define EXTERN extern
15# define INIT(x)
16#else
17# ifndef INIT
18# define INIT(x) x
19# endif
20#endif
21
22/* default values for p_efm 'errorformat' */
23#ifdef AMIGA
24# define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m"
25#else
26# if defined(MSDOS) || defined(WIN3264)
27# define DFLT_EFM "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%m"
28# else
29# if defined(__EMX__) /* put most common here (i.e. gcc format) at front */
30# define DFLT_EFM "%f:%l:%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f(%l:%c) : %m"
31# else
32# if defined(__QNX__)
33# define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m"
34# else
35# ifdef VMS
36# define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f"
37# else /* Unix, probably */
38# ifdef EBCDIC
39#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f"
40# else
41#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f"
42# endif
43# endif
44# endif
45# endif
46# endif
47#endif
48
49#define DFLT_GREPFORMAT "%f:%l:%m,%f:%l%m,%f %l%m"
50
51/* default values for b_p_ff 'fileformat' and p_ffs 'fileformats' */
52#define FF_DOS "dos"
53#define FF_MAC "mac"
54#define FF_UNIX "unix"
55
56#ifdef USE_CRNL
57# define DFLT_FF "dos"
58# define DFLT_FFS_VIM "dos,unix"
59# define DFLT_FFS_VI "dos,unix" /* also autodetect in compatible mode */
60# define DFLT_TEXTAUTO TRUE
61#else
62# ifdef USE_CR
63# define DFLT_FF "mac"
64# define DFLT_FFS_VIM "mac,unix,dos"
65# define DFLT_FFS_VI "mac,unix,dos"
66# define DFLT_TEXTAUTO TRUE
67# else
68# define DFLT_FF "unix"
69# define DFLT_FFS_VIM "unix,dos"
70# ifdef __CYGWIN__
71# define DFLT_FFS_VI "unix,dos" /* Cygwin always needs file detection */
72# define DFLT_TEXTAUTO TRUE
73# else
74# define DFLT_FFS_VI ""
75# define DFLT_TEXTAUTO FALSE
76# endif
77# endif
78#endif
79
80
81#ifdef FEAT_MBYTE
82/* Possible values for 'encoding' */
83# define ENC_UCSBOM "ucs-bom" /* check for BOM at start of file */
84
85/* default value for 'encoding' */
86# define ENC_DFLT "latin1"
87#endif
88
89/* end-of-line style */
90#define EOL_UNKNOWN -1 /* not defined yet */
91#define EOL_UNIX 0 /* NL */
92#define EOL_DOS 1 /* CR NL */
93#define EOL_MAC 2 /* CR */
94
95/* Formatting options for p_fo 'formatoptions' */
96#define FO_WRAP 't'
97#define FO_WRAP_COMS 'c'
98#define FO_RET_COMS 'r'
99#define FO_OPEN_COMS 'o'
100#define FO_Q_COMS 'q'
101#define FO_Q_NUMBER 'n'
102#define FO_Q_SECOND '2'
103#define FO_INS_VI 'v'
104#define FO_INS_LONG 'l'
105#define FO_INS_BLANK 'b'
106#define FO_MBYTE_BREAK 'm' /* break before/after multi-byte char */
107#define FO_MBYTE_JOIN 'M' /* no space before/after multi-byte char */
108#define FO_MBYTE_JOIN2 'B' /* no space between multi-byte chars */
109#define FO_ONE_LETTER '1'
110#define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */
111#define FO_AUTO 'a' /* automatic formatting */
112
113#define DFLT_FO_VI "vt"
114#define DFLT_FO_VIM "tcq"
115#define FO_ALL "tcroq2vlb1mMBn,aw" /* for do_set() */
116
117/* characters for the p_cpo option: */
118#define CPO_ALTREAD 'a' /* ":read" sets alternate file name */
119#define CPO_ALTWRITE 'A' /* ":write" sets alternate file name */
120#define CPO_BAR 'b' /* "\|" ends a mapping */
121#define CPO_BSLASH 'B' /* backslash in mapping is not special */
122#define CPO_SEARCH 'c'
123#define CPO_CONCAT 'C' /* Don't concatenate sourced lines */
124#define CPO_DOTTAG 'd' /* "./tags" in 'tags' is in current dir */
125#define CPO_DIGRAPH 'D' /* No digraph after "r", "f", etc. */
126#define CPO_EXECBUF 'e'
127#define CPO_EMPTYREGION 'E' /* operating on empty region is an error */
128#define CPO_FNAMER 'f' /* set file name for ":r file" */
129#define CPO_FNAMEW 'F' /* set file name for ":w file" */
130#define CPO_GOTO1 'g' /* goto line 1 for ":edit" */
131#define CPO_INTMOD 'i' /* interrupt a read makes buffer modified */
132#define CPO_JOINSP 'j' /* only use two spaces for join after '.' */
133#define CPO_ENDOFSENT 'J' /* need two spaces to detect end of sentence */
134#define CPO_KEYCODE 'k' /* don't recognize raw key code in mappings */
135#define CPO_KOFFSET 'K' /* don't wait for key code in mappings */
136#define CPO_LITERAL 'l' /* take char after backslash in [] literal */
137#define CPO_LISTWM 'L' /* 'list' changes wrapmargin */
138#define CPO_SHOWMATCH 'm'
139#define CPO_MATCHBSL 'M' /* "%" ignores use of backslashes */
140#define CPO_NUMCOL 'n' /* 'number' column also used for text */
141#define CPO_LINEOFF 'o'
142#define CPO_OVERNEW 'O' /* silently overwrite new file */
143#define CPO_LISP 'p' /* 'lisp' indenting */
144#define CPO_REDO 'r'
145#define CPO_REMMARK 'R' /* remove marks when filtering */
146#define CPO_BUFOPT 's'
147#define CPO_BUFOPTGLOB 'S'
148#define CPO_TAGPAT 't'
149#define CPO_UNDO 'u' /* "u" undoes itself */
150#define CPO_BACKSPACE 'v' /* "v" keep deleted text */
151#define CPO_CW 'w' /* "cw" only changes one blank */
152#define CPO_FWRITE 'W' /* "w!" doesn't overwrite readonly files */
153#define CPO_ESC 'x'
154#define CPO_YANK 'y'
155#define CPO_DOLLAR '$'
156#define CPO_FILTER '!'
157#define CPO_MATCH '%'
158#define CPO_STAR '*' /* ":*" means ":@" */
159#define CPO_SPECI '<' /* don't recognize <> in mappings */
160#define CPO_DEFAULT "aABceFs"
161#define CPO_ALL "aAbBcCdDeEfFgijJkKlLmMnoOprRsStuvwWxy$!%*<"
162
163/* characters for p_ww option: */
164#define WW_ALL "bshl<>[],~"
165
166/* characters for p_mouse option: */
167#define MOUSE_NORMAL 'n' /* use mouse in Normal mode */
168#define MOUSE_VISUAL 'v' /* use mouse in Visual/Select mode */
169#define MOUSE_INSERT 'i' /* use mouse in Insert mode */
170#define MOUSE_COMMAND 'c' /* use mouse in Command-line mode */
171#define MOUSE_HELP 'h' /* use mouse in help buffers */
172#define MOUSE_RETURN 'r' /* use mouse for hit-return message */
173#define MOUSE_A "nvich" /* used for 'a' flag */
174#define MOUSE_ALL "anvichr" /* all possible characters */
175#define MOUSE_NONE ' ' /* don't use Visual selection */
176#define MOUSE_NONEF 'x' /* forced modeless selection */
177
178/* characters for p_shm option: */
179#define SHM_RO 'r' /* readonly */
180#define SHM_MOD 'm' /* modified */
181#define SHM_FILE 'f' /* (file 1 of 2) */
182#define SHM_LAST 'i' /* last line incomplete */
183#define SHM_TEXT 'x' /* tx instead of textmode */
184#define SHM_LINES 'l' /* "L" instead of "lines" */
185#define SHM_NEW 'n' /* "[New]" instead of "[New file]" */
186#define SHM_WRI 'w' /* "[w]" instead of "written" */
187#define SHM_A "rmfixlnw" /* represented by 'a' flag */
188#define SHM_WRITE 'W' /* don't use "written" at all */
189#define SHM_TRUNC 't' /* trunctate file messages */
190#define SHM_TRUNCALL 'T' /* trunctate all messages */
191#define SHM_OVER 'o' /* overwrite file messages */
192#define SHM_OVERALL 'O' /* overwrite more messages */
193#define SHM_SEARCH 's' /* no search hit bottom messages */
194#define SHM_ATTENTION 'A' /* no ATTENTION messages */
195#define SHM_INTRO 'I' /* intro messages */
196#define SHM_ALL "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */
197
198/* characters for p_go: */
199#define GO_ASEL 'a' /* autoselect */
200#define GO_ASELML 'A' /* autoselect modeless selection */
201#define GO_BOT 'b' /* use bottom scrollbar */
202#define GO_CONDIALOG 'c' /* use console dialog */
203#define GO_FORG 'f' /* start GUI in foreground */
204#define GO_GREY 'g' /* use grey menu items */
205#define GO_HORSCROLL 'h' /* flexible horizontal scrolling */
206#define GO_ICON 'i' /* use Vim icon */
207#define GO_LEFT 'l' /* use left scrollbar */
208#define GO_VLEFT 'L' /* left scrollbar with vert split */
209#define GO_MENUS 'm' /* use menu bar */
210#define GO_NOSYSMENU 'M' /* don't source system menu */
211#define GO_POINTER 'p' /* pointer enter/leave callbacks */
212#define GO_RIGHT 'r' /* use right scrollbar */
213#define GO_VRIGHT 'R' /* right scrollbar with vert split */
214#define GO_TEAROFF 't' /* add tear-off menu items */
215#define GO_TOOLBAR 'T' /* add toolbar */
216#define GO_FOOTER 'F' /* add footer */
217#define GO_VERTICAL 'v' /* arrange dialog buttons vertically */
218#define GO_ALL "aAbcfFghilmMprtTv" /* all possible flags for 'go' */
219
220/* flags for 'comments' option */
221#define COM_NEST 'n' /* comments strings nest */
222#define COM_BLANK 'b' /* needs blank after string */
223#define COM_START 's' /* start of comment */
224#define COM_MIDDLE 'm' /* middle of comment */
225#define COM_END 'e' /* end of comment */
226#define COM_AUTO_END 'x' /* last char of end closes comment */
227#define COM_FIRST 'f' /* first line comment only */
228#define COM_LEFT 'l' /* left adjusted */
229#define COM_RIGHT 'r' /* right adjusted */
230#define COM_NOBACK 'O' /* don't use for "O" command */
231#define COM_ALL "nbsmexflrO" /* all flags for 'comments' option */
232#define COM_MAX_LEN 50 /* maximum length of a part */
233
234/* flags for 'statusline' option */
235#define STL_FILEPATH 'f' /* path of file in buffer */
236#define STL_FULLPATH 'F' /* full path of file in buffer */
237#define STL_FILENAME 't' /* last part (tail) of file path */
238#define STL_COLUMN 'c' /* column og cursor*/
239#define STL_VIRTCOL 'v' /* virtual column */
240#define STL_VIRTCOL_ALT 'V' /* - with 'if different' display */
241#define STL_LINE 'l' /* line number of cursor */
242#define STL_NUMLINES 'L' /* number of lines in buffer */
243#define STL_BUFNO 'n' /* current buffer number */
244#define STL_KEYMAP 'k' /* 'keymap' when active */
245#define STL_OFFSET 'o' /* offset of character under cursor*/
246#define STL_OFFSET_X 'O' /* - in hexadecimal */
247#define STL_BYTEVAL 'b' /* byte value of character */
248#define STL_BYTEVAL_X 'B' /* - in hexadecimal */
249#define STL_ROFLAG 'r' /* readonly flag */
250#define STL_ROFLAG_ALT 'R' /* - other display */
251#define STL_HELPFLAG 'h' /* window is showing a help file */
252#define STL_HELPFLAG_ALT 'H' /* - other display */
253#define STL_FILETYPE 'y' /* 'filetype' */
254#define STL_FILETYPE_ALT 'Y' /* - other display */
255#define STL_PREVIEWFLAG 'w' /* window is showing the preview buf */
256#define STL_PREVIEWFLAG_ALT 'W' /* - other display */
257#define STL_MODIFIED 'm' /* modified flag */
258#define STL_MODIFIED_ALT 'M' /* - other display */
259#define STL_PERCENTAGE 'p' /* percentage through file */
260#define STL_ALTPERCENT 'P' /* percentage as TOP BOT ALL or NN% */
261#define STL_ARGLISTSTAT 'a' /* argument list status as (x of y) */
262#define STL_PAGENUM 'N' /* page number (when printing)*/
263#define STL_VIM_EXPR '{' /* start of expression to substitute */
264#define STL_MIDDLEMARK '=' /* separation between left and right */
265#define STL_TRUNCMARK '<' /* truncation mark if line is too long*/
266#define STL_HIGHLIGHT '*' /* highlight from (User)1..9 or 0 */
267#define STL_ALL ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMpPaN{")
268
269/* flags used for parsed 'wildmode' */
270#define WIM_FULL 1
271#define WIM_LONGEST 2
272#define WIM_LIST 4
273
274/* arguments for can_bs() */
275#define BS_INDENT 'i' /* "Indent" */
276#define BS_EOL 'o' /* "eOl" */
277#define BS_START 's' /* "Start" */
278
279#define LISPWORD_VALUE "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object"
280
281/*
282 * The following are actual variabables for the options
283 */
284
285#ifdef FEAT_RIGHTLEFT
286EXTERN long p_aleph; /* 'aleph' */
287#endif
288#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
289EXTERN int p_acd; /* 'autochdir' */
290#endif
291#ifdef FEAT_MBYTE
292EXTERN char_u *p_ambw; /* 'ambiwidth' */
293#endif
294#if defined(FEAT_GUI) && defined(MACOS_X)
295EXTERN int *p_antialias; /* 'antialias' */
296#endif
297EXTERN int p_ar; /* 'autoread' */
298EXTERN int p_aw; /* 'autowrite' */
299EXTERN int p_awa; /* 'autowriteall' */
300EXTERN char_u *p_bs; /* 'backspace' */
301EXTERN char_u *p_bg; /* 'background' */
302EXTERN int p_bk; /* 'backup' */
303EXTERN char_u *p_bkc; /* 'backupcopy' */
304EXTERN unsigned bkc_flags;
305#ifdef IN_OPTION_C
306static char *(p_bkc_values[]) = {"yes", "auto", "no", "breaksymlink", "breakhardlink", NULL};
307#endif
308# define BKC_YES 0x001
309# define BKC_AUTO 0x002
310# define BKC_NO 0x004
311# define BKC_BREAKSYMLINK 0x008
312# define BKC_BREAKHARDLINK 0x010
313EXTERN char_u *p_bdir; /* 'backupdir' */
314EXTERN char_u *p_bex; /* 'backupext' */
315#ifdef FEAT_WILDIGN
316EXTERN char_u *p_bsk; /* 'backupskip' */
317#endif
318#ifdef FEAT_BEVAL
319EXTERN long p_bdlay; /* 'balloondelay' */
320# if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
321EXTERN int p_beval; /* 'ballooneval' */
322# endif
323#endif
324#ifdef FEAT_BROWSE
325EXTERN char_u *p_bsdir; /* 'browsedir' */
326#endif
327#ifdef MSDOS
328EXTERN int p_biosk; /* 'bioskey' */
329EXTERN int p_consk; /* 'conskey' */
330#endif
331#ifdef FEAT_LINEBREAK
332EXTERN char_u *p_breakat; /* 'breakat' */
333#endif
334EXTERN char_u *p_cmp; /* 'casemap' */
335EXTERN unsigned cmp_flags;
336#ifdef IN_OPTION_C
337static char *(p_cmp_values[]) = {"internal", "keepascii", NULL};
338#endif
339#define CMP_INTERNAL 0x001
340#define CMP_KEEPASCII 0x002
341#ifdef FEAT_MBYTE
342EXTERN char_u *p_enc; /* 'encoding' */
343EXTERN int p_deco; /* 'delcombine' */
344# ifdef FEAT_EVAL
345EXTERN char_u *p_ccv; /* 'charconvert' */
346# endif
347#endif
348#ifdef FEAT_CMDWIN
349EXTERN char_u *p_cedit; /* 'cedit' */
350EXTERN long p_cwh; /* 'cmdwinheight' */
351#endif
352#ifdef FEAT_CLIPBOARD
353EXTERN char_u *p_cb; /* 'clipboard' */
354EXTERN int clip_unnamed INIT(= FALSE);
355EXTERN int clip_autoselect INIT(= FALSE);
356EXTERN int clip_autoselectml INIT(= FALSE);
357EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
358#endif
359EXTERN long p_ch; /* 'cmdheight' */
360#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
361EXTERN int p_confirm; /* 'confirm' */
362#endif
363EXTERN int p_cp; /* 'compatible' */
364EXTERN char_u *p_cpo; /* 'cpoptions' */
365#ifdef FEAT_CSCOPE
366EXTERN char_u *p_csprg; /* 'cscopeprg' */
367# ifdef FEAT_QUICKFIX
368EXTERN char_u *p_csqf; /* 'cscopequickfix' */
369# define CSQF_CMDS "sgdctefi"
370# define CSQF_FLAGS "+-0"
371# endif
372EXTERN int p_cst; /* 'cscopetag' */
373EXTERN long p_csto; /* 'cscopetagorder' */
374EXTERN long p_cspc; /* 'cscopepathcomp' */
375EXTERN int p_csverbose; /* 'cscopeverbose' */
376#endif
377EXTERN char_u *p_debug; /* 'debug' */
378#ifdef FEAT_FIND_ID
379EXTERN char_u *p_def; /* 'define' */
380EXTERN char_u *p_inc;
381#endif
382#ifdef FEAT_DIFF
383EXTERN char_u *p_dip; /* 'diffopt' */
384# ifdef FEAT_EVAL
385EXTERN char_u *p_dex; /* 'diffexpr' */
386# endif
387#endif
388#ifdef FEAT_INS_EXPAND
389EXTERN char_u *p_dict; /* 'dictionary' */
390#endif
391#ifdef FEAT_DIGRAPHS
392EXTERN int p_dg; /* 'digraph' */
393#endif
394EXTERN char_u *p_dir; /* 'directory' */
395EXTERN char_u *p_dy; /* 'display' */
396EXTERN unsigned dy_flags;
397#ifdef IN_OPTION_C
398static char *(p_dy_values[]) = {"lastline", "uhex", NULL};
399#endif
400#define DY_LASTLINE 0x001
401#define DY_UHEX 0x002
402EXTERN int p_ed; /* 'edcompatible' */
403#ifdef FEAT_VERTSPLIT
404EXTERN char_u *p_ead; /* 'eadirection' */
405#endif
406EXTERN int p_ea; /* 'equalalways' */
407EXTERN char_u *p_ep; /* 'equalprg' */
408EXTERN int p_eb; /* 'errorbells' */
409#ifdef FEAT_QUICKFIX
410EXTERN char_u *p_ef; /* 'errorfile' */
411EXTERN char_u *p_efm; /* 'errorformat' */
412EXTERN char_u *p_gefm; /* 'grepformat' */
413EXTERN char_u *p_gp; /* 'grepprg' */
414#endif
415#ifdef FEAT_AUTOCMD
416EXTERN char_u *p_ei; /* 'eventignore' */
417#endif
418EXTERN int p_ek; /* 'esckeys' */
419EXTERN int p_exrc; /* 'exrc' */
420#ifdef FEAT_MBYTE
421EXTERN char_u *p_fencs; /* 'fileencodings' */
422#endif
423EXTERN char_u *p_ffs; /* 'fileformats' */
424#ifdef FEAT_FOLDING
425EXTERN char_u *p_fcl; /* 'foldclose' */
426EXTERN long p_fdls; /* 'foldlevelstart' */
427EXTERN char_u *p_fdo; /* 'foldopen' */
428EXTERN unsigned fdo_flags;
429# ifdef IN_OPTION_C
430static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent",
431 "quickfix", "search", "tag", "insert",
432 "undo", "jump", NULL};
433# endif
434# define FDO_ALL 0x001
435# define FDO_BLOCK 0x002
436# define FDO_HOR 0x004
437# define FDO_MARK 0x008
438# define FDO_PERCENT 0x010
439# define FDO_QUICKFIX 0x020
440# define FDO_SEARCH 0x040
441# define FDO_TAG 0x080
442# define FDO_INSERT 0x100
443# define FDO_UNDO 0x200
444# define FDO_JUMP 0x400
445#endif
446EXTERN char_u *p_fp; /* 'formatprg' */
447EXTERN int p_gd; /* 'gdefault' */
448#ifdef FEAT_PRINTER
449EXTERN char_u *p_pdev; /* 'printdevice' */
450# ifdef FEAT_POSTSCRIPT
451EXTERN char_u *p_penc; /* 'printencoding' */
452EXTERN char_u *p_pexpr; /* 'printexpr' */
453# endif
454EXTERN char_u *p_pfn; /* 'printfont' */
455EXTERN char_u *p_popt; /* 'printoptions' */
456EXTERN char_u *p_header; /* 'printheader' */
457#endif
458#ifdef FEAT_GUI
459EXTERN char_u *p_guifont; /* 'guifont' */
460# ifdef FEAT_XFONTSET
461EXTERN char_u *p_guifontset; /* 'guifontset' */
462# endif
463# ifdef FEAT_MBYTE
464EXTERN char_u *p_guifontwide; /* 'guifontwide' */
465# endif
466EXTERN int p_guipty; /* 'guipty' */
467#endif
468#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
469EXTERN long p_ghr; /* 'guiheadroom' */
470#endif
471#ifdef CURSOR_SHAPE
472EXTERN char_u *p_guicursor; /* 'guicursor' */
473#endif
474#ifdef FEAT_MOUSESHAPE
475EXTERN char_u *p_mouseshape; /* 'mouseshape' */
476#endif
477#if defined(FEAT_GUI)
478EXTERN char_u *p_go; /* 'guioptions' */
479#endif
480EXTERN char_u *p_hf; /* 'helpfile' */
481#ifdef FEAT_WINDOWS
482EXTERN long p_hh; /* 'helpheight' */
483#endif
484#ifdef FEAT_MULTI_LANG
485EXTERN char_u *p_hlg; /* 'helplang' */
486#endif
487EXTERN int p_hid; /* 'hidden' */
488/* Use P_HID to check if a buffer is to be hidden when it is no longer
489 * visible in a window. */
490#ifndef FEAT_QUICKFIX
491# define P_HID(dummy) (p_hid || cmdmod.hide)
492#else
493# define P_HID(buf) (buf_hide(buf))
494#endif
495EXTERN char_u *p_hl; /* 'highlight' */
496EXTERN int p_hls; /* 'hlsearch' */
497EXTERN long p_hi; /* 'history' */
498#ifdef FEAT_RIGHTLEFT
499EXTERN int p_hkmap; /* 'hkmap' */
500EXTERN int p_hkmapp; /* 'hkmapp' */
501# ifdef FEAT_FKMAP
502EXTERN int p_fkmap; /* 'fkmap' */
503EXTERN int p_altkeymap; /* 'altkeymap' */
504# endif
505# ifdef FEAT_ARABIC
506EXTERN int p_arshape; /* 'arabicshape' */
507# endif
508#endif
509#ifdef FEAT_TITLE
510EXTERN int p_icon; /* 'icon' */
511EXTERN char_u *p_iconstring; /* 'iconstring' */
512#endif
513EXTERN int p_ic; /* 'ignorecase' */
514#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
515EXTERN char_u *p_imak; /* 'imactivatekey' */
516#endif
517#ifdef USE_IM_CONTROL
518EXTERN int p_imcmdline; /* 'imcmdline' */
519EXTERN int p_imdisable; /* 'imdisable' */
520#endif
521EXTERN int p_is; /* 'incsearch' */
522EXTERN int p_im; /* 'insertmode' */
523EXTERN char_u *p_isf; /* 'isfname' */
524EXTERN char_u *p_isi; /* 'isident' */
525EXTERN char_u *p_isp; /* 'isprint' */
526EXTERN int p_js; /* 'joinspaces' */
527EXTERN char_u *p_kp; /* 'keywordprg' */
528#ifdef FEAT_VISUAL
529EXTERN char_u *p_km; /* 'keymodel' */
530#endif
531#ifdef FEAT_LANGMAP
532EXTERN char_u *p_langmap; /* 'langmap'*/
533#endif
534#if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
535EXTERN char_u *p_lm; /* 'langmenu' */
536#endif
537#ifdef FEAT_GUI
538EXTERN long p_linespace; /* 'linespace' */
539#endif
540#ifdef FEAT_LISP
541EXTERN char_u *p_lispwords; /* 'lispwords' */
542#endif
543#ifdef FEAT_WINDOWS
544EXTERN long p_ls; /* 'laststatus' */
545#endif
546EXTERN char_u *p_lcs; /* 'listchars' */
547
548EXTERN int p_lz; /* 'lazyredraw' */
549EXTERN int p_lpl; /* 'loadplugins' */
550EXTERN int p_magic; /* 'magic' */
551#ifdef FEAT_QUICKFIX
552EXTERN char_u *p_mef; /* 'makeef' */
553EXTERN char_u *p_mp; /* 'makeprg' */
554#endif
555EXTERN long p_mat; /* 'matchtime' */
556#ifdef FEAT_EVAL
557EXTERN long p_mfd; /* 'maxfuncdepth' */
558#endif
559EXTERN long p_mmd; /* 'maxmapdepth' */
560EXTERN long p_mm; /* 'maxmem' */
561EXTERN long p_mmt; /* 'maxmemtot' */
562#ifdef FEAT_MENU
563EXTERN long p_mis; /* 'menuitems' */
564#endif
565EXTERN long p_mls; /* 'modelines' */
566EXTERN char_u *p_mouse; /* 'mouse' */
567#ifdef FEAT_GUI
568EXTERN int p_mousef; /* 'mousefocus' */
569EXTERN int p_mh; /* 'mousehide' */
570#endif
571EXTERN char_u *p_mousem; /* 'mousemodel' */
572EXTERN long p_mouset; /* 'mousetime' */
573EXTERN int p_more; /* 'more' */
574EXTERN char_u *p_para; /* 'paragraphs' */
575EXTERN int p_paste; /* 'paste' */
576EXTERN char_u *p_pt; /* 'pastetoggle' */
577#if defined(FEAT_EVAL) && defined(FEAT_DIFF)
578EXTERN char_u *p_pex; /* 'patchexpr' */
579#endif
580EXTERN char_u *p_pm; /* 'patchmode' */
581EXTERN char_u *p_path; /* 'path' */
582#ifdef FEAT_SEARCHPATH
583EXTERN char_u *p_cdpath; /* 'cdpath' */
584#endif
585EXTERN int p_remap; /* 'remap' */
586EXTERN long p_report; /* 'report' */
587#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
588EXTERN long p_pvh; /* 'previewheight' */
589#endif
590#ifdef WIN3264
591EXTERN int p_rs; /* 'restorescreen' */
592#endif
593#ifdef FEAT_RIGHTLEFT
594EXTERN int p_ari; /* 'allowrevins' */
595EXTERN int p_ri; /* 'revins' */
596#endif
597#ifdef FEAT_CMDL_INFO
598EXTERN int p_ru; /* 'ruler' */
599#endif
600#ifdef FEAT_STL_OPT
601EXTERN char_u *p_ruf; /* 'rulerformat' */
602#endif
603EXTERN char_u *p_rtp; /* 'runtimepath' */
604EXTERN long p_sj; /* 'scrolljump' */
605EXTERN long p_so; /* 'scrolloff' */
606#ifdef FEAT_SCROLLBIND
607EXTERN char_u *p_sbo; /* 'scrollopt' */
608#endif
609EXTERN char_u *p_sections; /* 'sections' */
610EXTERN int p_secure; /* 'secure' */
611#ifdef FEAT_VISUAL
612EXTERN char_u *p_sel; /* 'selection' */
613EXTERN char_u *p_slm; /* 'selectmode' */
614#endif
615#ifdef FEAT_SESSION
616EXTERN char_u *p_ssop; /* 'sessionoptions' */
617EXTERN unsigned ssop_flags;
618# ifdef IN_OPTION_C
619/* Also used for 'viewoptions'! */
620static char *(p_ssop_values[]) = {"buffers", "winpos", "resize", "winsize",
621 "localoptions", "options", "help", "blank", "globals", "slash", "unix",
622 "sesdir", "curdir", "folds", "cursor", NULL};
623# endif
624# define SSOP_BUFFERS 0x001
625# define SSOP_WINPOS 0x002
626# define SSOP_RESIZE 0x004
627# define SSOP_WINSIZE 0x008
628# define SSOP_LOCALOPTIONS 0x010
629# define SSOP_OPTIONS 0x020
630# define SSOP_HELP 0x040
631# define SSOP_BLANK 0x080
632# define SSOP_GLOBALS 0x100
633# define SSOP_SLASH 0x200
634# define SSOP_UNIX 0x400
635# define SSOP_SESDIR 0x800
636# define SSOP_CURDIR 0x1000
637# define SSOP_FOLDS 0x2000
638# define SSOP_CURSOR 0x4000
639#endif
640EXTERN char_u *p_sh; /* 'shell' */
641EXTERN char_u *p_shcf; /* 'shellcmdflag' */
642#ifdef FEAT_QUICKFIX
643EXTERN char_u *p_sp; /* 'shellpipe' */
644#endif
645EXTERN char_u *p_shq; /* 'shellquote' */
646EXTERN char_u *p_sxq; /* 'shellxquote' */
647EXTERN char_u *p_srr; /* 'shellredir' */
648#ifdef AMIGA
649EXTERN long p_st; /* 'shelltype' */
650#endif
651#ifdef BACKSLASH_IN_FILENAME
652EXTERN int p_ssl; /* 'shellslash' */
653#endif
654#ifdef FEAT_STL_OPT
655EXTERN char_u *p_stl; /* 'statusline' */
656#endif
657EXTERN int p_sr; /* 'shiftround' */
658EXTERN char_u *p_shm; /* 'shortmess' */
659#ifdef FEAT_LINEBREAK
660EXTERN char_u *p_sbr; /* 'showbreak' */
661#endif
662#ifdef FEAT_CMDL_INFO
663EXTERN int p_sc; /* 'showcmd' */
664#endif
665EXTERN int p_sft; /* 'showfulltag' */
666EXTERN int p_sm; /* 'showmatch' */
667EXTERN int p_smd; /* 'showmode' */
668EXTERN long p_ss; /* 'sidescroll' */
669EXTERN long p_siso; /* 'sidescrolloff' */
670EXTERN int p_scs; /* 'smartcase' */
671EXTERN int p_sta; /* 'smarttab' */
672#ifdef FEAT_WINDOWS
673EXTERN int p_sb; /* 'splitbelow' */
674#endif
675#ifdef FEAT_VERTSPLIT
676EXTERN int p_spr; /* 'splitright' */
677#endif
678EXTERN int p_sol; /* 'startofline' */
679EXTERN char_u *p_su; /* 'suffixes' */
680EXTERN char_u *p_sws; /* 'swapsync' */
681EXTERN char_u *p_swb; /* 'switchbuf' */
682EXTERN int p_tbs; /* 'tagbsearch' */
683EXTERN long p_tl; /* 'taglength' */
684EXTERN int p_tr; /* 'tagrelative' */
685EXTERN char_u *p_tags; /* 'tags' */
686EXTERN int p_tgst; /* 'tagstack' */
687#ifdef FEAT_ARABIC
688EXTERN int p_tbidi; /* 'termbidi' */
689#endif
690#ifdef FEAT_MBYTE
691EXTERN char_u *p_tenc; /* 'termencoding' */
692#endif
693EXTERN int p_terse; /* 'terse' */
694EXTERN int p_ta; /* 'textauto' */
695EXTERN int p_to; /* 'tildeop' */
696EXTERN int p_timeout; /* 'timeout' */
697EXTERN long p_tm; /* 'timeoutlen' */
698#ifdef FEAT_TITLE
699EXTERN int p_title; /* 'title' */
700EXTERN long p_titlelen; /* 'titlelen' */
701EXTERN char_u *p_titleold; /* 'titleold' */
702EXTERN char_u *p_titlestring; /* 'titlestring' */
703#endif
704#ifdef FEAT_INS_EXPAND
705EXTERN char_u *p_tsr; /* 'thesaurus' */
706#endif
707EXTERN int p_ttimeout; /* 'ttimeout' */
708EXTERN long p_ttm; /* 'ttimeoutlen' */
709EXTERN int p_tbi; /* 'ttybuiltin' */
710EXTERN int p_tf; /* 'ttyfast' */
711#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
712EXTERN char_u *p_toolbar; /* 'toolbar' */
713EXTERN unsigned toolbar_flags;
714# ifdef IN_OPTION_C
715static char *(p_toolbar_values[]) = {"text", "icons", "tooltips", "horiz", NULL};
716# endif
717# define TOOLBAR_TEXT 0x01
718# define TOOLBAR_ICONS 0x02
719# define TOOLBAR_TOOLTIPS 0x04
720# define TOOLBAR_HORIZ 0x08
721#endif
722#if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) && defined(HAVE_GTK2)
723EXTERN char_u *p_tbis; /* 'toolbariconsize' */
724EXTERN unsigned tbis_flags;
725# ifdef IN_OPTION_C
726static char *(p_tbis_values[]) = {"tiny", "small", "medium", "large", NULL};
727# endif
728# define TBIS_TINY 0x01
729# define TBIS_SMALL 0x02
730# define TBIS_MEDIUM 0x04
731# define TBIS_LARGE 0x08
732#endif
733EXTERN long p_ttyscroll; /* 'ttyscroll' */
734#if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS))
735EXTERN char_u *p_ttym; /* 'ttymouse' */
736EXTERN unsigned ttym_flags;
737# ifdef IN_OPTION_C
738static char *(p_ttym_values[]) = {"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", NULL};
739# endif
740# define TTYM_XTERM 0x01
741# define TTYM_XTERM2 0x02
742# define TTYM_DEC 0x04
743# define TTYM_NETTERM 0x08
744# define TTYM_JSBTERM 0x10
745# define TTYM_PTERM 0x20
746#endif
747EXTERN long p_ul; /* 'undolevels' */
748EXTERN long p_uc; /* 'updatecount' */
749EXTERN long p_ut; /* 'updatetime' */
750#if defined(FEAT_WINDOWS) || defined(FEAT_FOLDING)
751EXTERN char_u *p_fcs; /* 'fillchar' */
752#endif
753#ifdef FEAT_VIMINFO
754EXTERN char_u *p_viminfo; /* 'viminfo' */
755#endif
756#ifdef FEAT_SESSION
757EXTERN char_u *p_vdir; /* 'viewdir' */
758EXTERN char_u *p_vop; /* 'viewoptions' */
759EXTERN unsigned vop_flags; /* uses SSOP_ flags */
760#endif
761EXTERN int p_vb; /* 'visualbell' */
762#ifdef FEAT_VIRTUALEDIT
763EXTERN char_u *p_ve; /* 'virtualedit' */
764EXTERN unsigned ve_flags;
765# ifdef IN_OPTION_C
766static char *(p_ve_values[]) = {"block", "insert", "all", NULL};
767# endif
768# define VE_BLOCK 5 /* includes "all" */
769# define VE_INSERT 6 /* includes "all" */
770# define VE_ALL 4
771#endif
772EXTERN long p_verbose; /* 'verbose' */
773EXTERN int p_warn; /* 'warn' */
774#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(LINT) \
775 || defined (FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON)
776#define FEAT_WAK
777EXTERN char_u *p_wak; /* 'winaltkeys' */
778#endif
779#ifdef FEAT_WILDIGN
780EXTERN char_u *p_wig; /* 'wildignore' */
781#endif
782EXTERN int p_wiv; /* 'weirdinvert' */
783EXTERN char_u *p_ww; /* 'whichwrap' */
784EXTERN long p_wc; /* 'wildchar' */
785EXTERN long p_wcm; /* 'wildcharm' */
786EXTERN char_u *p_wim; /* 'wildmode' */
787#ifdef FEAT_WILDMENU
788EXTERN int p_wmnu; /* 'wildmenu' */
789#endif
790#ifdef FEAT_WINDOWS
791EXTERN long p_wh; /* 'winheight' */
792EXTERN long p_wmh; /* 'winminheight' */
793#endif
794#ifdef FEAT_VERTSPLIT
795EXTERN long p_wmw; /* 'winminwidth' */
796EXTERN long p_wiw; /* 'winwidth' */
797#endif
798EXTERN int p_ws; /* 'wrapscan' */
799EXTERN int p_write; /* 'write' */
800EXTERN int p_wa; /* 'writeany' */
801EXTERN int p_wb; /* 'writebackup' */
802EXTERN long p_wd; /* 'writedelay' */