# This file contains all of the editor's buffer and window modes # # It should be processed by the "mktbls" program, which produces the # headers #included by main.c # # All that is necessary to add a new mode to the editor is to add # an entry to this file, write the supporting code, and rebuild. # # If you want to know which modes are already taken, look # at nemode.h, after you build it. # # The modes are table entries in the BUFFER and WINDOW structures. # # $Header: /usr/build/vile/vile/RCS/modetbl,v 1.101 1998/10/24 15:12:52 cmorgan Exp $ # # # Mode-table entries. Capitalized letters are used for abbreviations. # The second column is the root of the index-definition. # The third column is flags used to control updates after a mode is changed. # The fourth column (if present) controls conditional compilation of the mode. .globals bool # GMD prefix "AutoBuffer" ABUFF chgd_autobuf # auto-buffer (lru) "dirc" DIRC 0 COMPLETE_DIRS # directory-completion (slow!) "Alt-TabPos" ALTTABPOS 0 # emacs-style cursor positioning "expand-path" EXPAND_PATH 0 # true iff %/# don't substitute shortened-path "ErrorBells" ERRORBELLS 0 # audible/visible-bells "flash" FLASH 0 OPT_FLASH # visible-bell (flash) "force-console" FORCE_CONSOLE 0 SYS_WINNT&&defined(DISP_NTWIN) "glob" GLOB 0 !OPT_GLOB_PIPE # enable/disable filename globbing "HIstory" HISTORY 0 OPT_HISTORY # command-history "ImplyBuffer" IMPLYBUFF 0 # imply-buffer (vi-like) "multibeep" MULTIBEEP 0 # multiple successive identical failed motions all beep "maplonger" MAPLONGER 0 # favor longer maps "Popup-Choices" POPUP_CHOICES 0 OPT_POPUPCHOICE&&!OPT_ENUM_MODES # popup buffer showing file-completion choices "Popup-Msgs" POPUP_MSGS 0 OPT_POPUP_MSGS # popup buffer when multiple messages emitted "ReadOnly-on-ReadOnly" RONLYRONLY 0 # set readonly mode for readonly files "remap" REMAP 0 # should mappings be reapplied "remapfirst" REMAPFIRST 0 # should 1st char of a map be remapped? "resolve-links" RESOLVE_LINKS 0 HAVE_SYMLINK # cache/resolve directory names (can be slow if NFS times-out) "ShowRam" RAMSIZE 0 OPT_RAMSIZE # show ram-usage "SameBangs" SAMEBANGS 0 # use same "!!" data for ^X-! "working" WORKING chgd_working OPT_WORKING # "working" message "usefilelock" USEFILELOCK 0 OPT_LCKFILES # okay use filelocks "VIEW-on-ReadOnly" RONLYVIEW 0 # set view mode for readonly files "w32pipes" W32PIPES 0 OPT_W32PIPES "warn-unread" WARNUNREAD 0 # warn if quitting with unread buffers "warn-reread" WARNREREAD 0 # warn before rereading a buffer "warn-rename" WARNRENAME 0 # warn before renaming a buffer "xterm-mouse" XTERM_MOUSE chgd_xterm # mode to control whether we allow mouse-clicking "SmoothScroll" SMOOTH_SCROLL 0 # should we update even if there is typeahead? "Spaces-After-Sentence" SPACESENT 0 # add two spaces after a enum "fcolor" FCOLOR chgd_color OPT_COLOR # foreground color "bcolor" BCOLOR chgd_color OPT_COLOR # background color "Mini-Hilite" MINI_HILITE 0 # highlight minibuffer when using vi-commands "Popup-Choices" POPUP_CHOICES 0 OPT_POPUPCHOICE&&OPT_ENUM_MODES # popup buffer showing file-completion choices int # VAL_ prefix "maplength" MAPLENGTH 0 # maximum length of :map string "printing-low" PRINT_LOW chgd_charset # low end of high-bit-set printable range "printing-high" PRINT_HIGH chgd_charset # high end of high-bit-set printable range "report" REPORT 0 # threshold for reporting changes "timeoutlen" TIMEOUTVAL 0 # how long to catnap for more input "timeoutlen-user" TIMEOUTUSERVAL 0 # how long to catnap for more input "scroll-pause" SCROLLPAUSE 0 SYS_WINNT # how long to catnap after scrolling regex # VAL_ prefix "C-SUFfixes" CSUFFIXES 0 !OPT_MAJORMODE # match against filenames to turn on c-mode string # VAL_ prefix "backup-style" BACKUPSTYLE 0 OPT_FILEBACK # file backup style "expand-chars" EXPAND_CHARS 0 # list of chars we can expand (%,#,:) "glob" GLOB 0 OPT_GLOB_PIPE # select filename globbing style "redirect-keys" REDIRECT_KEYS chgd_redir_keys SYS_WINNT&&defined(VILE_OLE) # send keys to another process .buffers bool # MD prefix "animated" UPBUFF 0 OPT_UPBUFF # update scratch-buffers "AutoIndent" AIND 0 # auto-indent "AutoSave" ASAVE 0 # auto-save mode "AutoWrite" AUTOWRITE 0 # auto-write when shelling out "BackspaceLimit" BACKLIMIT 0 # backspace limited in insert mode "check-modtime" CHK_MODTIME 0 !SMALLER # check buffer-modtime "cmode" CMOD chgd_major_w !OPT_MAJORMODE # C indentation and fence match "crypt" CRYPT chgd_major OPT_ENCRYPT # encrytion mode active "dos" DOS chgd_major_w # "dos" mode -- lines end in crlf "IgnoreCase" IGNCASE chgd_hilite # Exact matching for searches "locked" LOCKED chgd_disabled OPT_LCKFILES # mode locked "magic" MAGIC chgd_hilite # regular expressions in search "Meta-Insert-Bindings" METAINSBIND 0 # honor meta bindings in insert mode "NewLine" NEWLINE chgd_buffer # trailing newline (vi-style) "ReadOnly" READONLY chgd_major # allow writing the buffer "ShowMatch" SHOWMAT 0 # show matching braces during insert "ShowMoDe" SHOWMODE chgd_major # show insert/replace/command mode "TabInsert" TABINSERT 0 # okay to insert tab chars "TagignoreCase" TAGIGNORECASE 0 !SMALLER # ignore upper/lower case in tags "TagRelative" TAGSRELTIV 0 # tags are relative to tagsfile path "TagWord" TAGWORD 0 # apply tag to whole word, not only string at cursor "terse" TERSE 0 # be terse -- suppress messages "view" VIEW chgd_major # read-only buffer "WrapScan" SWRAP 0 # wrap-around search mode "WrapWords" WRAP 0 # word wrap enum "visual-matches" HILITEMATCH chgd_hilite OPT_HILITEMATCH # highlight all search matches int # VAL_ prefix "AutoSaveCNT" ASAVECNT 0 # how often auto-saves occur "C-ShiftWidth" C_SWIDTH 0 !OPT_MAJORMODE # shift-width for C buffers "C-TabStop" C_TAB chgd_major_w !OPT_MAJORMODE # tab spacing for C buffers "FillCol" FILL 0 # column for paragraph reformat, and line break "ShiftWidth" SWIDTH 0 # shiftwidth for ^T/^D/<> "TabStop" TAB chgd_major_w # tab spacing for most buffers "TagLength" TAGLEN 0 # required significant length for tag lookups "UndoLimit" UNDOLIM 0 # how much undo stack is saved "WrapMargin" WRAPMARGIN 0 # width of right margin for autowrap string # VAL_ prefix "fence-pairs" FENCES chgd_fences # pairs of fences {,}; (,); etc. "locker" LOCKER chgd_disabled OPT_LCKFILES # Name of locker "tags" TAGS 0 # list of tags files regex # VAL_ prefix "comments" COMMENTS 0 # matches leading comment for comment reformatting "comment-prefix" CMT_PREFIX 0 # prefix to ignore/preserve when formatting comment "fence-begin" FENCE_BEGIN 0 # begin a simple (character, non-nestable) fence "fence-end" FENCE_END 0 # end a simple fence "fence-if" FENCE_IF 0 # begin a complex (line, nestable) fence "fence-elif" FENCE_ELIF 0 # next complex fence "fence-else" FENCE_ELSE 0 # final complex fence "fence-fi" FENCE_FI 0 # end a complex fence "paragraphs" PARAGRAPHS 0 # delimits a paragraph "sections" SECTIONS 0 # delimits a section "sentences" SENTENCES 0 # delimits a sentence .windows bool # WMD prefix "LIst" LIST chgd_window # "list" mode -- show tabs and EOL "NUmber" NUMBER chgd_window # line-numbers shown "HorizScroll" HORSCROLL 0 # scroll whole screen "LineWrap" LINEWRAP chgd_window OPT_LINEWRAP # wrap lines wider than screen "ruler" RULER chgd_status !SMALLER # display line+col in modeline "Unprintable-as-Octal" NONPRINTOCTAL chgd_window # print non-printing chars in octal "Terse-SELections" TERSELECT 0 OPT_SELECTIONS # don't display extent of selections on message line int # VAL_ prefix "SIDEways" SIDEWAYS chgd_window # sideways offset for display # Put the majormode definitions after buffers to simplify logic in mktbls. # The arguments of .majormode are the predefined majormodes and submodes. .majormode c tabstop .majormode c shiftwidth regex # MVAL_ prefix "PREamble" PREAMBLE 0 # match against file header to turn on mode "SUFfixes" SUFFIXES 0 # match against filenames to turn on mode # # The "environment" variables are similar to modes, but are not so neatly # organized into groups of universal/buffer/window. .environment "abufname" ABUFNAME # alternate buffer name (i.e. '#') "bchars" BCHARS # chars in current buffer "blines" BLINES # lines in current buffer "cbufname" CBUFNAME # current buffer name "buffer-hook" BUFHOOK OPT_PROCEDURES # procedure to run when entering buf "cd-hook" CDHOOK OPT_PROCEDURES # procedure to run when cd'ing "cfgopts" CFGOPTS # "interesting" compiled options (comma-delimited) "cfilname" CFNAME # current file name "char" CURCHAR # current character under the cursor "cryptkey" CRYPTKEY OPT_ENCRYPT # write-only encryption-key "curcol" CURCOL # current column pos of cursor "curline" CURLINE # current line in file "cwd" CWD OPT_SHELL # current directory "cwline" CWLINE # current screen line in window "debug" DEBUG # macro debugging "directory" DIRECTORY OPT_SHELL # controls location of temp-files "discmd" DISCMD # display commands on command line "disinp" DISINP # display command line input characters "end-of-cmd" EOC # true if they ended the cmd with "exit-hook" EXITHOOK OPT_PROCEDURES # procedure to run when quitting "flicker" FLICKER # flicker suppression "font" FONT DISP_X11||DISP_NTWIN # current font "forward-search" FWD_SEARCH # search-direction (true if forward) "helpfile" HELPFILE # helpfile (vile.hlp) "iconname" ICONNAM DISP_X11 # current font "identifier" IDENTIF # current identifier "kill" KILL # kill buffer (read only) "lastkey" LASTKEY # last keyboard char struck "line" LINE # text of current line "llength" LLENGTH # length of current line "majormode" MAJORMODE OPT_MAJORMODE # current majormode, if any "match" MATCH # last matched magic pattern "mode" MODE # are we inserting/overwriting/command "modeline-format" MLFORMAT OPT_MLFORMAT # modeline format string "modified" MODIFIED # is current buffer modified? "ncolors" NCOLORS # number of colors displayed "ntildes" NTILDES # number of tildes displayed at eob "ocwd" OCWD OPT_SHELL # previous directory "os" OS # what os are we on? "pagelen" PAGELEN # number of lines used by editor "pagewid" CURWIDTH # current screen width "palette" PALETTE # current palette string "patchlevel" PATCHLEVEL # current patch-level of vile (empty for release) "pathname" PATHNAME # current path-like word "pending" PENDING # type ahead pending flag "pid" PROCESSID # vile's process-id "progname" PROGNAME # returns current prog name - "vile" "qidentifier" QIDENTIF # current qualified identifier "ram" RAM OPT_RAMSIZE # ram in use by malloc "read-hook" RDHOOK OPT_PROCEDURES # procedure to run when reading "replace" REPLACE # replacement pattern "search" SEARCH # search pattern "seed" SEED # current random number seed "shell" SHELL OPT_SHELL # shell-environment variable "sres" SRES # current screen resolution "startup-file" STARTUP_FILE # the name of the startup-file (e.g., .vilerc) "startup-path" STARTUP_PATH # where to find the startup-file (e.g., .) "status" STATUS # returns the status of the last command "tpause" TPAUSE # length to pause for paren matching "title" TITLE DISP_X11 # window title "version" VERSION # current version number "wlines" WLINES # # of lines in current window "word" WORD # current word "write-hook" WRHOOK OPT_PROCEDURES # procedure to run when writing "xdisplay" XDISPLAY DISP_X11 # X Windows display, etc. "xshell" XSHELL DISP_X11 # xterm emulator, etc. .functions "abs" ABS MONAMIC # absolute value of a number "add" ADD DYNAMIC # add two numbers together "and" AND DYNAMIC # logical and "asc" ASCII MONAMIC # char to integer conversion "bin" BIND MONAMIC # lookup what function name is bound to a key "cat" CAT DYNAMIC # concatenate string "chr" CHR MONAMIC # integer to char conversion "div" DIV DYNAMIC # division "env" ENV MONAMIC # retrieve a system environment var "equ" EQUAL DYNAMIC # logical equality check "glo" GLOBMODE MONAMIC # retrieve global setting "gre" GREATER DYNAMIC # logical greater than "gtk" GTKEY NILNAMIC # get 1 character "gts" GTSEQ NILNAMIC # get keyboard-sequence (characters) "ind" IND MONAMIC # evaluate indirect value "lef" LEFT DYNAMIC # left string(string, len) "len" LENGTH MONAMIC # string length "les" LESS DYNAMIC # logical less than "loc" LOCMODE MONAMIC # retrieve local setting "low" LOWER MONAMIC # lower case string "mid" MID TRINAMIC # mid string(string, pos, len) "mod" MOD DYNAMIC # modulo "neg" NEG MONAMIC # negate "not" NOT MONAMIC # logical not "or" OR DYNAMIC # logical or "rd" READABLE MONAMIC # is a file readable? "rig" RIGHT DYNAMIC # right string(string, pos) "rnd" RND MONAMIC # get a random number "seq" SEQUAL DYNAMIC # string logical equality check "sgr" SGREAT DYNAMIC # string logical greater than "sin" SINDEX DYNAMIC # find the index of one string in another "sle" SLESS DYNAMIC # string logical less than "sub" SUB DYNAMIC # subtraction "tim" TIMES DYNAMIC # multiplication "tri" TRIM MONAMIC # trims leading/trailing/repeated whitespace "tru" TRUTH MONAMIC # Truth of the universe logical test "upp" UPPER MONAMIC # uppercase string "wr" WRITABLE MONAMIC # is a file writeable? .table color "default" ENUM_UNKNOWN DISP_TERMCAP||DISP_IBMPC # FIXME: implement this for all drivers "black" 0 "red" 1 "green" 2 "yellow" 3 !OPT_16_COLOR "brown" 3 OPT_16_COLOR "blue" 4 "magenta" 5 "cyan" 6 "white" 7 !OPT_16_COLOR "lightgray" 7 OPT_16_COLOR "gray" 8 OPT_16_COLOR "brightred" 9 OPT_16_COLOR "brightgreen" 10 OPT_16_COLOR "yellow" 11 OPT_16_COLOR "brightblue" 12 OPT_16_COLOR "brightmagenta" 13 OPT_16_COLOR "brightcyan" 14 OPT_16_COLOR "white" 15 OPT_16_COLOR .table bool "false" FALSE "true" TRUE .table popup "delayed" POPUP_CHOICES_DELAYED "immediate" POPUP_CHOICES_IMMED "off" POPUP_CHOICES_OFF .table backup "off" 0 ".bak" 1 "tilde" 2 SYS_UNIX # "tilde_N_existing", */ # "tilde_N", */ .table hilite "bold" VABOLD "color" VACOLOR "italic" VAITAL "none" 0 "reverse" VAREV "underline" VAUL "black" VACOL_0 OPT_COLOR "red" VACOL_1 OPT_COLOR "green" VACOL_2 OPT_COLOR "yellow" VACOL_3 OPT_COLOR&&!OPT_16_COLOR "brown" VACOL_3 OPT_COLOR&&OPT_16_COLOR "blue" VACOL_4 OPT_COLOR "magenta" VACOL_5 OPT_COLOR "cyan" VACOL_6 OPT_COLOR "white" VACOL_7 OPT_COLOR&&!OPT_16_COLOR "lightgray" VACOL_7 OPT_COLOR&&OPT_16_COLOR "gray" VACOL_8 OPT_COLOR&&OPT_16_COLOR "brightred" VACOL_9 OPT_COLOR&&OPT_16_COLOR "brightgreen" VACOL_A OPT_COLOR&&OPT_16_COLOR "yellow" VACOL_B OPT_COLOR&&OPT_16_COLOR "brightblue" VACOL_C OPT_COLOR&&OPT_16_COLOR "brightmagenta" VACOL_D OPT_COLOR&&OPT_16_COLOR "brightcyan" VACOL_E OPT_COLOR&&OPT_16_COLOR "white" VACOL_F OPT_COLOR&&OPT_16_COLOR