comparison runtime/doc/insert.txt @ 13125:371ceeebbdaa

Update runtime files. commit https://github.com/vim/vim/commit/40962ec9c0e7b8699e101182b06ddd39dc0e1212 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 28 22:47:25 2018 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Jan 2018 23:00:08 +0100
parents 45987b1b77dc
children e0dcfd3dbb52
comparison
equal deleted inserted replaced
13124:49582a2e8b16 13125:371ceeebbdaa
1 *insert.txt* For Vim version 8.0. Last change: 2017 Nov 23 1 *insert.txt* For Vim version 8.0. Last change: 2018 Jan 26
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
431 \ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S'))) 431 \ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S')))
432 inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.')) 432 inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.'))
433 inoremap ( ()<C-G>U<Left> 433 inoremap ( ()<C-G>U<Left>
434 434
435 This makes it possible to use the cursor keys in Insert mode, without breaking 435 This makes it possible to use the cursor keys in Insert mode, without breaking
436 the undo sequence and therefore using |.| (redo) will work as expected. 436 the undo sequence and therefore using |.| (redo) will work as expected.
437 Also entering a text like (with the "(" mapping from above): > 437 Also entering a text like (with the "(" mapping from above): >
438 438
439 Lorem ipsum (dolor 439 Lorem ipsum (dolor
440 440
441 will be repeatable by the |.|to the expected 441 will be repeatable by the |.|to the expected
1471 1471
1472 4. After ':' or ':foo' Symbol name (beginning with 'foo') 1472 4. After ':' or ':foo' Symbol name (beginning with 'foo')
1473 1473
1474 Notes: 1474 Notes:
1475 - Vim will load/evaluate code in order to provide completions. This may 1475 - Vim will load/evaluate code in order to provide completions. This may
1476 cause some code execution, which may be a concern. This is no longer 1476 cause some code execution, which may be a concern. This is no longer
1477 enabled by default, to enable this feature add > 1477 enabled by default, to enable this feature add >
1478 let g:rubycomplete_buffer_loading = 1 1478 let g:rubycomplete_buffer_loading = 1
1479 <- In context 1 above, Vim can parse the entire buffer to add a list of 1479 <- In context 1 above, Vim can parse the entire buffer to add a list of
1480 classes to the completion results. This feature is turned off by default, 1480 classes to the completion results. This feature is turned off by default,
1481 to enable it add > 1481 to enable it add >
1527 JavaScript and many more. The syntax plugin will only include syntax groups 1527 JavaScript and many more. The syntax plugin will only include syntax groups
1528 that begin with the filetype, "php", in this case. For example these syntax 1528 that begin with the filetype, "php", in this case. For example these syntax
1529 groups are included by default with the PHP: phpEnvVar, phpIntVar, 1529 groups are included by default with the PHP: phpEnvVar, phpIntVar,
1530 phpFunctions. 1530 phpFunctions.
1531 1531
1532 If you wish non-filetype syntax items to also be included, you can use a 1532 If you wish non-filetype syntax items to also be included, you can use a
1533 regular expression syntax (added in version 13.0 of autoload\syntaxcomplete.vim) 1533 regular expression syntax (added in version 13.0 of
1534 to add items. Looking at the output from ":syntax list" while editing a PHP file 1534 autoload\syntaxcomplete.vim) to add items. Looking at the output from
1535 I can see some of these entries: > 1535 ":syntax list" while editing a PHP file I can see some of these entries: >
1536 htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects 1536 htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
1537 1537
1538 To pick up any JavaScript and HTML keyword syntax groups while editing a PHP 1538 To pick up any JavaScript and HTML keyword syntax groups while editing a PHP
1539 file, you can use 3 different regexs, one for each language. Or you can 1539 file, you can use 3 different regexs, one for each language. Or you can
1540 simply restrict the include groups to a particular value, without using 1540 simply restrict the include groups to a particular value, without using
1541 a regex string: > 1541 a regex string: >
1542 let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+' 1542 let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+'
1543 let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods' 1543 let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
1544 < 1544 <
1545 The basic form of this variable is: > 1545 The basic form of this variable is: >
1548 The PHP language has an enormous number of items which it knows how to syntax 1548 The PHP language has an enormous number of items which it knows how to syntax
1549 highlight. These items will be available within the omni completion list. 1549 highlight. These items will be available within the omni completion list.
1550 1550
1551 Some people may find this list unwieldy or are only interested in certain 1551 Some people may find this list unwieldy or are only interested in certain
1552 items. There are two ways to prune this list (if necessary). If you find 1552 items. There are two ways to prune this list (if necessary). If you find
1553 certain syntax groups you do not wish displayed you can use two different 1553 certain syntax groups you do not wish displayed you can use two different
1554 methods to identify these groups. The first specifically lists the syntax 1554 methods to identify these groups. The first specifically lists the syntax
1555 groups by name. The second uses a regular expression to identify both 1555 groups by name. The second uses a regular expression to identify both
1556 syntax groups. Simply add one the following to your vimrc: > 1556 syntax groups. Simply add one the following to your vimrc: >
1557 let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant' 1557 let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
1558 let g:omni_syntax_group_exclude_php = 'php\w*Constant' 1558 let g:omni_syntax_group_exclude_php = 'php\w*Constant'
1559 1559
1560 Add as many syntax groups to this list by comma separating them. The basic 1560 Add as many syntax groups to this list by comma separating them. The basic
1573 vimrc: > 1573 vimrc: >
1574 let g:omni_syntax_use_iskeyword = 0 1574 let g:omni_syntax_use_iskeyword = 0
1575 1575
1576 For plugin developers, the plugin exposes a public function OmniSyntaxList. 1576 For plugin developers, the plugin exposes a public function OmniSyntaxList.
1577 This function can be used to request a List of syntax items. When editing a 1577 This function can be used to request a List of syntax items. When editing a
1578 SQL file (:e syntax.sql) you can use the ":syntax list" command to see the 1578 SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
1579 various groups and syntax items. For example: > 1579 various groups and syntax items. For example: >
1580 syntax list 1580 syntax list
1581 1581
1582 Yields data similar to this: > 1582 Yields data similar to this:
1583 sqlOperator xxx some prior all like and any escape exists in is not 1583 sqlOperator xxx some prior all like and any escape exists in is not ~
1584 or intersect minus between distinct 1584 or intersect minus between distinct ~
1585 links to Operator 1585 links to Operator ~
1586 sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier 1586 sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier ~
1587 date money long tinyint unsigned xml text smalldate 1587 date money long tinyint unsigned xml text smalldate ~
1588 double datetime nchar smallint numeric time bit char 1588 double datetime nchar smallint numeric time bit char ~
1589 varbinary binary smallmoney 1589 varbinary binary smallmoney ~
1590 image float integer timestamp real decimal 1590 image float integer timestamp real decimal ~
1591 1591
1592 There are two syntax groups listed here: sqlOperator and sqlType. To retrieve 1592 There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
1593 a List of syntax items you can call OmniSyntaxList a number of different 1593 a List of syntax items you can call OmniSyntaxList a number of different
1594 ways. To retrieve all syntax items regardless of syntax group: > 1594 ways. To retrieve all syntax items regardless of syntax group: >
1595 echo OmniSyntaxList( [] ) 1595 echo OmniSyntaxList( [] )
1596 1596
1597 To retrieve only the syntax items for the sqlOperator syntax group: > 1597 To retrieve only the syntax items for the sqlOperator syntax group: >
1598 echo OmniSyntaxList( ['sqlOperator'] ) 1598 echo OmniSyntaxList( ['sqlOperator'] )
1605 1605
1606 From within a plugin, you would typically assign the output to a List: > 1606 From within a plugin, you would typically assign the output to a List: >
1607 let myKeywords = [] 1607 let myKeywords = []
1608 let myKeywords = OmniSyntaxList( ['sqlKeyword'] ) 1608 let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
1609 1609
1610
1611 1610
1612 SQL *ft-sql-omni* 1611 SQL *ft-sql-omni*
1613 1612
1614 Completion for the SQL language includes statements, functions, keywords. 1613 Completion for the SQL language includes statements, functions, keywords.
1615 It will also dynamically complete tables, procedures, views and column lists 1614 It will also dynamically complete tables, procedures, views and column lists