" ==================================================================== " " Ex/Vi Setup File " " Filename: $HOME/.exrc " Size: 8000 bytes " Last update: Thu Nov 20 20:20:20 CET 1997 " Available: " Purpose: Setup file for "ex" - the underlying editor of "vi" " Author: Sven Guckes " " " See also: VI Pages " VIM Pages " " If you ever come across this file - please send me an email about it! " All comments are welcome - especially improvements. Thanks! --Sven " " ==================================================================== " WARNING: This file contains control code characters! " Example: ^A, ^C, ^G, ^I, ^K, ^M, ^X, and ^[ (escape) " So do not "save" this file when viewing it with a web browser; " *download* it instead! " A viewer will interpret the data before it gets sent " to the screen and thus you may get other data. :-( " For the same reason you should encode Vi mappings as text before " sending it via email or posting on usenet! " Please use standard encoding, ie "uucode" or "base64"! " " ==================================================================== " HINT: " Check try the Vi clone "VIM" (Vi IMproved) as it has so many " improvements over Vi that will probably never want to go back! :-) " ==================================================================== " " ==================================================================== " Structure of this file: " ==================================================================== " There are three kinds of setup commands in this file: " Mappings ("map"), Settings ("set"), and abbreviations ("ab") " - Settings change the value of variables which affect commands. " - Mappings map a string to a command in command mode. " - Abbreviations define words to be replaced after they are typed in " (ie when typed in insert/append/open/replace mode). " " ==================================================================== " Installation: " ==================================================================== " Put this file into your home directory: cp file $HOME/.exrc " Check the effect of the exrc setup with the vi commands " ":set", ":map", and ":ab" after startup. " " ==================================================================== " Notes: " ==================================================================== " - Lines starting with an inverted comma (") are "comment lines". " You may know that '#' starts a comment in C source files - " but this does not hold with Vi. Sorry. " - To enable a set, map, or ab remove the commenting '"'. " - To unset a variable prepend "no" before the name, eg "set nonumber". " - To see all variables and values enter command ":set all". " " ==================================================================== " WARNING!! " ==================================================================== " vi will stop reading the exrc at the first empty line. " All lines after the first empty line will *not* be read. :-( " Therefore: *Never* use empty lines in your exrc! " Put a '"' at the beginning instead! " You can insert an empty line to disable the rest of the exrc on " purpose, of course. ;-) " " ==================================================================== " " OK, here we go: " " ==================================================================== " Settings - Info: http://www.math.fu-berlin.de/~guckes/vi/ " ==================================================================== set noautoindent set autoprint set autowrite " set directory=~/tmp set noerrorbells " set flash " set hardtabs=8 set noignorecase " set nolisp " set nolist " set magic " set mesg set nonumber " set redraw set report=2 " set scroll " set shell " set shiftwidth " set showmatch set showmode set noslowopen set tabstop=8 " set term set noterse " set warn " set window " set wrapscan set wrapmargin=8 " set writeany " " ==================================================================== " Mappings " ==================================================================== " " Unmapped keys (no commands) of standard vi: " Unmapped lower keys: g q v " Unmapped upper keys: K V " Unmapped control-keys: ^A ^C ^K ^O ^X ^\ ^_ " NOTE: Mapping of ^D is dangerous as some implementations of Vi " stop reading the exrc file when they encounter a literal ^D ! " " ==================================================================== " Unmapped lower keys: " g q v " " map g 1G " map q :x " map v  " " ==================================================================== " Unmapped upper keys: " K V " " map K k " map V  " map V mz} bmx:'z,'x!fmt map V 0!}par w76 " " ==================================================================== " Unmapped control-keys: " ^A ^C ^K ^O ^X ^\ ^_ " map  ^ " map   " map CTRL-D not recommended! map d$ " map   " map   " map   map   " " ==================================================================== " More examples for mappings: " " CTRL-T: Jump to an older tag stack entry. " Mapping ^T to move the current line to the top screen line: " map ^T z " " ';': Repeat the last "current-line search command" (fFtT). " Remap to: " Change to ex mode when types a semicolon (instead of a colon): " map ; : " " 'm': Set mark of following letter ([a-zA-Z]) at current position. " Mapping 'm' to format current paragraph unto end with "fmt -c": " map m !} fmt -c " " 'T': Jump backward till after the next typed character. " Mapping 'T' to sort current paragraph unto end with "sort": " map T !} sort " " ==================================================================== " Abbreviations " ==================================================================== " " Examples: " ab YDD Donaudampfschiffahrtgesellschaftskapitaenwitwenrentengesetz ab YLL LLanfairpwllgwyngyllgogerychwyrndrobwllllantisiliogogogoch ab Yalpha abcdefghijklmnopqrstuvwxyz ab YALPHA ABCDEFGHIJKLMNOPQRSTUVWXYZ ab Ypass "You are in a maze of twisty little passages, all alike." ab Ysuper supercalifragilisticexpialidocious ab MYemail guckes@math.fu-berlin.de ab Yupsidedown umop-ap!sdn " " ======================================================================= " LaTeX: " Enter an "environment" and continue insert between begin and end: " ab Ybe \begin{foo} \end{foo}O " ======================================================================= " " " ==================================================================== " Example output of ":set all" : " ==================================================================== " :set all " noautoindent nonumber noslowopen " autoprint nonovice nosourceany " autowrite nooptimize tabstop=8 " nobeautify paragraphs=IPLPPPQPP LIpplpipnpbtaglength=0 " directory=/var/tmp prompt tags=tags /usr/lib/tags " noedcompatible noreadonly tagstack " noerrorbells redraw term=vt100 " flash remap noterse " hardtabs=8 report=2 timeout " noignorecase scroll=11 ttytype=vt100 " nolisp sections=NHSHH HUuhsh+c warn " nolist shell=/Vol/pub/bin/zsh window=23 " magic shiftwidth=8 wrapscan " mesg noshowmatch wrapmargin=8 " nomodeline showmode nowriteany " =================================================================END