Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1has/vi.1has
          +++ new/usr/src/man/man1has/vi.1has
↓ open down ↓ 104 lines elided ↑ open up ↑
 105  105  .fi
 106  106  
 107  107  .LP
 108  108  .nf
 109  109  \fB/usr/xpg6/bin/vedit\fR [\fB-|\fR \fB-s\fR] [\fB-l\fR] [\fB-L\fR] [\fB-R\fR] [\fB-r\fR [\fIfilename\fR]]
 110  110       [\fB-S\fR] [\fB-t\fR \fItag\fR] [\fB-v\fR] [\fB-V\fR] [\fB-x\fR] [\fB-w\fR\fIn\fR] [\fB-C\fR]
 111  111       [\fB+\fR\fIcommand\fR | \fB-c\fR \fIcommand\fR] \fIfilename\fR...
 112  112  .fi
 113  113  
 114  114  .SH DESCRIPTION
 115      -.sp
 116  115  .LP
 117  116  The \fBvi\fR (visual) utility is a display-oriented text editor based on an
 118  117  underlying line editor \fBex\fR. It is possible to use the command mode of
 119  118  \fBex\fR from within \fBvi\fR and to use the command mode of \fBvi\fR from
 120  119  within \fBex\fR. The visual commands are described on this manual page; how to
 121  120  set options (like automatically numbering lines and automatically starting a
 122  121  new output line when you type carriage return) and all \fBex\fR line editor
 123  122  commands are described on the \fBex\fR(1) manual page.
 124  123  .sp
 125  124  .LP
