IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.
 
Index:
  [(1)
  addftinfo(1)
  addr2line(1)
  afmtodit(1)
  alias(1)
  alloc(1)
  apply(1)
  apropos(1)
  ar(1)
  as(1)
  asa(1)
  at(1)
  atq(1)
  atrm(1)
  awk(1)
  b64decode(1)
  b64encode(1)
  basename(1)
  batch(1)
  bc(1)
  bdes(1)
  bg(1)
  biff(1)
  bind(1)
  bindkey(1)
  brandelf(1)
  break(1)
  breaksw(1)
  bsdtar(1)
  bsnmpd(1)
  bthost(1)
  btsockstat(1)
  builtin(1)
  builtins(1)
  bunzip2(1)
  byacc(1)
  bzcat(1)
  bzegrep(1)
  bzfgrep(1)
  bzgrep(1)
  bzip2(1)
  c++(1)
  c89(1)
  c99(1)
  cal(1)
  calendar(1)
  cap_mkdb(1)
  case(1)
  cat(1)
  catman(1)
  cc(1)
  cd(1)
  cdcontrol(1)
  chdir(1)
  checknr(1)
  chflags(1)
  chfn(1)
  chgrp(1)
  chio(1)
  chkey(1)
  chmod(1)
  chpass(1)
  chsh(1)
  ci(1)
  ckdist(1)
  cksum(1)
  clear(1)
  cmp(1)
  co(1)
  col(1)
  colcrt(1)
  colldef(1)
  colrm(1)
  column(1)
  comm(1)
  command(1)
  compile_et(1)
  complete(1)
  compress(1)
  continue(1)
  cp(1)
  cpio(1)
  cpp(1)
  crontab(1)
  crunchgen(1)
  crunchide(1)
  crypt(1)
  csh(1)
  csplit(1)
  ctags(1)
  ctm(1)
  ctm_dequeue(1)
  ctm_rmail(1)
  ctm_smail(1)
  cu(1)
  cursor(1)
  cut(1)
  cvs(1)
  date(1)
  dc(1)
  dd(1)
  default(1)
  df(1)
  dialog(1)
  diff(1)
  diff3(1)
  dig(1)
  dirname(1)
  dirs(1)
  do(1)
  domainname(1)
  done(1)
  dtmfdecode(1)
  du(1)
  echo(1)
  echotc(1)
  ed(1)
  edit(1)
  ee(1)
  egrep(1)
  elfdump(1)
  elif(1)
  else(1)
  end(1)
  endif(1)
  endsw(1)
  enigma(1)
  env(1)
  eqn(1)
  esac(1)
  eval(1)
  ex(1)
  exec(1)
  exit(1)
  expand(1)
  export(1)
  expr(1)
  f77(1)
  false(1)
  fc(1)
  fdformat(1)
  fdread(1)
  fdwrite(1)
  fetch(1)
  fg(1)
  fgrep(1)
  fi(1)
  file(1)
  file2c(1)
  filetest(1)
  find(1)
  finger(1)
  flex++(1)
  flex(1)
  fmt(1)
  fold(1)
  fontedit(1)
  for(1)
  foreach(1)
  from(1)
  fstat(1)
  fsync(1)
  ftp(1)
  g++(1)
  g711conv(1)
  gate-ftp(1)
  gcc(1)
  gcore(1)
  gcov(1)
  gdb(1)
  gencat(1)
  gensnmptree(1)
  getNAME(1)
  getconf(1)
  getfacl(1)
  getopt(1)
  getopts(1)
  glob(1)
  goto(1)
  gperf(1)
  gprof(1)
  grep(1)
  grn(1)
  grodvi(1)
  groff(1)
  grog(1)
  grolbp(1)
  grolj4(1)
  grops(1)
  grotty(1)
  groups(1)
  gtar(1)
  gunzip(1)
  gzcat(1)
  gzexe(1)
  gzip(1)
  hash(1)
  hashstat(1)
  hd(1)
  head(1)
  hesinfo(1)
  hexdump(1)
  history(1)
  host(1)
  hostname(1)
  hpftodit(1)
  hup(1)
  id(1)
  ident(1)
  idprio(1)
  if(1)
  indent(1)
  indxbib(1)
  info(1)
  install-info(1)
  install(1)
  intro(1)
  introduction(1)
  ipcrm(1)
  ipcs(1)
  ipftest(1)
  ipnat(1)
  ipresend(1)
  ipsend(1)
  iptest(1)
  jobid(1)
  jobs(1)
  join(1)
  jot(1)
  kbdcontrol(1)
  kbdmap(1)
  kcon(1)
  kdestroy(1)
  kdump(1)
  kenv(1)
  keylogin(1)
  keylogout(1)
  kgdb(1)
  kill(1)
  killall(1)
  kinit(1)
  klist(1)
  kpasswd(1)
  krb5-config(1)
  ktrace(1)
  lam(1)
  last(1)
  lastcomm(1)
  ld-elf.so.1(1)
  ld(1)
  ld(1)
  ldd(1)
  leave(1)
  less(1)
  lesskey(1)
  lex++(1)
  lex(1)
  limit(1)
  limits(1)
  link(1)
  lint(1)
  lkbib(1)
  ln(1)
  loadfont(1)
  locale(1)
  locate(1)
  lock(1)
  lockf(1)
  log(1)
  logger(1)
  login(1)
  logins(1)
  logname(1)
  logout(1)
  look(1)
  lookbib(1)
  lorder(1)
  lp(1)
  lpq(1)
  lpr(1)
  lprm(1)
  lptest(1)
  ls-F(1)
  ls(1)
  lsvfs(1)
  m4(1)
  mail(1)
  mailq(1)
  mailx(1)
  make(1)
  makeinfo(1)
  makewhatis(1)
  man(1)
  manpath(1)
  md5(1)
  merge(1)
  mesg(1)
  minigzip(1)
  mkdep(1)
  mkdir(1)
  mkfifo(1)
  mklocale(1)
  mkstr(1)
  mktemp(1)
  mmroff(1)
  more(1)
  mptable(1)
  msgs(1)
  mt(1)
  mv(1)
  nawk(1)
  nc(1)
  ncal(1)
  ncplist(1)
  ncplogin(1)
  ncplogout(1)
  neqn(1)
  netstat(1)
  newaliases(1)
  newgrp(1)
  nex(1)
  nfsstat(1)
  nice(1)
  nl(1)
  nm(1)
  nohup(1)
  notify(1)
  nroff(1)
  nslookup(1)
  nvi(1)
  nview(1)
  objcopy(1)
  objdump(1)
  objformat(1)
  od(1)
  omshell(1)
  onintr(1)
  opieinfo(1)
  opiekey(1)
  opiepasswd(1)
  otp-md4(1)
  otp-md5(1)
  otp-sha(1)
  pagesize(1)
  passwd(1)
  paste(1)
  patch(1)
  pathchk(1)
  pawd(1)
  pax(1)
  pfbtops(1)
  pftp(1)
  pgrep(1)
  pic(1)
  pkg_add(1)
  pkg_check(1)
  pkg_create(1)
  pkg_delete(1)
  pkg_info(1)
  pkg_sign(1)
  pkg_version(1)
  pkill(1)
  popd(1)
  pr(1)
  printenv(1)
  printf(1)
  ps(1)
  psroff(1)
  pushd(1)
  pwd(1)
  quota(1)
  ranlib(1)
  rcp(1)
  rcs(1)
  rcsclean(1)
  rcsdiff(1)
  rcsfreeze(1)
  rcsintro(1)
  rcsmerge(1)
  read(1)
  readelf(1)
  readlink(1)
  readonly(1)
  realpath(1)
  red(1)
  ree(1)
  refer(1)
  rehash(1)
  repeat(1)
  reset(1)
  rev(1)
  rfcomm_sppd(1)
  rlog(1)
  rlogin(1)
  rm(1)
  rmd160(1)
  rmdir(1)
  rpcgen(1)
  rs(1)
  rsh(1)
  rtld(1)
  rtprio(1)
  rup(1)
  ruptime(1)
  rusers(1)
  rwall(1)
  rwho(1)
  sched(1)
  scon(1)
  scp(1)
  script(1)
  sdiff(1)
  sed(1)
  send-pr(1)
  sendbug(1)
  set(1)
  setenv(1)
  setfacl(1)
  settc(1)
  setty(1)
  setvar(1)
  sftp(1)
  sh(1)
  sha1(1)
  shar(1)
  shift(1)
  size(1)
  sleep(1)
  slogin(1)
  smbutil(1)
  sockstat(1)
  soelim(1)
  sort(1)
  source(1)
  split(1)
  sscop(1)
  ssh-add(1)
  ssh-agent(1)
  ssh-keygen(1)
  ssh-keyscan(1)
  ssh(1)
  startslip(1)
  stat(1)
  stop(1)
  strings(1)
  strip(1)
  stty(1)
  su(1)
  sum(1)
  suspend(1)
  switch(1)
  systat(1)
  tabs(1)
  tail(1)
  talk(1)
  tar(1)
  tbl(1)
  tcopy(1)
  tcpdump(1)
  tcpslice(1)
  tcsh(1)
  tee(1)
  telltc(1)
  telnet(1)
  test(1)
  texindex(1)
  tfmtodit(1)
  tftp(1)
  then(1)
  time(1)
  tip(1)
  top(1)
  touch(1)
  tput(1)
  tr(1)
  trace(1)
  trap(1)
  troff(1)
  true(1)
  truncate(1)
  truss(1)
  tset(1)
  tsort(1)
  tty(1)
  type(1)
  ul(1)
  ulimit(1)
  umask(1)
  unalias(1)
  uname(1)
  uncomplete(1)
  uncompress(1)
  unexpand(1)
  unhash(1)
  unifdef(1)
  unifdefall(1)
  uniq(1)
  units(1)
  unlimit(1)
  unlink(1)
  unset(1)
  unsetenv(1)
  until(1)
  unvis(1)
  uptime(1)
  usbhidaction(1)
  usbhidctl(1)
  users(1)
  uudecode(1)
  uuencode(1)
  uuidgen(1)
  vacation(1)
  vgrind(1)
  vi(1)
  vidcontrol(1)
  vidfont(1)
  view(1)
  vis(1)
  vt220keys(1)
  vttest(1)
  w(1)
  wait(1)
  wall(1)
  wc(1)
  what(1)
  whatis(1)
  where(1)
  whereis(1)
  which(1)
  while(1)
  who(1)
  whoami(1)
  whois(1)
  window(1)
  write(1)
  xargs(1)
  xstr(1)
  yacc(1)
  yes(1)
  ypcat(1)
  ypchfn(1)
  ypchpass(1)
  ypchsh(1)
  ypmatch(1)
  yppasswd(1)
  ypwhich(1)
  yyfix(1)
  zcat(1)
  zcmp(1)
  zdiff(1)
  zegrep(1)
  zfgrep(1)
  zforce(1)
  zgrep(1)
  zmore(1)
  znew(1)

nview(1)

NAME

       ex, vi, view - text editors


SYNOPSIS

       ex [-eFGRrSsv] [-c cmd] [-t tag] [-w size] [file ...]
       vi [-eFGlRrSv] [-c cmd] [-t tag] [-w size] [file ...]
       view [-eFGRrSv] [-c cmd] [-t tag] [-w size] [file ...]


LICENSE

       The  vi	program  is  freely redistributable.  You are welcome to copy,
       modify and share it with others under  the  conditions  listed  in  the
       LICENSE	file.	If any company (not individual!) finds vi sufficiently
       useful that you would have purchased it, or if any  company  wishes  to
       redistribute it, contributions to the authors would be appreciated.


DESCRIPTION

       Vi  is  a screen oriented text editor.  Ex is a line-oriented text edi-
       tor.  Ex and vi are different interfaces to the same program, and it is
       possible  to switch back and forth during an edit session.  View is the
       equivalent of using the -R (read-only) option of vi.

       This manual page is the one provided with the nex/nvi versions  of  the
       ex/vi  text  editors.   Nex/nvi	are intended as bug-for-bug compatible
       replacements for the original  Fourth  Berkeley	Software  Distribution
       (4BSD)  ex  and vi programs.  For the rest of this manual page, nex/nvi
       is used only when it's necessary to distinguish it  from  the  historic
       implementations of ex/vi.

       This  manual  page  is  intended for users already familiar with ex/vi.
       Anyone else should almost certainly read a good tutorial on the	editor
       before  this  manual page.  If you're in an unfamiliar environment, and
       you absolutely have to get work	done  immediately,  read  the  section
       after  the options description, entitled ``Fast Startup''.  It's proba-
       bly enough to get you going.

       The following options are available:

       -c     Execute cmd immediately after starting the edit  session.   Par-
	      ticularly  useful  for  initial positioning in the file, however
	      cmd is not limited to positioning commands.  This is  the  POSIX
	      1003.2 interface for the historic ``+cmd'' syntax.  Nex/nvi sup-
	      ports both the old and new syntax.

       -e     Start editing in ex mode, as if the command name were ex.

       -F     Don't copy the entire file when first starting  to  edit.   (The
	      default is to make a copy in case someone else modifies the file
	      during your edit session.)

       -l     Start editing with the lisp and showmatch options set.

       -G     Start editing in gtags mode, as if the gtagsmode option was set.

       -R     Start  editing  in  read-only  mode,  as if the command name was
	      view, or the readonly option was set.

       -s     Enter batch mode; applicable only to ex  edit  sessions.	 Batch
	      mode  is	useful	when running ex scripts.  Prompts, informative
	      messages and other user oriented message are turned off, and  no
	      startup  files  or  environment variables are read.  This is the
	      POSIX 1003.2 interface for the historic ``-'' argument.  Nex/nvi
	      supports both the old and new syntax.

       -t     Start editing at the specified tag.  (See ctags(1)).

       -w     Set the initial window size to the specified number of lines.

       -v     Start editing in vi mode, as if the command name was vi or view.

       Command input for ex/vi is read from the standard  input.   In  the  vi
       interface,  it is an error if standard input is not a terminal.	In the
       ex interface, if standard input is not a terminal, ex  will  read  com-
       mands  from  it	regardless,  however, the session will be a batch mode
       session, exactly as if the -s option had been specified.

       Ex/vi exits 0 on success, and greater than 0 if an error occurs.


