Mercurial > vim
diff runtime/doc/eval.txt @ 1500:ea9f418ed072 v7.1.215
updated for version 7.1-215
author | vimboss |
---|---|
date | Thu, 10 Jan 2008 21:24:39 +0000 |
parents | 29c09fa57168 |
children | 1b55bbf5c580 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.1. Last change: 2008 Jan 06 +*eval.txt* For Vim version 7.1. Last change: 2008 Jan 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1786,6 +1786,7 @@ synID( {lnum}, {col}, {trans}) Number sy synIDattr( {synID}, {what} [, {mode}]) String attribute {what} of syntax ID {synID} synIDtrans( {synID}) Number translated syntax ID of {synID} +synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col} system( {expr} [, {input}]) String output of shell command/filter {expr} tabpagebuflist( [{arg}]) List list of buffer numbers in tab page tabpagenr( [{arg}]) Number number of current or last tab page @@ -4962,6 +4963,24 @@ synIDtrans({synID}) *synIDtrans()* highlight the character. Highlight links given with ":highlight link" are followed. +synstack({lnum}, {col}) *synstack()* + Return a |List|, which is the stack of syntax items at the + position {lnum} and {col} in the current window. Each item in + the List is an ID like what |synID()| returns. + The stack is the situation in between the character at "col" + and the next character. Note that a region of only one + character will not show up, it only exists inside that + character, not in between characters. + The first item in the List is the outer region, following are + items contained in that one. The last one is what |synID()| + returns, unless not the whole item is highlighted or it is a + transparent item. + This function is useful for debugging a syntax file. + Example that shows the syntax stack under the cursor: > + for id in synstack(line("."), col(".")) + echo synIDattr(id, "name") + endfor + system({expr} [, {input}]) *system()* *E677* Get the output of the shell command {expr}. When {input} is given, this string is written to a file and