1
- *insert.txt* For Vim version 8.0 . Last change: 2017 May 30
1
+ *insert.txt* For Vim version 8.1 . Last change: 2018 Feb 10
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -433,7 +433,7 @@ An example for using CTRL-G U: >
433
433
inoremap ( ()<C-G>U<Left>
434
434
435
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
437
Also entering a text like (with the "(" mapping from above): >
438
438
439
439
Lorem ipsum (dolor
@@ -1103,6 +1103,8 @@ items:
1103
1103
item with the same word is already present.
1104
1104
empty when non-zero this match will be added even when it is
1105
1105
an empty string
1106
+ user_data custom data which is associated with the item and
1107
+ available in | v:completed_item |
1106
1108
1107
1109
All of these except "icase", "dup" and "empty" must be a string. If an item
1108
1110
does not meet these requirements then an error message is given and further
@@ -1196,6 +1198,8 @@ The menu is used when:
1196
1198
1197
1199
The 'pumheight' option can be used to set a maximum height. The default is to
1198
1200
use all space available.
1201
+ The 'pumwidth' option can be used to set a minimum width. The default is 15
1202
+ characters.
1199
1203
1200
1204
There are three states:
1201
1205
1. A complete match has been inserted, e.g., after using CTRL-N or CTRL-P .
@@ -1296,7 +1300,8 @@ it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended.
1296
1300
For version 5.5.4 you should add a patch that adds the "typename:" field:
1297
1301
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
1298
1302
A compiled .exe for MS-Windows can be found at:
1299
- http://georgevreilly.com/vim/ctags.html
1303
+ http://ctags.sourceforge.net/
1304
+ https://github.com/universal-ctags/ctags-win32
1300
1305
1301
1306
If you want to complete system functions you can do something like this. Use
1302
1307
ctags to generate a tags file for all the system header files: >
@@ -1472,7 +1477,7 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context:
1472
1477
1473
1478
Notes:
1474
1479
- Vim will load/evaluate code in order to provide completions. This may
1475
- cause some code execution, which may be a concern. This is no longer
1480
+ cause some code execution, which may be a concern. This is no longer
1476
1481
enabled by default, to enable this feature add >
1477
1482
let g:rubycomplete_buffer_loading = 1
1478
1483
< - In context 1 above, Vim can parse the entire buffer to add a list of
@@ -1528,15 +1533,15 @@ that begin with the filetype, "php", in this case. For example these syntax
1528
1533
groups are included by default with the PHP: phpEnvVar, phpIntVar,
1529
1534
phpFunctions.
1530
1535
1531
- If you wish non-filetype syntax items to also be included, you can use a
1532
- regular expression syntax (added in version 13.0 of autoload\syntaxcomplete.vim)
1533
- to add items. Looking at the output from ":syntax list" while editing a PHP file
1534
- I can see some of these entries: >
1536
+ If you wish non-filetype syntax items to also be included, you can use a
1537
+ regular expression syntax (added in version 13.0 of
1538
+ autoload\syntaxcomplete.vim) to add items. Looking at the output from
1539
+ ":syntax list" while editing a PHP file I can see some of these entries: >
1535
1540
htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
1536
1541
1537
1542
To pick up any JavaScript and HTML keyword syntax groups while editing a PHP
1538
- file, you can use 3 different regexs, one for each language. Or you can
1539
- simply restrict the include groups to a particular value, without using
1543
+ file, you can use 3 different regexs, one for each language. Or you can
1544
+ simply restrict the include groups to a particular value, without using
1540
1545
a regex string: >
1541
1546
let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+'
1542
1547
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
@@ -1549,9 +1554,9 @@ highlight. These items will be available within the omni completion list.
1549
1554
1550
1555
Some people may find this list unwieldy or are only interested in certain
1551
1556
items. There are two ways to prune this list (if necessary). If you find
1552
- certain syntax groups you do not wish displayed you can use two different
1553
- methods to identify these groups. The first specifically lists the syntax
1554
- groups by name. The second uses a regular expression to identify both
1557
+ certain syntax groups you do not wish displayed you can use two different
1558
+ methods to identify these groups. The first specifically lists the syntax
1559
+ groups by name. The second uses a regular expression to identify both
1555
1560
syntax groups. Simply add one the following to your vimrc: >
1556
1561
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
1557
1562
let g:omni_syntax_group_exclude_php = 'php\w*Constant'
@@ -1574,22 +1579,22 @@ vimrc: >
1574
1579
1575
1580
For plugin developers, the plugin exposes a public function OmniSyntaxList.
1576
1581
This function can be used to request a List of syntax items. When editing a
1577
- SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
1582
+ SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
1578
1583
various groups and syntax items. For example: >
1579
- syntax list
1580
-
1581
- Yields data similar to this: >
1582
- sqlOperator xxx some prior all like and any escape exists in is not
1583
- or intersect minus between distinct
1584
- links to Operator
1585
- sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier
1586
- date money long tinyint unsigned xml text smalldate
1587
- double datetime nchar smallint numeric time bit char
1588
- varbinary binary smallmoney
1589
- image float integer timestamp real decimal
1584
+ syntax list
1585
+
1586
+ Yields data similar to this:
1587
+ sqlOperator xxx some prior all like and any escape exists in is not ~
1588
+ or intersect minus between distinct ~
1589
+ links to Operator ~
1590
+ sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier ~
1591
+ date money long tinyint unsigned xml text smalldate ~
1592
+ double datetime nchar smallint numeric time bit char ~
1593
+ varbinary binary smallmoney ~
1594
+ image float integer timestamp real decimal ~
1590
1595
1591
1596
There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
1592
- a List of syntax items you can call OmniSyntaxList a number of different
1597
+ a List of syntax items you can call OmniSyntaxList a number of different
1593
1598
ways. To retrieve all syntax items regardless of syntax group: >
1594
1599
echo OmniSyntaxList( [] )
1595
1600
@@ -1606,7 +1611,6 @@ From within a plugin, you would typically assign the output to a List: >
1606
1611
let myKeywords = []
1607
1612
let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
1608
1613
1609
-
1610
1614
1611
1615
SQL *ft-sql-omni*
1612
1616
0 commit comments