↓ open down ↓ 4 lines elided ↑ open up ↑
 130  129  .LP
 131  130  The \fBview\fR invocation is the same as \fBvi\fR except that the
 132  131  \fBreadonly\fR flag is set.
 133  132  .sp
 134  133  .LP
 135  134  The \fBvedit\fR invocation is intended for beginners. It is the same as
 136  135  \fBvi\fR except that the \fBreport\fR flag is set to \fB1\fR, the
 137  136  \fBshowmode\fR and \fBnovice\fR flags are set, and \fBmagic\fR is turned off.
 138  137  These defaults make it easier to learn how to use \fBvi\fR.
 139  138  .SH OPTIONS
 140      -.sp
 141  139  .LP
 142      -The following options are supporrted:
      140 +The following options are supported:
 143  141  .SS "Invocation Options"
 144      -.sp
 145  142  .LP
 146  143  The following invocation options are interpreted by \fBvi\fR (previously
 147  144  documented options are discussed under NOTES):
 148  145  .sp
 149  146  .ne 2
 150  147  .na
 151  148  \fB\fB\(mi\fR | \fB-s\fR\fR
 152  149  .ad
 153  150  .RS 25n
 154  151  Suppresses all interactive user feedback. This is useful when processing editor
↓ open down ↓ 127 lines elided ↑ open up ↑
 282  279  .ne 2
 283  280  .na
 284  281  \fB\fB-\fR\fIcommand\fR | \fB-c\fR \fIcommand\fR\fR
 285  282  .ad
 286  283  .RS 25n
 287  284  Begins editing by executing the specified editor \fIcommand\fR (usually a
 288  285  search or positioning command).
 289  286  .RE
 290  287  
 291  288  .SS "/usr/xpg4/bin/vi and /usr/xpg6/bin/vi"
 292      -.sp
 293  289  .LP
 294  290  If both the \fB-t\fR \fItag\fR and the \fB-c\fR \fIcommand\fR options are
 295      -given, the \fB-t\fR \fItag\fR optionis processed first. That is, the file
      291 +given, the \fB-t\fR \fItag\fR option is processed first. That is, the file
 296  292  containing \fItag\fR is selected by \fB-t\fR and then the command is executed.
 297  293  .SH OPERANDS
 298      -.sp
 299  294  .LP
 300  295  The following operands are supported:
 301  296  .sp
 302  297  .ne 2
 303  298  .na
 304  299  \fB\fIfilename\fR\fR
 305  300  .ad
 306  301  .RS 12n
 307  302  A file to be edited.
 308  303  .RE
 309  304  
 310  305  .SH COMMAND SUMMARY
 311      -.sp
 312  306  .LP
 313  307  The \fBvi\fR command modes are summarized in this section.
 314  308  .SS "vi Modes"
 315      -.sp
 316  309  .ne 2
 317  310  .na
 318  311  \fBCommand\fR
 319  312  .ad
 320  313  .RS 13n
 321  314  Normal and initial mode. Other modes return to command mode upon completion.
 322  315  \fIESC\fR (escape) is used to cancel a partial command.
 323  316  .RE
 324  317  
 325  318  .sp
↓ open down ↓ 19 lines elided ↑ open up ↑
 345  338  .ne 2
 346  339  .na
 347  340  \fBLast line\fR
 348  341  .ad
 349  342  .RS 13n
 350  343  Reading input for \fB: / ?\fR or \fB!\fR. Terminate by typing a carriage
 351  344  return. An interrupt cancels termination.
 352  345  .RE
 353  346  
 354  347  .SS "Sample Commands"
 355      -.sp
 356  348  .LP
 357  349  In the descriptions, \fICR\fR stands for carriage return and \fIESC\fR stands
 358  350  for the escape key.
 359  351  .sp
 360  352  .ne 2
 361  353  .na
 362  354  \fB\(<-, \(->\fR
 363  355  .ad
 364  356  .br
 365  357  .na
↓ open down ↓ 127 lines elided ↑ open up ↑
 493  485  .sp
 494  486  .ne 2
 495  487  .na
 496  488  \fB:\fIcmd\fR\fICR\fR\fR
 497  489  .ad
 498  490  .RS 14n
 499  491  any \fBex\fR or \fBed\fR command
 500  492  .RE
 501  493  
 502  494  .SS "Counts Before vi Commands"
 503      -.sp
 504  495  .LP
 505  496  Numbers can be typed as a prefix to some commands. They are interpreted in one
 506  497  of these ways:
 507  498  .sp
 508  499  .ne 2
 509  500  .na
 510  501  \fBline/column number\fR
 511  502  .ad
 512  503  .RS 22n
 513  504  z  G  |
↓ open down ↓ 11 lines elided ↑ open up ↑
 525  516  .sp
 526  517  .ne 2
 527  518  .na
 528  519  \fBrepeat effect\fR
 529  520  .ad
 530  521  .RS 22n
 531  522  most of the rest
 532  523  .RE
 533  524  
 534  525  .SS "Interrupting, Canceling"
 535      -.sp
 536  526  .ne 2
 537  527  .na
 538  528  \fB\fIESC\fR\fR
 539  529  .ad
 540  530  .RS 7n
 541  531  end insert or incomplete command
 542  532  .RE
 543  533  
 544  534  .sp
 545  535  .ne 2
 546  536  .na
 547  537  \fB\fIDEL\fR\fR
 548  538  .ad
 549  539  .RS 7n
 550  540  (delete or rubout) interrupts
 551  541  .RE
 552  542  
 553  543  .SS "File Manipulation"
 554      -.sp
 555  544  .ne 2
 556  545  .na
 557  546  \fBZZ\fR
 558  547  .ad
 559  548  .RS 15n
 560  549  if file modified, write and exit; otherwise, exit
 561  550  .RE
 562  551  
 563  552  .sp
 564  553  .ne 2
↓ open down ↓ 156 lines elided ↑ open up ↑
 721  710  .RS 15n
 722  711  position cursor to \fItag\fR
 723  712  .RE
 724  713  
 725  714  .sp
 726  715  .LP
 727  716  In general, any \fBex\fR or \fBed\fR command (such as \fIsubstitute\fR or
 728  717  \fIglobal\fR) can be typed, preceded by a colon and followed by a carriage
 729  718  return.
 730  719  .SS "Positioning Within a File"
 731      -.sp
 732  720  .ne 2
 733  721  .na
 734  722  \fBF\fR
 735  723  .ad
 736  724  .RS 14n
 737  725  forward screen
 738  726  .RE
 739  727  
 740  728  .sp
 741  729  .ne 2
↓ open down ↓ 143 lines elided ↑ open up ↑
 885  873  .sp
 886  874  .ne 2
 887  875  .na
 888  876  \fB%\fR
 889  877  .ad
 890  878  .RS 14n
 891  879  find matching \fB( )\fR or \fB{ }\fR
 892  880  .RE
 893  881  
 894  882  .SS "Adjusting the Screen"
 895      -.sp
 896  883  .ne 2
 897  884  .na
 898  885  \fB^L\fR
 899  886  .ad
 900  887  .RS 16n
 901  888  clear and redraw window
 902  889  .RE
 903  890  
 904  891  .sp
 905  892  .ne 2
↓ open down ↓ 61 lines elided ↑ open up ↑
 967  954  .sp
 968  955  .ne 2
 969  956  .na
 970  957  \fB^Y\fR
 971  958  .ad
 972  959  .RS 16n
 973  960  scroll window up one line
 974  961  .RE
 975  962  
 976  963  .SS "Marking and Returning"
 977      -.sp
 978  964  .ne 2
 979  965  .na
 980  966  \fB\(ga\(ga\fR
 981  967  .ad
 982  968  .RS 12n
 983  969  move cursor to previous context
 984  970  .RE
 985  971  
 986  972  .sp
 987  973  .ne 2
↓ open down ↓ 25 lines elided ↑ open up ↑
1013  999  .sp
1014 1000  .ne 2
1015 1001  .na
1016 1002  \fBa\'\fIx\fR\fR
1017 1003  .ad
1018 1004  .RS 12n
1019 1005  move cursor to first non-white space in line marked by \fIx\fR
1020 1006  .RE
1021 1007  
1022 1008  .SS "Line Positioning"
1023      -.sp
1024 1009  .ne 2
1025 1010  .na
1026 1011  \fBH\fR
1027 1012  .ad
1028 1013  .RS 14n
1029 1014  top line on screen
1030 1015  .RE
1031 1016  
1032 1017  .sp
1033 1018  .ne 2
↓ open down ↓ 60 lines elided ↑ open up ↑
1094 1079  .ad
1095 1080  .br
1096 1081  .na
1097 1082  \fBor \fBk\fR\fR
1098 1083  .ad
1099 1084  .RS 14n
1100 1085  previous line, same column
1101 1086  .RE
1102 1087  
1103 1088  .SS "Character Positioning"
1104      -.sp
1105 1089  .ne 2
1106 1090  .na
1107 1091  \fB^\fR
1108 1092  .ad
1109 1093  .RS 13n
1110 1094  first non-white space character
1111 1095  .RE
1112 1096  
1113 1097  .sp
1114 1098  .ne 2
↓ open down ↓ 115 lines elided ↑ open up ↑
1230 1214  .sp
1231 1215  .ne 2
1232 1216  .na
1233 1217  \fB%\fR
1234 1218  .ad
1235 1219  .RS 13n
1236 1220  find matching \fB( )\fR or \fB{ }\fR
1237 1221  .RE
1238 1222  
1239 1223  .SS "Words, Sentences, Paragraphs"
1240      -.sp
1241 1224  .ne 2
1242 1225  .na
1243 1226  \fBw\fR
1244 1227  .ad
1245 1228  .RS 5n
1246 1229  forward a word
1247 1230  .RE
1248 1231  
1249 1232  .sp
1250 1233  .ne 2
↓ open down ↓ 70 lines elided ↑ open up ↑
1321 1304  .sp
1322 1305  .ne 2
1323 1306  .na
1324 1307  \fBE\fR
1325 1308  .ad
1326 1309  .RS 5n
1327 1310  end of a blank-delimited word
1328 1311  .RE
1329 1312  
1330 1313  .SS "Corrections During Insert"
1331      -.sp
1332 1314  .ne 2
1333 1315  .na
1334 1316  \fB^H\fR
1335 1317  .ad
1336 1318  .RS 16n
1337 1319  erase last character (backspace)
1338 1320  .RE
1339 1321  
1340 1322  .sp
1341 1323  .ne 2
↓ open down ↓ 80 lines elided ↑ open up ↑
1422 1404  .sp
1423 1405  .ne 2
1424 1406  .na
1425 1407  \fB^V\fR
1426 1408  .ad
1427 1409  .RS 16n
1428 1410  quote non-printable character
1429 1411  .RE
1430 1412  
1431 1413  .SS "Insert and Replace"
1432      -.sp
1433 1414  .ne 2
1434 1415  .na
1435 1416  \fBa\fR
1436 1417  .ad
1437 1418  .RS 12n
1438 1419  append after cursor
1439 1420  .RE
1440 1421  
1441 1422  .sp
1442 1423  .ne 2
↓ open down ↓ 52 lines elided ↑ open up ↑
1495 1476  .sp
1496 1477  .ne 2
1497 1478  .na
1498 1479  \fBR\fItext\fR\fIESC\fR\fR
1499 1480  .ad
1500 1481  .RS 12n
1501 1482  replace characters
1502 1483  .RE
1503 1484  
1504 1485  .SS "Operators"
1505      -.sp
1506 1486  .LP
1507 1487  Operators are followed by a cursor motion and affect all text that would have
1508 1488  been moved over. For example, since \fBw\fR moves over a word, \fBdw\fR deletes
1509 1489  the word that would be moved over. Double the operator, for example \fBdd\fR,
1510 1490  to affect whole lines.
1511 1491  .sp
1512 1492  .ne 2
1513 1493  .na
1514 1494  \fBd\fR
1515 1495  .ad
↓ open down ↓ 40 lines elided ↑ open up ↑
1556 1536  .sp
1557 1537  .ne 2
1558 1538  .na
1559 1539  \fB!\fR
1560 1540  .ad
1561 1541  .RS 5n
1562 1542  filter through command
1563 1543  .RE
1564 1544  
1565 1545  .SS "Miscellaneous Operations"
1566      -.sp
1567 1546  .ne 2
1568 1547  .na
1569 1548  \fBC\fR
1570 1549  .ad
1571 1550  .RS 5n
1572 1551  change rest of line (\fBc$\fR)
1573 1552  .RE
1574 1553  
1575 1554  .sp
1576 1555  .ne 2
↓ open down ↓ 52 lines elided ↑ open up ↑
1629 1608  .sp
1630 1609  .ne 2
1631 1610  .na
1632 1611  \fBY\fR
1633 1612  .ad
1634 1613  .RS 5n
1635 1614  yank lines (\fByy\fR)
1636 1615  .RE
1637 1616  
1638 1617  .SS "Yank and Put"
1639      -.sp
1640 1618  .LP
1641 1619  Put inserts the text most recently deleted or yanked; however, if a buffer is
1642 1620  named (using the \fBASCII\fR lower-case letters \fBa\fR - \fBz\fR), the text in
1643 1621  that buffer is put instead.
1644 1622  .sp
1645 1623  .ne 2
1646 1624  .na
1647 1625  \fB3yy\fR
1648 1626  .ad
1649 1627  .RS 7n
↓ open down ↓ 48 lines elided ↑ open up ↑
1698 1676  .sp
1699 1677  .ne 2
1700 1678  .na
1701 1679  \fB"\fIx\fRd\fR
1702 1680  .ad
1703 1681  .RS 7n
1704 1682  delete into buffer \fIx\fR
1705 1683  .RE
1706 1684  
1707 1685  .SS "Undo, Redo, Retrieve"
1708      -.sp
1709 1686  .ne 2
1710 1687  .na
1711 1688  \fBu\fR
1712 1689  .ad
1713 1690  .RS 7n
1714 1691  undo last change
1715 1692  .RE
1716 1693  
1717 1694  .sp
1718 1695  .ne 2
↓ open down ↓ 16 lines elided ↑ open up ↑
1735 1712  .sp
1736 1713  .ne 2
1737 1714  .na
1738 1715  \fB"\fId\fRp\fR
1739 1716  .ad
1740 1717  .RS 7n
1741 1718  retrieve \fId\fR'th last delete
1742 1719  .RE
1743 1720  
1744 1721  .SH USAGE
1745      -.sp
1746 1722  .LP
1747 1723  See \fBlargefile\fR(5) for the description of the behavior of \fBvi\fR and
1748 1724  \fBview\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
1749 1725  bytes).
1750 1726  .SH ENVIRONMENT VARIABLES
1751      -.sp
1752 1727  .LP
1753 1728  See \fBenviron\fR(5) for descriptions of the following environment variables
1754 1729  that affect the execution of \fBvi\fR: \fBLANG\fR, \fBLC_ALL\fR,
1755 1730  \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR,
1756 1731  \fBNLSPATH\fR, \fBPATH\fR, \fBSHELL\fR, and \fBTERM\fR.
1757 1732  .sp
1758 1733  .ne 2
1759 1734  .na
1760 1735  \fB\fBCOLUMNS\fR\fR
1761 1736  .ad
↓ open down ↓ 16 lines elided ↑ open up ↑
1778 1753  .ne 2
1779 1754  .na
1780 1755  \fB\fBLINES\fR\fR
1781 1756  .ad
1782 1757  .RS 11n
1783 1758  Override the system-selected vertical screen size, used as the number of lines
1784 1759  in a screenful and the vertical screen size in visual mode.
1785 1760  .RE
1786 1761  
1787 1762  .SH FILES
1788      -.sp
1789 1763  .ne 2
1790 1764  .na
1791 1765  \fB\fB/var/tmp\fR\fR
1792 1766  .ad
1793 1767  .sp .6
1794 1768  .RS 4n
1795 1769  default directory where temporary work files are placed; it can be changed
1796 1770  using the \fBdirectory\fR option (see the \fBex\fR(1) command)
1797 1771  .RE
1798 1772  
↓ open down ↓ 11 lines elided ↑ open up ↑
1810 1784  .ne 2
1811 1785  .na
1812 1786  \fB\fB/usr/lib/.COREterm/?/*\fR\fR
1813 1787  .ad
1814 1788  .sp .6
1815 1789  .RS 4n
1816 1790  subset of compiled terminal description database
1817 1791  .RE
1818 1792  
1819 1793  .SH ATTRIBUTES
1820      -.sp
1821 1794  .LP
1822 1795  See \fBattributes\fR(5) for descriptions of the following attributes:
1823 1796  .SS "/usr/bin/vi, /usr/bin/view, /usr/bin/vedit"
1824      -.sp
1825      -
1826      -.sp
1827 1797  .TS
1828 1798  box;
1829 1799  c | c
1830 1800  l | l .
1831 1801  ATTRIBUTE TYPE  ATTRIBUTE VALUE
1832 1802  _
1833 1803  CSI     Not enabled
1834 1804  .TE
1835 1805  
1836 1806  .SS "/usr/xpg4/bin/vi, /usr/xpg4/bin/view, /usr/xpg4/bin/vedit"
1837      -.sp
1838      -
1839      -.sp
1840 1807  .TS
1841 1808  box;
1842 1809  c | c
1843 1810  l | l .
1844 1811  ATTRIBUTE TYPE  ATTRIBUTE VALUE
1845 1812  _
1846 1813  CSI     Enabled
1847 1814  _
1848 1815  Interface Stability     Standard
1849 1816  .TE
1850 1817  
1851 1818  .SS "/usr/xpg6/bin/vi, /usr/xpg6/bin/view, /usr/xpg6/bin/vedit"
1852      -.sp
1853      -
1854      -.sp
1855 1819  .TS
1856 1820  box;
1857 1821  c | c
1858 1822  l | l .
1859 1823  ATTRIBUTE TYPE  ATTRIBUTE VALUE
1860 1824  _
1861 1825  CSI     Enabled
1862 1826  _
1863 1827  Interface Stability     Standard
1864 1828  .TE
1865 1829  
1866 1830  .SH SEE ALSO
1867      -.sp
1868 1831  .LP
1869 1832  \fBIntro\fR(1), \fBctags\fR(1), \fBed\fR(1), \fBedit\fR(1), \fBex\fR(1),
1870 1833  \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
1871 1834  .sp
1872 1835  .LP
1873 1836  \fISolaris Advanced User\&'s Guide\fR
1874 1837  .SH AUTHOR
1875      -.sp
1876 1838  .LP
1877 1839  \fBvi\fR and \fBex\fR were developed by The University of California, Berkeley
1878 1840  California, Computer Science Division, Department of Electrical Engineering and
1879 1841  Computer Science.
1880 1842  .SH NOTES
1881      -.sp
1882 1843  .LP
1883 1844  Two options, although they continue to be supported, have been replaced in the
1884 1845  documentation by options that follow the Command Syntax Standard (see
1885 1846  \fBIntro\fR(1)). An \fB-r\fR option that is not followed with an
1886 1847  option-argument has been replaced by \fB-L\fR and \fB+\fR\fBcommand\fR has been
1887 1848  replaced by \fB-c\fR \fBcommand\fR.
1888 1849  .sp
1889 1850  .LP
1890 1851  The message \fBfile too large to recover with\fR \fB-r\fR \fBoption\fR, which
1891 1852  is seen when a file is loaded, indicates that the file can be edited and saved
↓ open down ↓ 73 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX