comparison runtime/doc/insert.txt @ 819:23f82b5d2814 v7.0c10

updated for version 7.0c10
author vimboss
date Wed, 05 Apr 2006 20:41:53 +0000
parents 1f929f3ca806
children 57c7403f6599
comparison
equal deleted inserted replaced
818:1f929f3ca806 819:23f82b5d2814
1 *insert.txt* For Vim version 7.0c. Last change: 2006 Mar 29 1 *insert.txt* For Vim version 7.0c. Last change: 2006 Apr 05
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
1002 List. 1002 List.
1003 *complete-items* 1003 *complete-items*
1004 Each list item can either be a string or a Dictionary. When it is a string it 1004 Each list item can either be a string or a Dictionary. When it is a string it
1005 is used as the completion. When it is a Dictionary it can contain these 1005 is used as the completion. When it is a Dictionary it can contain these
1006 items: 1006 items:
1007 word the completion, mandatory 1007 word the text that will be inserted, mandatory
1008 abbr abbreviation of "word", to be used in the menu 1008 abbr abbreviation of "word"; when not empty it is used in
1009 menu extra text for the popup menu 1009 the menu instead of "word"
1010 info more information about the item 1010 menu extra text for the popup menu, after "word" or "abbr"
1011 info more information about the item, can be displayed in a
1012 preview window
1011 kind single letter indicating the type of completion 1013 kind single letter indicating the type of completion
1012 icase when non-zero case is to be ignored; when omitted 1014 icase when non-zero case is to be ignored; when omitted
1013 the 'ignorecase' option is used 1015 the 'ignorecase' option is used
1014 1016
1015 All of these except 'icase' must be a string. If an item does not meet these 1017 All of these except 'icase' must be a string. If an item does not meet these
1289 Script completes: 1291 Script completes:
1290 1292
1291 - after $ variables name 1293 - after $ variables name
1292 - if variable was declared as object add "->", if tags file is available show 1294 - if variable was declared as object add "->", if tags file is available show
1293 name of class 1295 name of class
1296 - after "->" complete only function and variable names specific for given
1297 class. To find class location and contents tags file is required. Because
1298 PHP isn't strongly typed language user can use @var tag to declare class: >
1299
1300 /* @var $myVar myClass */
1301 $myVar->
1302 <
1303 Still, to find myClass contents tags file is required.
1294 1304
1295 - function names with additonal info: 1305 - function names with additonal info:
1296 - in case of built-in functions list of possible arguments and after | type 1306 - in case of built-in functions list of possible arguments and after | type
1297 data returned by function 1307 data returned by function
1298 - in case of user function arguments and name of file were function was 1308 - in case of user function arguments and name of file were function was
1372 1382
1373 Completion for the SQL language includes statements, functions, keywords. 1383 Completion for the SQL language includes statements, functions, keywords.
1374 It will also dynamically complete tables, procedures, views and column lists 1384 It will also dynamically complete tables, procedures, views and column lists
1375 with data pulled directly from within a database. For detailed instructions 1385 with data pulled directly from within a database. For detailed instructions
1376 and a tutorial see |omni-sql-completion|. 1386 and a tutorial see |omni-sql-completion|.
1387
1388 The SQL completion plugin can be used in conjunction with other completion
1389 plugins. For example, the PHP filetype has it's own completion plugin.
1390 Since PHP is often used to generate dynamic website by accessing a database,
1391 the SQL completion plugin can also be enabled. This allows you to complete
1392 PHP code and SQL code at the same time.
1377 1393
1378 1394
1379 XML *ft-xml-omni* 1395 XML *ft-xml-omni*
1380 1396
1381 Vim 7 provides mechanism to context aware completion of XML files. It depends 1397 Vim 7 provides mechanism to context aware completion of XML files. It depends
1632 1648
1633 ============================================================================== 1649 ==============================================================================
1634 10. Inserting a file *inserting-file* 1650 10. Inserting a file *inserting-file*
1635 1651
1636 *:r* *:re* *:read* 1652 *:r* *:re* *:read*
1637 :r[ead] [name] Insert the file [name] (default: current file) below 1653 :r[ead] [++opt] [name]
1654 Insert the file [name] (default: current file) below
1638 the cursor. 1655 the cursor.
1639 1656 See |++opt| for the possible values of [++opt].
1640 :{range}r[ead] [name] Insert the file [name] (default: current file) below 1657
1658 :{range}r[ead] [++opt] [name]
1659 Insert the file [name] (default: current file) below
1641 the specified line. 1660 the specified line.
1661 See |++opt| for the possible values of [++opt].
1642 1662
1643 *:r!* *:read!* 1663 *:r!* *:read!*
1644 :r[ead] !{cmd} Execute {cmd} and insert its standard output below 1664 :r[ead] !{cmd} Execute {cmd} and insert its standard output below
1645 the cursor. A temporary file is used to store the 1665 the cursor. A temporary file is used to store the
1646 output of the command which is then read into the 1666 output of the command which is then read into the
1660 line (sorry, this is Vi compatible). 1680 line (sorry, this is Vi compatible).
1661 1681
1662 If a file name is given with ":r", it becomes the alternate file. This can be 1682 If a file name is given with ":r", it becomes the alternate file. This can be
1663 used, for example, when you want to edit that file instead: ":e! #". This can 1683 used, for example, when you want to edit that file instead: ":e! #". This can
1664 be switched off by removing the 'a' flag from the 'cpoptions' option. 1684 be switched off by removing the 'a' flag from the 'cpoptions' option.
1685
1686 Of the [++opt] arguments one is specifically for ":read", the ++edit argument.
1687 This is useful when the ":read" command is actually used to read a file into
1688 the buffer as if editing that file. Use this command in an empty buffer: >
1689 :read ++edit filename
1690 The effect is that the 'fileformat', 'fileencoding', 'bomb', etc. options are
1691 set to what has been detected for "filename". Note that a single empty line
1692 remains, you may want to delete it.
1665 1693
1666 *file-read* 1694 *file-read*
1667 The 'fileformat' option sets the <EOL> style for a file: 1695 The 'fileformat' option sets the <EOL> style for a file:
1668 'fileformat' characters name ~ 1696 'fileformat' characters name ~
1669 "dos" <CR><NL> or <NL> DOS format 1697 "dos" <CR><NL> or <NL> DOS format