FAST STARTUP

       This section will tell you the minimum amount that you need to do  sim-
       ple  editing  tasks  using  vi.	If you've never used any screen editor
       before, you're likely to have problems even with this simple  introduc-
       tion.   In  that case you should find someone that already knows vi and
       have them walk you through this section.

       Vi is a screen editor.  This means that it takes up almost  the	entire
       screen, displaying part of the file on each screen line, except for the
       last line of the screen.  The last line of the screen is used  for  you
       to give commands to vi, and for vi to give information to you.

       The other fact that you need to understand is that vi is a modeful edi-
       tor, i.e. you are either entering text or you are  executing  commands,
       and  you have to be in the right mode to do one or the other.  You will
       be in command mode when you first start editing a file.	There are com-
       mands  that  switch  you  into  input mode.  There is only one key that
       takes you out of input mode, and that is the <escape> key.  (Key  names
       are  written  using  less-than  and  greater-than signs, e.g.  <escape>
       means the ``escape'' key, usually labeled ``esc''  on  your  terminal's
       keyboard.)   If	you're	ever confused as to which mode you're in, keep
       entering the <escape> key until vi beeps at you.  (Generally,  vi  will
       beep  at  you  if you try and do something that's not allowed.  It will
       also display error messages.)

       To start editing a file, enter  the  command  ``vi  file_name<carriage-
       return>''.   The  command you should enter as soon as you start editing
       is ``:set verbose showmode<carriage-return>''.  This will make the edi-
       tor give you verbose error messages and display the current mode at the
       bottom of the screen.

       The commands to move around the file are:

       h      Move the cursor left one character.

       j      Move the cursor down one line.
       /text<carriage-return>
	      Search for the string ``text'' in the file, and move the	cursor
	      to its first character.

       The commands to enter new text are:

       a      Append new text, after the cursor.

       i      Insert new text, before the cursor.

       o      Open  a  new  line  below  the  line the cursor is on, and start
	      entering text.

       O      Open a new line above the line  the  cursor  is  on,  and  start
	      entering text.

       <escape>
	      Once you've entered input mode using the one of the a, i, O or o
	      commands, use <escape> to quit entering text and return to  com-
	      mand mode.

       The commands to copy text are:

       yy     Copy the line the cursor is on.

       p      Append the copied line after the line the cursor is on.

       The commands to delete text are:

       dd     Delete the line the cursor is on.

       x      Delete the character the cursor is on.

       The commands to write the file are:

       :w<carriage-return>
	      Write  the  file	back to the file with the name that you origi-
	      nally used as an argument on the vi command line.

       :w file_name<carriage-return>
	      Write the file back to the file with the name ``file_name''.

       The commands to quit editing and exit the editor are:

       :q<carriage-return>
	      Quit editing and leave vi (if you've modified the file, but  not
	      saved your changes, vi will refuse to quit).

       :q!<carriage-return>
	      Quit, discarding any modifications that you may have made.

       One final caution.  Unusual characters can take up more than one column
       on the screen, and long lines can take up more  than  a	single	screen
       line.   The  above  commands work on ``physical'' characters and lines,
       i.e. they affect the entire line no matter how  many  screen  lines  it
       takes  up and the entire character no matter how many screen columns it
       takes up.


       [count] <control-B>
	      Page backwards count screens.

       [count] <control-D>
	      Scroll forward count lines.

       [count] <control-E>
	      Scroll forward count lines, leaving the current line and	column
	      as is, if possible.

       [count] <control-F>
	      Page forward count screens.

       <control-G>
	      Display the file information.

       <control-H>

       [count] h
	      Move the cursor back count characters in the current line.

       [count] <control-J>

       [count] <control-N>

       [count] j
	      Move  the  cursor  down count lines without changing the current
	      column.

       <control-L>

       <control-R>
	      Repaint the screen.

       [count] <control-M>

       [count] +
	      Move the cursor down count lines to the first nonblank character
	      of that line.

       [count] <control-P>

       [count] k
	      Move  the  cursor  up  count lines, without changing the current
	      column.

       <control-T>
	      Return to the most recent tag context.

       <control-U>
	      Scroll backwards count lines.

       <control-W>
	      Switch to the next lower screen in the window, or, to the  first
	      screen if there are no lower screens in the window.

       <control-Y>

       <control-]>
	      Push a tag reference onto the tag stack.	In  gtagsmode,	if  at
	      the  first  column of line, locate function references otherwise
	      function definitions.

       <control-^>
	      Switch to the most recently edited file.

       [count] <space>

       [count] l
	      Move the cursor forward count characters	without  changing  the
	      current line.

       [count] ! motion shell-argument(s)
	      Replace text with results from a shell command.

       [count] # #|+|-
	      Increment or decrement the cursor number.

       [count] $
	      Move the cursor to the end of a line.

       %      Move to the matching character.

       &      Repeat the previous substitution command on the current line.

       '<character>

       `<character>
	      Return to a context marked by the character <character>.

       [count] (
	      Back up count sentences.

       [count] )
	      Move forward count sentences.

       [count] ,
	      Reverse find character count times.

       [count] -
	      Move to first nonblank of the previous line, count times.

       [count] .
	      Repeat the last vi command that modified text.

       /RE<carriage-return>

       /RE/ [offset]<carriage-return>

       ?RE<carriage-return>

       ?RE? [offset]<carriage-return>

       N


       [count] < motion

       [count] > motion
	      Shift lines left or right.

       @ buffer
	      Execute a named buffer.

       [count] A
	      Enter  input mode, appending the text after the end of the line.

       [count] B
	      Move backwards count bigwords.

       [buffer] [count] C
	      Change text from the current position to the end-of-line.

       [buffer] D
	      Delete text from the current position to the end-of-line.

       [count] E
	      Move forward count end-of-bigwords.

       [count] F <character>
	      Search count times backward through the current line for	<char-
	      acter>.

       [count] G
	      Move  to	line  count, or the last line of the file if count not
	      specified.

       [count] H
	      Move to the screen line count - 1 lines below  the  top  of  the
	      screen.

       [count] I
	      Enter  input  mode,  inserting  the text at the beginning of the
	      line.

       [count] J
	      Join lines.

       [count] L
	      Move to the screen line count - 1 lines above the bottom of  the
	      screen.

	M     Move to the screen line in the middle of the screen.

       [count] O
	      Enter input mode, appending text in a new line above the current
	      line.

       [buffer] P
	      Insert text from a buffer.

       Q      Exit vi (or visual) mode and switch to ex mode.

	      character after the specified <character>.

       U      Restore the current line to its state  before  the  cursor  last
	      moved to it.

       [count] W
	      Move forward count bigwords.

       [buffer] [count] X
	      Delete count characters before the cursor.

       [buffer] [count] Y
	      Copy (or ``yank'') count lines into the specified buffer.

       ZZ     Write the file and exit vi.

       [count] [[
	      Back up count section boundaries.

       [count] ]]
	      Move forward count section boundaries.

       ^      Move to first nonblank character on the current line.

       [count] _
	      Move down count - 1 lines, to the first nonblank character.

       [count] a
	      Enter input mode, appending the text after the cursor.

       [count] b
	      Move backwards count words.

       [buffer] [count] c motion
	      Change a region of text.

       [buffer] [count] d motion
	      Delete a region of text.

       [count] e
	      Move forward count end-of-words.

       [count] f<character>
	      Search  forward,	count  times,  through the rest of the current
	      line for <character>.

       [count] i
	      Enter input mode, inserting the text before the cursor.

       m <character>
	      Save the current context (line and column) as <character>.

       [count] o
	      Enter input mode, appending text in a new line under the current
	      line.

       [buffer] p
	      Append text from a buffer.
       [count] t <character>
	      Search forward, count times, through the current	line  for  the
	      character immediately before <character>.

       u      Undo the last change made to the file.

       [count] w
	      Move forward count words.

       [buffer] [count] x
	      Delete count characters.

       [buffer] [count] y motion
	      Copy  (or  ``yank'')  a  text  region specified by the count and
	      motion into a buffer.

       [count1] z [count2] -|.|+|^|<carriage-return>
	      Redraw, optionally repositioning and resizing the screen.

       [count] {
	      Move backward count paragraphs.

       [count] |
	      Move to a specific column position on the current line.

       [count] }
	      Move forward count paragraphs.

       [count] ~
	      Reverse the case of the next count character(s).

       [count] ~ motion
	      Reverse the case of the characters in a text region specified by
	      the count and motion.

       <interrupt>
	      Interrupt the current operation.


VI TEXT INPUT COMMANDS

       The  following  section	describes  the	commands available in the text
       input mode of the vi editor.

       <nul>  Replay the previous input.

       <control-D>
	      Erase to the previous shiftwidth column boundary.

       ^<control-D>
	      Erase all of the autoindent characters, and reset the autoindent
	      level.

       0<control-D>
	      Erase all of the autoindent characters.

       <control-T>
	      Insert  sufficient  <tab> and <space> characters to move forward
	      to the next shiftwidth column boundary.

       <escape>
	      Resolve all text input into the  file,  and  return  to  command
	      mode.

       <line erase>
	      Erase the current line.

       <control-W>

       <word erase>
	      Erase the last word.  The definition of word is dependent on the
	      altwerase and ttywerase options.

       <control-X>[0-9A-Fa-f]+
	      Insert a character with the specified hexadecimal value into the
	      text.

       <interrupt>
	      Interrupt text input mode, returning to command mode.


EX COMMANDS

       The  following  section describes the commands available in the ex edi-
       tor.  In each entry below, the tag line is a  usage  synopsis  for  the
       command.

       <end-of-file>
	      Scroll the screen.

       ! argument(s)

       [range]! argument(s)
	      Execute  a  shell  command, or filter lines through a shell com-
	      mand.

       "      A comment.

       [range] nu[mber] [count] [flags]

       [range] # [count] [flags]
	      Display the selected lines, each preceded with its line  number.

       @ buffer

       * buffer
	      Execute a buffer.

       [line] a[ppend][!]
	      The input text is appended after the specified line.

       [range] c[hange][!] [count]
	      The input text replaces the specified range.

       cs[cope] add | find | help | kill | reset
	      Execute a Cscope command.

       [range] d[elete] [buffer] [count] [flags]
	      Edit a different file.

       exu[sage] [command]
	      Display usage for an ex command.

       f[ile] [file]
	      Display and optionally change the file name.

       [Ff]g [name]
	      Vi mode only.  Foreground the specified screen.

       [range] g[lobal] /pattern/ [commands]

       [range] v /pattern/ [commands]
	      Apply commands to lines matching (or not matching) a pattern.

       he[lp] Display a help message.

       [line] i[nsert][!]
	      The input text is inserted before the specified line.

       [range] j[oin][!] [count] [flags]
	      Join lines of text together.

       [range] l[ist] [count] [flags]
	      Display the lines unambiguously.

       map[!] [lhs rhs]
	      Define or display maps (for vi only).

       [line] ma[rk] <character>

       [line] k <character>
	      Mark the line with the mark <character>.

       [range] m[ove] line
	      Move the specified lines after the target line.

       mk[exrc][!] file
	      Write  the  abbreviations, editor options and maps to the speci-
	      fied file.

       [Nn][ext][!] [file ...]
	      Edit the next file from the argument list.

       [line] o[pen] /pattern/ [flags]
	      Enter open mode.

       pre[serve]
	      Save the file in a form that can later be recovered using the ex
	      -r option.

       [Pp]rev[ious][!]
	      Edit the previous file from the argument list.

       [range] p[rint] [count] [flags]
	      Display the specified lines.


       rec[over] file
	      Recover file if it was previously saved.

       res[ize] [+|-]size
	      Vi mode only.  Grow or shrink the current screen.

       rew[ind][!]
	      Rewind the argument list.

       rta[g][!] tagstring
	      Edit the file referring the specified tag. (Only in gtagsmode)

       se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]
	      Display or set editor options.

       sh[ell]
	      Run a shell program.

       so[urce] file
	      Read and execute ex commands from a file.

       [range] s[ubstitute] [/pattern/replace/] [options] [count] [flags]

       [range] & [options] [count] [flags]

       [range] ~ [options] [count] [flags]
	      Make substitutions.

       su[spend][!]

       st[op][!]

       <suspend>
	      Suspend the edit session.

       [Tt]a[g][!] tagstring
	      Edit the file containing the specified tag.

       tagn[ext][!]
	      Edit the file containing the next context for the current tag.

       tagp[op][!] [file | number]
	      Pop to the specified tag in the tags stack.

       tagp[rev][!]
	      Edit  the  file  containing the previous context for the current
	      tag.

       unm[ap][!] lhs
	      Unmap a mapped string.

       ve[rsion]
	      Display the version of the ex/vi editor.

       [line] vi[sual] [type] [count] [flags]
	      Ex mode only.  Enter vi.

       [range] w[rite] [!] [file]

       [range] wn[!] [>>] [file]

       [range] wq[!] [>>] [file]
	      Write the file.

       [range] x[it][!] [file]
	      Write the file if it has been modified.

       [range] ya[nk] [buffer] [count]
	      Copy the specified lines to a buffer.

       [line] z [type] [count] [flags]
	      Adjust the window.


SET OPTIONS

       There are a large number of options that  may  be  set  (or  unset)  to
       change  the  editor's  behavior.   This	section describes the options,
       their abbreviations and their default values.

       In each entry below, the first part of the tag line is the full name of
       the  option,  followed  by  any	equivalent abbreviations.  The part in
       square brackets is the default  value  of  the  option.	 Most  of  the
       options are boolean, i.e. they are either on or off, and do not have an
       associated value.

       Options apply to both ex and vi modes, unless otherwise specified.

       altwerase [off]
	      Vi only.	Select an alternate word erase algorithm.

       autoindent, ai [off]
	      Automatically indent new lines.

       autoprint, ap [off]
	      Ex only.	Display the current line automatically.

       autowrite, aw [off]
	      Write modified files automatically when changing files.

       backup [""]
	      Backup files before they are overwritten.

       beautify, bf [off]
	      Discard control characters.

       cdpath [environment variable CDPATH, or current directory]
	      The directory paths used as path prefixes for the cd command.

       cedit [no default]
	      Set the character to edit the colon command-line history.

       columns, co [80]
	      Set the number of columns in the screen.

       comment [off]
	      stitute commands, instead of initializing them as unset for each
	      new command.

       errorbells, eb [off]
	      Ex only.	Announce error messages with a bell.

       exrc, ex [off]
	      Read the startup files in the local directory.

       extended [off]
	      Regular  expressions are extended (i.e.  egrep(1)-style) expres-
	      sions.

       filec [no default]
	      Set the character to perform file path completion on  the  colon
	      command line.

       flash [on]
	      Flash the screen instead of beeping the keyboard on error.

       gtagsmode, gt [off]
	      Use GTAGS and GRTAGS instead of tags.

       hardtabs, ht [8]
	      Set the spacing between hardware tab settings.

       iclower [off]
	      Makes  all  Regular  Expressions case-insensitive, as long as an
	      upper-case letter does not appear in the search string.

       ignorecase, ic [off]
	      Ignore case differences in regular expressions.

       keytime [6]
	      The 10th's of a second ex/vi waits for a subsequent key to  com-
	      plete a key mapping.

       leftright [off]
	      Vi only.	Do left-right scrolling.

       lines, li [24]
	      Vi only.	Set the number of lines in the screen.

       lisp [off]
	      Vi  only.   Modify  various  search commands and options to work
	      with Lisp.  This option is not yet implemented.

       list [off]
	      Display lines in an unambiguous fashion.

       lock [on]
	      Attempt to get an exclusive lock on any file being edited,  read
	      or written.

       magic [on]
	      Treat certain characters specially in regular expressions.

       matchtime [7]
	      This option will never be implemented.

       noprint [""]
	      Characters that are never handled as printable characters.

       number, nu [off]
	      Precede each line displayed with its current line number.

       octal [off]
	      Display  unknown	characters  as	octal  numbers, instead of the
	      default hexadecimal.

       open [on]
	      Ex only.	If this option is not set, the open  and  visual  com-
	      mands are disallowed.

       optimize, opt [on]
	      Vi  only.   Optimize  text  throughput  to dumb terminals.  This
	      option is not yet implemented.

       paragraphs, para [IPLPPPQPP LIpplpipbp]
	      Vi only.	Define additional paragraph boundaries for the { and }
	      commands.

       path []
	      Define  additional directories to search for files being edited.

       print [""]
	      Characters that are always handled as printable characters.

       prompt [on]
	      Ex only.	Display a command prompt.

       readonly, ro [off]
	      Mark the file and session as read-only.

       recdir [/var/tmp/vi.recover]
	      The directory where recovery files are stored.

       redraw, re [off]
	      Vi only.	Simulate an intelligent terminal on a dumb one.   This
	      option is not yet implemented.

       remap [on]
	      Remap keys until resolved.

       report [5]
	      Set  the	number of lines about which the editor reports changes
	      or yanks.

       ruler [off]
	      Vi only.	Display a row/column ruler on the colon command  line.

       scroll, scr [window / 2]
	      Set the number of lines scrolled.

       searchincr [off]
	      Makes the / and ?  commands incremental.
       shell, sh [environment variable SHELL, or /bin/sh]
	      Select the shell used by the editor.

       shellmeta [~{[*?$`'"\]
	      Set the meta characters checked to determine if file name expan-
	      sion is necessary.

       shiftwidth, sw [8]
	      Set the autoindent and shift command indentation width.

       showmatch, sm [off]
	      Vi  only.   Note	matching  ``{''  and ``('' for ``}'' and ``)''
	      characters.

       showmode, smd [off]
	      Vi only.	Display the current editor  mode  and  a  ``modified''
	      flag.

       sidescroll [16]
	      Vi only.	Set the amount a left-right scroll will shift.

       slowopen, slow [off]
	      Delay  display  updating	during text input.  This option is not
	      yet implemented.

       sourceany [off]
	      Read startup files not owned by the current user.   This	option
	      will never be implemented.

       tabstop, ts [8]
	      This option sets tab widths for the editor display.

       taglength, tl [0]
	      Set the number of significant characters in tag names.

       tags, tag [tags /var/db/libc.tags /sys/kern/tags]
	      Set the list of tags files.

       term, ttytype, tty [environment variable TERM]
	      Set the terminal type.

       terse [off]
	      This  option has historically made editor messages less verbose.
	      It has no effect in this implementation.

       tildeop [off]
	      Modify the ~ command to take an associated motion.

       timeout, to [on]
	      Time out on keys which may be mapped.

       ttywerase [off]
	      Vi only.	Select an alternate erase algorithm.

       verbose [off]
	      Vi only.	Display an error message for every error.

       w300 [no default]
	      Vi only.	Set the window size if the baud rate is  greater  than
	      1200 baud.

       warn [on]
	      Ex  only.   This option causes a warning message to the terminal
	      if the file has been modified, since it was last written, before
	      a !  command.

       window, w, wi [environment variable LINES]
	      Set the window size for the screen.

       windowname [off]
	      Change  the icon/window name to the current file name even if it
	      can't be restored on editor exit.

       wraplen, wl [0]
	      Vi only.	Break lines automatically,  the  specified  number  of
	      columns  from  the  left-hand  margin.   If both the wraplen and
	      wrapmargin edit options are set, the wrapmargin value is used.

       wrapmargin, wm [0]
	      Vi only.	Break lines automatically,  the  specified  number  of
	      columns  from  the  right-hand  margin.  If both the wraplen and
	      wrapmargin edit options are set, the wrapmargin value is used.

       wrapscan, ws [on]
	      Set searches to wrap around the end or beginning of the file.

       writeany, wa [off]
	      Turn off file-overwriting checks.


