The vi environment variables, File saving and loading – I.R.I.S. DC1100 User Manual

Page 59

Advertising
background image

Coaxial Networks, Inc.

Page 59 of 60

ƒ refer to ex manual page for more commands


The vi
environment variables


set

You can customize your environment with this command by typing set var=value,
this will set the specified var to value for a scalar variable. For Boolean variables, use
set var

to set and set novar to unset. You can see which variables are set by just

typing the set by itsself. You can see a list of all variables by typing set all. Some
environment variables are specific to the ex editor and some are specific to the vi editor. I
have included both.

Boolean variables:

ƒ autoindent(ai) -- begin editing next line at same level of

indent-ion as this one.

ƒ autowrite(aw) -- write current buffer before leaving
ƒ exrc(ex) -- tells vi/ex if it should read the .exrc file in the

current directory.

ƒ errorbells -- editor sends a beep to the terminal when an

incorrect

ƒ ignorecase(ic) -- ignore case of characters in searches.
ƒ list -- place a $ at the end of each line and a ^I on each tab.
ƒ magic -- allow ., [, and * to be interpreted as special

characters in RE's.

ƒ number(nu) -- number lines in left margin
ƒ showmatch(sm) -- when closing a paren., brace or bracket; move

the visual cursor to opening item to check scope

ƒ showmode(smd) -- show type of insert mode
ƒ wrapscan(ws) -- when searching and at bottom of file, continue

searching from the top

ƒ scalar variables:
ƒ shiftwidth -- number of spaces to to insert on a shift operation


File Saving and Loading

ƒ :wq -- write file and quit
ƒ :w -- write file
ƒ :w file -- write to specified file
ƒ :w! -- overwrite existing file
ƒ :e file -- edit new file
ƒ :r file -- put contents of file
ƒ :q -- quit the editor
ƒ :q! -- force quit the editor, do not save changes
ƒ :x -- quit the editor, save file if it was modified
ƒ ZZ -- quit the editor, save file if it was modified

Advertising
This manual is related to the following products: