Annotation of src/usr.bin/vim/option.h, Revision 1.3
1.3 ! downsj 1: /* $OpenBSD: option.h,v 1.2 1996/09/21 06:23:15 downsj Exp $ */
1.1 downsj 2: /* vi:set ts=4 sw=4:
3: *
4: * VIM - Vi IMproved by Bram Moolenaar
5: *
6: * Do ":help uganda" in Vim to read copying and usage conditions.
7: * Do ":help credits" in Vim to see a list of people who contributed.
8: */
9:
10: /*
11: * option.h: definition of global variables for settable options
12: *
13: * EXTERN is only defined in main.c (and vim.h)
14: */
15:
16: #ifndef EXTERN
17: # define EXTERN extern
18: # define INIT(x)
19: #else
20: # ifndef INIT
21: # define INIT(x) x
22: # endif
23: #endif
24:
25: /* Formatting options for the p_fo option: */
26: #define FO_WRAP 't'
27: #define FO_WRAP_COMS 'c'
28: #define FO_RET_COMS 'r'
29: #define FO_OPEN_COMS 'o'
30: #define FO_Q_COMS 'q'
31: #define FO_Q_SECOND '2'
32: #define FO_INS_VI 'v'
33: #define FO_INS_LONG 'l'
34: #define FO_INS_BLANK 'b'
35:
36: #define FO_DFLT_VI "vt"
37: #define FO_DFLT "tcq"
38: #define FO_ALL "tcroq2vlb," /* for do_set() */
39:
40: /* characters for the p_cpo option: */
41: #define CPO_BAR 'b' /* "\|" ends a mapping */
42: #define CPO_BSLASH 'B' /* backslash in mapping is not special */
43: #define CPO_SEARCH 'c'
44: #define CPO_EXECBUF 'e'
45: #define CPO_FNAMER 'f' /* set file name for ":r file" */
46: #define CPO_FNAMEW 'F' /* set file name for ":w file" */
47: #define CPO_KEYCODE 'k' /* don't recognize raw key code in mappings */
48: #define CPO_SHOWMATCH 'm'
49: #define CPO_LINEOFF 'o'
50: #define CPO_REDO 'r'
51: #define CPO_BUFOPT 's'
52: #define CPO_BUFOPTGLOB 'S'
53: #define CPO_TAGPAT 't'
1.3 ! downsj 54: #define CPO_CW 'w' /* "cw" only changes one blank */
1.1 downsj 55: #define CPO_ESC 'x'
56: #define CPO_DOLLAR '$'
57: #define CPO_FILTER '!'
58: #define CPO_MATCH '%'
59: #define CPO_SPECI '<' /* don't recognize <> in mappings */
60: #define CPO_DEFAULT "BceFs"
1.3 ! downsj 61: #define CPO_ALL "bBcefFkmorsStwx$!%<"
1.1 downsj 62:
63: /* characters for p_ww option: */
64: #define WW_ALL "bshl<>[],"
65:
66: /* characters for p_mouse option: */
67: #define MOUSE_NORMAL 'n' /* use mouse in normal mode */
68: #define MOUSE_VISUAL 'v' /* use mouse in visual mode */
69: #define MOUSE_INSERT 'i' /* use mouse in insert mode */
70: #define MOUSE_COMMAND 'c' /* use mouse in command line mode */
71: #define MOUSE_HELP 'h' /* use mouse in help buffers */
72: #define MOUSE_RETURN 'r' /* use mouse for hit-return message */
73: #define MOUSE_A "nvich" /* used for 'a' flag */
74: #define MOUSE_ALL "anvicrh" /* all possible characters */
75:
76: /* characters for p_shm option: */
77: #define SHM_RO 'r' /* readonly */
78: #define SHM_MOD 'm' /* modified */
79: #define SHM_FILE 'f' /* (file 1 of 2) */
80: #define SHM_LAST 'i' /* last line incomplete */
81: #define SHM_TEXT 'x' /* tx instead of textmode */
82: #define SHM_LINES 'l' /* "L" instead of "lines" */
83: #define SHM_NEW 'n' /* "[New]" instead of "[New file]" */
84: #define SHM_WRI 'w' /* "[w]" instead of "written" */
85: #define SHM_A "rmfixlnw" /* represented by 'a' flag */
86: #define SHM_WRITE 'W' /* don't use "written" at all */
87: #define SHM_TRUNC 't' /* trunctate message */
88: #define SHM_OVER 'o' /* overwrite file messages */
89: #define SHM_SEARCH 's' /* no search hit bottom messages */
90: #define SHM_ALL "rmfixlnwaWtos" /* all possible flags for 'shm' */
91:
92: /* characters for p_guioptions: */
93: #define GO_ASEL 'a' /* GUI: autoselect */
94: #define GO_BOT 'b' /* GUI: use bottom scrollbar */
95: #define GO_FORG 'f' /* GUI: start GUI in foreground */
96: #define GO_GREY 'g' /* GUI: use grey menu items */
97: #define GO_LEFT 'l' /* GUI: use left scrollbar */
98: #define GO_MENUS 'm' /* GUI: use menu bar */
99: #define GO_RIGHT 'r' /* GUI: use right scrollbar */
100: #define GO_ALL "abfglmr" /* all possible flags for 'go' */
101:
102: /* flags for 'comments' option */
103: #define COM_NEST 'n' /* comments strings nest */
104: #define COM_BLANK 'b' /* needs blank after string */
105: #define COM_START 's' /* start of comment */
106: #define COM_MIDDLE 'm' /* middle of comment */
107: #define COM_END 'e' /* end of comment */
108: #define COM_FIRST 'f' /* first line comment only */
109: #define COM_LEFT 'l' /* left adjusted */
110: #define COM_RIGHT 'r' /* right adjusted */
111: #define COM_ALL "nbsmeflr" /* all flags for 'comments' option */
112: #define COM_MAX_LEN 50 /* maximum lenght of a part */
113:
114: /*
115: * The following are actual variabables for the options
116: */
117:
118: #ifdef RIGHTLEFT
119: EXTERN int p_aleph; /* Hebrew 'Aleph' encoding */
120: #endif
121: EXTERN int p_aw; /* auto-write */
122: EXTERN long p_bs; /* backspace over newlines in insert mode */
123: EXTERN int p_bk; /* make backups when writing out files */
124: EXTERN char_u *p_bdir; /* list of directory names for backup files */
125: EXTERN char_u *p_bex; /* extension for backup file */
126: #ifdef MSDOS
127: EXTERN int p_biosk; /* Use bioskey() instead of kbhit() */
128: #endif
129: EXTERN char_u *p_breakat; /* characters that can cause a line break */
130: EXTERN long p_ch; /* command line height */
131: EXTERN int p_cp; /* vi-compatible */
132: EXTERN char_u *p_cpo; /* vi-compatible option flags */
133: EXTERN char_u *p_def; /* Pattern for recognising definitions */
134: EXTERN char_u *p_dict; /* Dictionaries for ^P/^N */
135: #ifdef DIGRAPHS
136: EXTERN int p_dg; /* enable digraphs */
137: #endif /* DIGRAPHS */
138: EXTERN char_u *p_dir; /* list of directories for swap file */
139: EXTERN int p_ed; /* :s is ed compatible */
140: EXTERN int p_ea; /* make windows equal height */
141: EXTERN char_u *p_ep; /* program name for '=' command */
142: EXTERN int p_eb; /* ring bell for errors */
143: EXTERN char_u *p_ef; /* name of errorfile */
144: EXTERN char_u *p_efm; /* error format */
145: EXTERN int p_ek; /* function keys with ESC in insert mode */
146: EXTERN int p_exrc; /* read .exrc in current dir */
147: EXTERN char_u *p_fp; /* name of format program */
148: EXTERN int p_gd; /* /g is default for :s */
149: #ifdef USE_GUI
150: EXTERN char_u *p_guifont; /* GUI font list */
151: EXTERN char_u *p_guioptions; /* Which GUI components? */
152: EXTERN int p_guipty; /* use pseudo pty for external commands */
153: #endif
154: EXTERN char_u *p_hf; /* name of help file */
155: EXTERN long p_hh; /* help window height */
156: EXTERN int p_hid; /* buffers can be hidden */
157: EXTERN char_u *p_hl; /* which highlight mode to use */
158: EXTERN long p_hi; /* command line history size */
159: #ifdef RIGHTLEFT
160: EXTERN int p_hkmap; /* Hebrew keyboard map */
161: #endif
162: EXTERN int p_icon; /* put file name in icon if possible */
163: EXTERN int p_ic; /* ignore case in searches */
164: EXTERN int p_is; /* incremental search */
165: EXTERN int p_im; /* start editing in input mode */
166: EXTERN char_u *p_inc; /* Pattern for including other files */
167: EXTERN char_u *p_isf; /* characters in a file name */
168: EXTERN char_u *p_isi; /* characters in an identifier */
169: EXTERN char_u *p_isp; /* characters that are printable */
170: EXTERN int p_js; /* use two spaces after '.' with Join */
171: EXTERN char_u *p_kp; /* keyword program */
172: #ifdef HAVE_LANGMAP
173: EXTERN char_u *p_langmap; /* mapping for some language */
174: #endif
175: EXTERN long p_ls; /* last window has status line */
176: EXTERN int p_magic; /* use some characters for reg exp */
177: EXTERN char_u *p_mp; /* program for :make command */
178: EXTERN long p_mmd; /* maximal map depth */
179: EXTERN long p_mm; /* maximal amount of memory for buffer */
180: EXTERN long p_mmt; /* maximal amount of memory for Vim */
181: EXTERN long p_mls; /* number of mode lines */
182: EXTERN char_u *p_mouse; /* enable mouse clicks (for xterm) */
183: EXTERN long p_mouset; /* mouse double click time */
184: EXTERN int p_more; /* wait when screen full when listing */
185: EXTERN char_u *p_para; /* paragraphs */
186: EXTERN int p_paste; /* paste mode */
187: EXTERN char_u *p_pm; /* patchmode file suffix */
188: EXTERN char_u *p_path; /* path for "]f" and "^Wf" */
189: EXTERN int p_remap; /* remap */
190: EXTERN long p_report; /* minimum number of lines for report */
191: #ifdef WIN32
192: EXTERN int p_rs; /* restore startup screen upon exit */
193: #endif
194: #ifdef RIGHTLEFT
195: EXTERN int p_ri; /* reverse direction of insert */
196: #endif
197: EXTERN int p_ru; /* show column/line number */
198: EXTERN long p_sj; /* scroll jump size */
199: EXTERN long p_so; /* scroll offset */
200: EXTERN char_u *p_sections; /* sections */
201: EXTERN int p_secure; /* do .exrc and .vimrc in secure mode */
202: EXTERN char_u *p_sh; /* name of shell to use */
1.2 downsj 203: EXTERN char_u *p_shcf; /* flag to shell to execute one command */
1.1 downsj 204: EXTERN char_u *p_sp; /* string for output of make */
1.2 downsj 205: EXTERN char_u *p_shq; /* quote character(s) for shell */
1.1 downsj 206: EXTERN char_u *p_srr; /* string for output of filter */
207: EXTERN long p_st; /* type of shell */
208: EXTERN int p_sr; /* shift round off (for < and >) */
209: EXTERN char_u *p_shm; /* When to use short message */
210: EXTERN char_u *p_sbr; /* string for break of line */
211: EXTERN int p_sc; /* show command in status line */
212: EXTERN int p_sm; /* showmatch */
213: EXTERN int p_smd; /* show mode */
214: EXTERN long p_ss; /* sideways scrolling offset */
215: EXTERN int p_scs; /* 'smartcase' */
216: EXTERN int p_sta; /* smart-tab for expand-tab */
217: EXTERN int p_sb; /* split window backwards */
218: EXTERN int p_sol; /* Move cursor to start-of-line? */
219: EXTERN char_u *p_su; /* suffixes for wildcard expansion */
220: EXTERN char_u *p_sws; /* swap file syncing */
221: EXTERN long p_tl; /* used tag length */
222: EXTERN int p_tr; /* tag file name is relative */
223: EXTERN char_u *p_tags; /* tags search path */
224: EXTERN int p_terse; /* terse messages */
225: EXTERN int p_ta; /* auto textmode detection */
226: EXTERN int p_to; /* tilde is an operator */
227: EXTERN int p_timeout; /* mappings entered within one second */
228: EXTERN long p_tm; /* timeoutlen (msec) */
229: EXTERN int p_title; /* set window title if possible */
1.2 downsj 230: EXTERN long p_titlelen; /* length of window title in % of Columns */
1.1 downsj 231: EXTERN int p_ttimeout; /* key codes entered within one second */
232: EXTERN long p_ttm; /* key code timeoutlen (msec) */
233: EXTERN int p_tbi; /* 'ttybuiltin' use builtin termcap first */
234: EXTERN int p_tf; /* terminal fast I/O */
235: EXTERN long p_ttyscroll; /* maximum number of screen lines for a scroll */
236: EXTERN long p_ul; /* number of Undo Levels */
237: EXTERN long p_uc; /* update count for swap file */
238: EXTERN long p_ut; /* update time for swap file */
239: #ifdef VIMINFO
240: EXTERN char_u *p_viminfo; /* Parameters for using ~/.viminfo file */
241: #endif /* VIMINFO */
242: EXTERN int p_vb; /* visual bell only (no beep) */
243: EXTERN int p_warn; /* warn for changes at shell command */
244: EXTERN int p_wiv; /* inversion of text is weird */
245: EXTERN char_u *p_ww; /* which keys wrap to next/prev line */
246: EXTERN long p_wc; /* character for wildcard exapansion */
247: EXTERN long p_wh; /* desired window height */
248: EXTERN int p_ws; /* wrap scan */
249: EXTERN int p_wa; /* write any */
250: EXTERN int p_wb; /* write backup files */
251: EXTERN long p_wd; /* write delay for screen output (for testing) */