ENVIRONMENT VARIABLES

       COLUMNS
	      The number of columns on the screen.  This value	overrides  any
	      system  or terminal specific values.  If the COLUMNS environment
	      variable is not set when ex/vi runs, or the  columns  option  is
	      explicitly  reset  by  the user, ex/vi enters the value into the
	      environment.

       EXINIT A list of ex startup commands, read if the variable  NEXINIT  is
	      not set.

       HOME   The  user's  home  directory, used as the initial directory path
	      for the  startup	``$HOME/.nexrc''  and  ``$HOME/.exrc''	files.
	      This  value  is also used as the default directory for the vi cd
	      command.

       LINES  The number of rows on the screen.  This value overrides any sys-
	      tem or terminal specific values.	If the LINES environment vari-
	      able is not set when ex/vi runs, or the lines option is  explic-
	      itly reset by the user, ex/vi enters the value into the environ-
	      ment.

       NEXINIT
	      A list of ex startup commands.

       SHELL  The user's shell of choice (see also the shell option).


ASYNCHRONOUS EVENTS

       SIGALRM
	      Vi/ex uses this signal for periodic backups  of  file  modifica-
	      tions  and  to  display  ``busy''  messages  when operations are
	      likely to take a long time.

       SIGHUP

       SIGTERM
	      If the current buffer has changed since it was last  written  in
	      its  entirety,  the editor attempts to save the modified file so
	      it can be later recovered.  See the vi/ex Reference manual  sec-
	      tion entitled ``Recovery'' for more information.

       SIGINT When  an	interrupt occurs, the current operation is halted, and
	      the editor returns to the command level.	If interrupted	during
	      text  input, the text already input is resolved into the file as
	      if the text input had been normally terminated.

       SIGWINCH
	      The screen is resized.  See the vi/ex Reference  manual  section
	      entitled ``Sizing the Screen'' for more information.

       SIGCONT

       SIGQUIT

       SIGTSTP
	      Vi/ex ignores these signals.


