Annotation of 43BSDReno/share/doc/usd/15.vi/vi.summary, revision 1.1

1.1     ! root        1: .\" Copyright (c) 1980 The Regents of the University of California.
        !             2: .\" All rights reserved.
        !             3: .\"
        !             4: .\" Redistribution and use in source and binary forms are permitted
        !             5: .\" provided that the above copyright notice and this paragraph are
        !             6: .\" duplicated in all such forms and that any documentation,
        !             7: .\" advertising materials, and other materials related to such
        !             8: .\" distribution and use acknowledge that the software was developed
        !             9: .\" by the University of California, Berkeley.  The name of the
        !            10: .\" University may not be used to endorse or promote products derived
        !            11: .\" from this software without specific prior written permission.
        !            12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            14: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            15: .\"
        !            16: .\"    @(#)vi.summary  6.2 (Berkeley) 11/27/89
        !            17: .\"
        !            18: .ds CH
        !            19: .ds CF
        !            20: .de TS
        !            21: .br
        !            22: .if !\\n(1T .RT
        !            23: .ul 0
        !            24: .ti \\n(.iu
        !            25: .if t .sp 0.25
        !            26: .if n .sp
        !            27: .if \\$1H .TQ
        !            28: .nr IX 1
        !            29: ..
        !            30: .nr PS 9
        !            31: .ps 9
        !            32: .nr VS 11
        !            33: .vs 11
        !            34: .nr HM .50i
        !            35: .nr FM .25i
        !            36: .nr PO 0
        !            37: .po 0
        !            38: .nr LL 3.5i
        !            39: .ll 3.5i
        !            40: .de nc
        !            41: .bp
        !            42: ..
        !            43: .de h
        !            44: .LG
        !            45: .B
        !            46: \\$1
        !            47: .R
        !            48: .NL
        !            49: ..
        !            50: .LG
        !            51: .LG
        !            52: .B
        !            53: .ce
        !            54: Ex Quick Reference
        !            55: .R
        !            56: .NL
        !            57: .LP
        !            58: .LP
        !            59: .h "Entering/leaving ex"
        !            60: .TS
        !            61: aw(1.4i)b aw(1.8i).
        !            62: % ex \fIname\fP        edit \fIname\fP, start at end
        !            63: % ex +\fIn\fP \fIname\fP       ... at line \fIn\fP
        !            64: % ex \-t \fItag\fP     start at \fItag\fP
        !            65: % ex \-r       list saved files
        !            66: % ex \-r \fIname\fP    recover file \fIname\fP
        !            67: % ex \fIname\fP ...    edit first; rest via \fB:n\fP
        !            68: % ex \-R \fIname\fP    read only mode
        !            69: : x    exit, saving changes
        !            70: : q!   exit, discarding changes
        !            71: .TE
        !            72: .h "Ex states"
        !            73: .TS
        !            74: lw(1i) lw(2.0i).
        !            75: Command        T{
        !            76: Normal and initial state.  Input prompted for by \fB:\fP.
        !            77: Your kill character cancels partial command.
        !            78: T}
        !            79: Insert T{
        !            80: Entered by \fBa\fP \fBi\fP and \fBc\fP.
        !            81: Arbitrary text then terminates with line having only \fB.\fP
        !            82: character on it or abnormally with interrupt.
        !            83: T}
        !            84: Open/visual    T{
        !            85: Entered by \fBopen\fP or \fBvi\fP, terminates with \fBQ\fP
        !            86: or ^\e.
        !            87: T}
        !            88: .TE
        !            89: .h "Ex commands"
        !            90: .TS
        !            91: lw(.45i) lw(.08i)b lw(.45i) lw(.08i)b lw(.45i) lw(.08i)b.
        !            92: abbrev ab      next    n       unabbrev        una
        !            93: append a       number  nu      undo    u
        !            94: args   ar      open    o       unmap   unm
        !            95: change c       preserve        pre     version ve
        !            96: copy   co      print   p       visual  vi
        !            97: delete d       put     pu      write   w
        !            98: edit   e       quit    q       xit     x
        !            99: file   f       read    re      yank    ya
        !           100: global g       recover rec     \fIwindow\fP    z
        !           101: insert i       rewind  rew     \fIescape\fP    !
        !           102: join   j       set     se      \fIlshift\fP    <
        !           103: list   l       shell   sh      \fIprint next\fP        \fRCR\fP
        !           104: map            source  so      \fIresubst\fP   &
        !           105: mark   ma      stop    st      \fIrshift\fP    >
        !           106: move   m       substitute      s       \fIscroll\fP    ^D
        !           107: .TE
        !           108: .h "Ex command addresses"
        !           109: .TS
        !           110: lw(.3i)b lw(0.8i) lw(.3i)b lw(0.8i).
        !           111: \fIn\fP        line \fIn\fP    /\fIpat\fP      next with \fIpat\fP
        !           112: \&.    current ?\fIpat\fP      previous with \fIpat\fP
        !           113: $      last    \fIx\fP-\fIn\fP \fIn\fP before \fIx\fP
        !           114: +      next    \fIx\fP,\fIy\fP \fIx\fP through \fIy\fP
        !           115: \-     previous        \(aa\fIx\fP     marked with \fIx\fP
        !           116: +\fIn\fP       \fIn\fP forward \(aa\(aa        previous context
        !           117: %      1,$
        !           118: .TE
        !           119: .nc
        !           120: .h "Specifying terminal type"
        !           121: .TS
        !           122: aw(1.7i)b aw(1.5i).
        !           123: % setenv TERM \fItype\fP       \fIcsh\fP and all version 6
        !           124: $ TERM=\fItype\fP; export TERM \fIsh\fP in Version 7
        !           125: See also \fItset\fR(1)
        !           126: .TE
        !           127: .h "Some terminal types"
        !           128: .TS
        !           129: lw(.4i) lw(.4i) lw(.4i) lw(.4i) lw(.4i).
        !           130: 2621   43      adm31   dw1     h19
        !           131: 2645   733     adm3a   dw2     i100
        !           132: 300s   745     c100    gt40    mime
        !           133: 33     act4    dm1520  gt42    owl
        !           134: 37     act5    dm2500  h1500   t1061
        !           135: 4014   adm3    dm3025  h1510   vt52
        !           136: .TE
        !           137: .h "Initializing options"
        !           138: .TS
        !           139: lw(.9i)b aw(1.5i).
        !           140: EXINIT place \fBset\fP's here in environment var.
        !           141: set \fIx\fP    enable option
        !           142: set no\fIx\fP  disable option
        !           143: set \fIx\fP=\fIval\fP  give value \fIval\fP
        !           144: set    show changed options
        !           145: set all        show all options
        !           146: set \fIx\fP?   show value of option \fIx\fP
        !           147: .TE
        !           148: .h "Useful options"
        !           149: .TS
        !           150: lw(.9i)b lw(.3i) lw(1.0i).
        !           151: autoindent     ai      supply indent
        !           152: autowrite      aw      write before changing files
        !           153: ignorecase     ic      in scanning
        !           154: lisp           \fB( ) { }\fP are s-exp's
        !           155: list           print ^I for tab, $ at end
        !           156: magic          \fB. [ *\fP special in patterns
        !           157: number nu      number lines
        !           158: paragraphs     para    macro names which start ...
        !           159: redraw         simulate smart terminal
        !           160: scroll         command mode lines
        !           161: sections       sect    macro names ...
        !           162: shiftwidth     sw      for \fB< >\fP, and input \fB^D\fP
        !           163: showmatch      sm      to \fB)\fP and \fB}\fP as typed
        !           164: slowopen       slow    choke updates during insert
        !           165: window         visual mode lines
        !           166: wrapscan       ws      around end of buffer?
        !           167: wrapmargin     wm      automatic line splitting
        !           168: .TE
        !           169: .LP
        !           170: .h "Scanning pattern formation"
        !           171: .TS
        !           172: aw(.9i)b aw(1.0i).
        !           173: \(ua   beginning of line
        !           174: $      end of line
        !           175: \fB.\fR        any character
        !           176: \e<    beginning of word
        !           177: \e>    end of word
        !           178: [\fIstr\fP]    any char in \fIstr\fP
        !           179: [\(ua\fIstr\fP]        ... not in \fIstr\fP
        !           180: [\fIx\-y\fP]   ... between \fIx\fP and \fIy\fP
        !           181: *      any number of preceding
        !           182: .TE
        !           183: .nc
        !           184: .LP
        !           185: .LG
        !           186: .LG
        !           187: .B
        !           188: .ce
        !           189: Vi Quick Reference
        !           190: .NL
        !           191: .R
        !           192: .LP
        !           193: .LP
        !           194: .h "Entering/leaving vi"
        !           195: .TS
        !           196: aw(1.4i)b aw(1.8i).
        !           197: % vi \fIname\fP        edit \fIname\fP at top
        !           198: % vi +\fIn\fP \fIname\fP       ... at line \fIn\fP
        !           199: % vi + \fIname\fP      ... at end
        !           200: % vi \-r       list saved files
        !           201: % vi \-r \fIname\fP    recover file \fIname\fP
        !           202: % vi \fIname\fP ...    edit first; rest via \fB:n\fP
        !           203: % vi \-t \fItag\fP     start at \fItag\fP
        !           204: % vi +/\fIpat\fP \fIname\fP    search for \fIpat\fP
        !           205: % view \fIname\fP      read only mode
        !           206: ZZ     exit from vi, saving changes
        !           207: ^Z     stop vi for later resumption
        !           208: .TE
        !           209: .h "The display"
        !           210: .TS
        !           211: lw(.75i) lw(2.2i).
        !           212: Last line      T{
        !           213: Error messages, echoing input to \fB: / ?\fP and \fB!\fR,
        !           214: feedback about i/o and large changes.
        !           215: T}
        !           216: @ lines        On screen only, not in file.
        !           217: ~ lines        Lines past end of file.
        !           218: ^\fIx\fP       Control characters, ^? is delete.
        !           219: tabs   Expand to spaces, cursor at last.
        !           220: .TE
        !           221: .LP
        !           222: .h "Vi states"
        !           223: .TS
        !           224: lw(.75i) lw(2.2i).
        !           225: Command        T{
        !           226: Normal and initial state.  Others return here.
        !           227: ESC (escape) cancels partial command.
        !           228: T}
        !           229: Insert T{
        !           230: Entered by \fBa i A I o O c C s S\fP \fBR\fP.
        !           231: Arbitrary text then terminates with ESC character,
        !           232: or abnormally with interrupt.
        !           233: T}
        !           234: Last line      T{
        !           235: Reading input for \fB: / ?\fP or \fB!\fP; terminate
        !           236: with ESC or CR to execute, interrupt to cancel.
        !           237: T}
        !           238: .TE
        !           239: .h "Counts before vi commands"
        !           240: .TS
        !           241: lw(1.5i) lw(1.7i)b.
        !           242: line/column number     z  G  | 
        !           243: scroll amount  ^D  ^U
        !           244: replicate insert       a  i  A  I
        !           245: repeat effect  \fRmost rest\fP
        !           246: .TE
        !           247: .h "Simple commands"
        !           248: .TS
        !           249: lw(1.5i)b lw(1.7i).
        !           250: dw     delete a word
        !           251: de     ... leaving punctuation
        !           252: dd     delete a line
        !           253: 3dd    ... 3 lines
        !           254: i\fItext\fP\fRESC\fP   insert text \fIabc\fP
        !           255: cw\fInew\fP\fRESC\fP   change word to \fInew\fP
        !           256: ea\fIs\fP\fRESC\fP     pluralize word
        !           257: xp     transpose characters
        !           258: .TE
        !           259: .nc
        !           260: .h "Interrupting, cancelling"
        !           261: .TS
        !           262: aw(0.75i)b aw(1.6i).
        !           263: ESC    end insert or incomplete cmd
        !           264: ^?     (delete or rubout) interrupts
        !           265: ^L     reprint screen if \fB^?\fR scrambles it
        !           266: .TE
        !           267: .h "File manipulation"
        !           268: .TS
        !           269: aw(0.75i)b aw(1.6i).
        !           270: :w     write back changes
        !           271: :wq    write and quit
        !           272: :q     quit
        !           273: :q!    quit, discard changes
        !           274: :e \fIname\fP  edit file \fIname\fP
        !           275: :e!    reedit, discard changes
        !           276: :e + \fIname\fP        edit, starting at end
        !           277: :e +\fIn\fR    edit starting at line \fIn\fR
        !           278: :e #   edit alternate file
        !           279: ^\(ua  synonym for \fB:e #\fP
        !           280: :w \fIname\fP  write file \fIname\fP
        !           281: :w! \fIname\fP overwrite file \fIname\fP
        !           282: :sh    run shell, then return
        !           283: :!\fIcmd\fP    run \fIcmd\fR, then return
        !           284: :n     edit next file in arglist
        !           285: :n \fIargs\fP  specify new arglist
        !           286: :f     show current file and line
        !           287: ^G     synonym for \fB:f\fP
        !           288: :ta \fItag\fP  to tag file entry \fItag\fP
        !           289: ^]     \fB:ta\fP, following word is \fItag\fP
        !           290: .TE
        !           291: .h "Positioning within file"
        !           292: .TS
        !           293: aw(0.75i)b aw(1.6i).
        !           294: ^F     forward screenfull
        !           295: ^B     backward screenfull
        !           296: ^D     scroll down half screen
        !           297: ^U     scroll up half screen
        !           298: G      goto line (end default)
        !           299: /\fIpat\fR     next line matching \fIpat\fR
        !           300: ?\fIpat\fR     prev line matching \fIpat\fR
        !           301: n      repeat last \fB/\fR or \fB?\fR
        !           302: N      reverse last \fB/\fR or \fB?\fR
        !           303: /\fIpat\fP/+\fIn\fP    n'th line after \fIpat\fR
        !           304: ?\fIpat\fP?\-\fIn\fP   n'th line before \fIpat\fR
        !           305: ]]     next section/function
        !           306: [[     previous section/function
        !           307: %      find matching \fB( ) {\fP or \fB}\fP
        !           308: .TE
        !           309: .h "Adjusting the screen"
        !           310: .TS
        !           311: aw(0.75i)b aw(1.6i).
        !           312: ^L     clear and redraw
        !           313: ^R     retype, eliminate @ lines
        !           314: z\fRCR\fP      redraw, current at window top
        !           315: z\-    ... at bottom
        !           316: z\|.   ... at center
        !           317: /\fIpat\fP/z\- \fIpat\fP line at bottom
        !           318: z\fIn\fP\|.    use \fIn\fP line window
        !           319: ^E     scroll window down 1 line
        !           320: ^Y     scroll window up 1 line
        !           321: .TE
        !           322: .nc
        !           323: .h "Marking and returning
        !           324: .TS
        !           325: aw(0.5i)b aw(2.0i).
        !           326: \(ga\(ga       previous context
        !           327: \(aa\(aa       ... at first non-white in line
        !           328: m\fIx\fP       mark position with letter \fIx\fP
        !           329: \(ga\fIx\fP    to mark \fIx\fP
        !           330: \(aa\fIx\fP    ... at first non-white in line
        !           331: .TE
        !           332: .h "Line positioning"
        !           333: .TS
        !           334: aw(0.5i)b aw(2.0i).
        !           335: H      home window line
        !           336: L      last window line
        !           337: M      middle window line
        !           338: +      next line, at first non-white
        !           339: \-     previous line, at first non-white
        !           340: \fRCR\fP       return, same as +
        !           341: \(da \fRor\fP j        next line, same column
        !           342: \(ua \fRor\fP k        previous line, same column
        !           343: .TE
        !           344: .h "Character positioning"
        !           345: .TS
        !           346: aw(0.5i)b aw(2.0i).
        !           347: \(ua   first non white
        !           348: 0      beginning of line
        !           349: $      end of line
        !           350: h \fRor\fP \(->        forward
        !           351: l \fRor\fP \(<-        backwards
        !           352: ^H     same as \fB\(<-\fP
        !           353: \fRspace\fP    same as \fB\(->\fP
        !           354: f\fIx\fP       find \fIx\fP forward
        !           355: F\fIx\fP       \fBf\fR backward
        !           356: t\fIx\fP       upto \fIx\fP forward
        !           357: T\fIx\fP       back upto \fIx\fP
        !           358: ;      repeat last \fBf F t\fP or \fBT\fP
        !           359: ,      inverse of \fB;\fP
        !           360: |      to specified column
        !           361: %      find matching \fB( { )\fP or \fB}\fR
        !           362: .TE
        !           363: .h "Words, sentences, paragraphs"
        !           364: .TS
        !           365: aw(0.5i)b aw(2.0i).
        !           366: w      word forward
        !           367: b      back word
        !           368: e      end of word
        !           369: )      to next sentence
        !           370: }      to next paragraph
        !           371: (      back sentence
        !           372: {      back paragraph
        !           373: W      blank delimited word
        !           374: B      back \fBW\fP
        !           375: E      to end of \fBW\fP
        !           376: .TE
        !           377: .h "Commands for \s-2LISP\s0"
        !           378: .TS
        !           379: aw(0.5i)b aw(2.0i).
        !           380: )      Forward s-expression
        !           381: }      ... but don't stop at atoms
        !           382: (      Back s-expression
        !           383: {      ... but don't stop at atoms
        !           384: .TE
        !           385: .nc
        !           386: .h "Corrections during insert"
        !           387: .TS
        !           388: aw(.5i)b aw(2.0i).
        !           389: ^H     erase last character
        !           390: ^W     erases last word
        !           391: \fRerase\fP    your erase, same as \fB^H\fP
        !           392: \fRkill\fP     your kill, erase input this line
        !           393: \e     escapes \fB^H\fR, your erase and kill
        !           394: \fRESC\fP      ends insertion, back to command
        !           395: ^?     interrupt, terminates insert
        !           396: ^D     backtab over \fIautoindent\fP
        !           397: \(ua^D kill \fIautoindent\fP, save for next
        !           398: 0^D    ... but at margin next also
        !           399: ^V     quote non-printing character
        !           400: .TE
        !           401: .h "Insert and replace"
        !           402: .TS
        !           403: aw(.5i)b aw(2.0i).
        !           404: a      append after cursor
        !           405: i      insert before
        !           406: A      append at end of line
        !           407: I      insert before first non-blank
        !           408: o      open line below
        !           409: O      open above
        !           410: r\fIx\fP       replace single char with \fIx\fP
        !           411: R      replace characters
        !           412: .TE
        !           413: .h "Operators (double to affect lines)"
        !           414: .TS
        !           415: aw(0.5i)b aw(2.0i).
        !           416: d      delete
        !           417: c      change
        !           418: <      left shift
        !           419: >      right shift
        !           420: !      filter through command
        !           421: \&\=   indent for \s-2LISP\s0
        !           422: y      yank lines to buffer
        !           423: .TE
        !           424: .h "Miscellaneous operations"
        !           425: .TS
        !           426: aw(0.5i)b aw(2.0i).
        !           427: C      change rest of line
        !           428: D      delete rest of line
        !           429: s      substitute chars
        !           430: S      substitute lines
        !           431: J      join lines
        !           432: x      delete characters
        !           433: X      ... before cursor
        !           434: Y      yank lines
        !           435: .TE
        !           436: .h "Yank and put"
        !           437: .TS
        !           438: aw(0.5i)b aw(2.0i).
        !           439: p      put back lines
        !           440: P      put before
        !           441: "\fIx\fPp      put from buffer \fIx\fP
        !           442: "\fIx\fPy      yank to buffer \fIx\fP
        !           443: "\fIx\fPd      delete into buffer \fIx\fP
        !           444: .TE
        !           445: .h "Undo, redo, retrieve"
        !           446: .TS
        !           447: aw(0.5i)b aw(2.0i).
        !           448: u      undo last change
        !           449: U      restore current line
        !           450: \fB.\fP        repeat last change
        !           451: "\fId\fP\|p    retrieve \fId\fP'th last delete
        !           452: .TE

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.