Mercurial > vim
comparison runtime/doc/eval.txt @ 2608:7d8af31066c8
Updated runtime files and translations.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 20 Oct 2010 18:45:33 +0200 |
parents | fae782ef63dd |
children | 758822790b43 |
comparison
equal
deleted
inserted
replaced
2607:2f57d93bdbf6 | 2608:7d8af31066c8 |
---|---|
1 *eval.txt* For Vim version 7.3. Last change: 2010 Sep 29 | 1 *eval.txt* For Vim version 7.3. Last change: 2010 Oct 18 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
1932 String all {pat} in {expr} replaced with {sub} | 1932 String all {pat} in {expr} replaced with {sub} |
1933 synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} | 1933 synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} |
1934 synIDattr( {synID}, {what} [, {mode}]) | 1934 synIDattr( {synID}, {what} [, {mode}]) |
1935 String attribute {what} of syntax ID {synID} | 1935 String attribute {what} of syntax ID {synID} |
1936 synIDtrans( {synID}) Number translated syntax ID of {synID} | 1936 synIDtrans( {synID}) Number translated syntax ID of {synID} |
1937 synconcealed( {lnum}, {col}) List info about concealing | |
1937 synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} | 1938 synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} |
1938 system( {expr} [, {input}]) String output of shell command/filter {expr} | 1939 system( {expr} [, {input}]) String output of shell command/filter {expr} |
1939 tabpagebuflist( [{arg}]) List list of buffer numbers in tab page | 1940 tabpagebuflist( [{arg}]) List list of buffer numbers in tab page |
1940 tabpagenr( [{arg}]) Number number of current or last tab page | 1941 tabpagenr( [{arg}]) Number number of current or last tab page |
1941 tabpagewinnr( {tabarg}[, {arg}]) | 1942 tabpagewinnr( {tabarg}[, {arg}]) |
5556 | 5557 |
5557 Example (echoes the name of the syntax item under the cursor): > | 5558 Example (echoes the name of the syntax item under the cursor): > |
5558 :echo synIDattr(synID(line("."), col("."), 1), "name") | 5559 :echo synIDattr(synID(line("."), col("."), 1), "name") |
5559 < | 5560 < |
5560 | 5561 |
5561 synconcealed({lnum}, {col}) *synconcealed()* | |
5562 The result is a List. The first item in the list is 0 if the | |
5563 character at the position {lnum} and {col} is not part of a | |
5564 concealable region, 1 if it is. The second item in the list is | |
5565 a string. If the first item is 1, the second item contains the | |
5566 text which will be displayed in place of the concealed text, | |
5567 depending on the current setting of 'conceallevel'. The third | |
5568 and final item in the list is a unique number representing the | |
5569 specific syntax region matched. This allows detection of the | |
5570 beginning of a new concealable region if there are two | |
5571 consecutive regions with the same replacement character. | |
5572 For an example use see $VIMRUNTIME/syntax/2html.vim . | |
5573 | |
5574 | |
5575 synIDattr({synID}, {what} [, {mode}]) *synIDattr()* | 5562 synIDattr({synID}, {what} [, {mode}]) *synIDattr()* |
5576 The result is a String, which is the {what} attribute of | 5563 The result is a String, which is the {what} attribute of |
5577 syntax ID {synID}. This can be used to obtain information | 5564 syntax ID {synID}. This can be used to obtain information |
5578 about a syntax item. | 5565 about a syntax item. |
5579 {mode} can be "gui", "cterm" or "term", to get the attributes | 5566 {mode} can be "gui", "cterm" or "term", to get the attributes |
5609 synIDtrans({synID}) *synIDtrans()* | 5596 synIDtrans({synID}) *synIDtrans()* |
5610 The result is a Number, which is the translated syntax ID of | 5597 The result is a Number, which is the translated syntax ID of |
5611 {synID}. This is the syntax group ID of what is being used to | 5598 {synID}. This is the syntax group ID of what is being used to |
5612 highlight the character. Highlight links given with | 5599 highlight the character. Highlight links given with |
5613 ":highlight link" are followed. | 5600 ":highlight link" are followed. |
5601 | |
5602 synconcealed({lnum}, {col}) *synconcealed()* | |
5603 The result is a List. The first item in the list is 0 if the | |
5604 character at the position {lnum} and {col} is not part of a | |
5605 concealable region, 1 if it is. The second item in the list is | |
5606 a string. If the first item is 1, the second item contains the | |
5607 text which will be displayed in place of the concealed text, | |
5608 depending on the current setting of 'conceallevel'. The third | |
5609 and final item in the list is a unique number representing the | |
5610 specific syntax region matched. This allows detection of the | |
5611 beginning of a new concealable region if there are two | |
5612 consecutive regions with the same replacement character. | |
5613 For an example use see $VIMRUNTIME/syntax/2html.vim . | |
5614 | |
5614 | 5615 |
5615 synstack({lnum}, {col}) *synstack()* | 5616 synstack({lnum}, {col}) *synstack()* |
5616 Return a |List|, which is the stack of syntax items at the | 5617 Return a |List|, which is the stack of syntax items at the |
5617 position {lnum} and {col} in the current window. Each item in | 5618 position {lnum} and {col} in the current window. Each item in |
5618 the List is an ID like what |synID()| returns. | 5619 the List is an ID like what |synID()| returns. |