FILES

       /bin/sh
	      The default user shell.

       /etc/vi.exrc
	      System-wide vi startup file.

       /tmp   Temporary file directory.

       /var/tmp/vi.recover
	      The default recovery file directory.

       $HOME/.nexrc
	      1st choice for user's home directory startup file.

       $HOME/.exrc
	      2nd choice for user's home directory startup file.

       .nexrc 1st choice for local directory startup file.

       .exrc  2nd choice for local directory startup file.


SEE ALSO

       ctags(1), more(1), curses(3), dbopen(3)

       The ``Vi Quick Reference'' card.

       ``An  Introduction  to  Display	Editing with Vi'', found in the ``UNIX

       ``Edit:	A  tutorial'', found in the ``UNIX User's Manual Supplementary
       Documents'' section of the 4.3BSD manual  set.	This  document	is  an
       introduction to a simple version of the ex screen editor.

       ``Ex/Vi	Reference  Manual'', found in the ``UNIX User's Manual Supple-
       mentary Documents'' section of the 4.4BSD manual set.  This document is
       the  final  reference  for  the nex/nvi text editors, as distributed in
       4.4BSD and 4.4BSD-Lite.

       Roff source for all of these documents is distributed with  nex/nvi  in
       the nvi/USD.doc directory of the nex/nvi source code.

       The  files  ``autowrite'',  ``input'',  ``quoting''  and ``structures''
       found in the nvi/docs/internals directory of the nex/nvi source code.


HISTORY

       The nex/nvi replacements for the ex/vi editor first appeared in 4.4BSD.


STANDARDS

       Nex/nvi	is close to IEEE Std1003.2 (``POSIX'').  That document differs
       from historical ex/vi practice in several places; there are changes  to
       be made on both sides.

3rd Berkeley Distribution      October 10, 1996 			 VI(1)

SPONSORED LINKS




Man(1) output converted with man2html , sed , awk