home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / amiga / vim46src.lha / vim-4.6 / src / option.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-19  |  10.5 KB  |  255 lines

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