Skip to content

Commit 06b5d51

Browse files
committed
Add the settabvar() and gettabvar() functions.
Various runtime file updates.
1 parent db7c686 commit 06b5d51

32 files changed

Lines changed: 301 additions & 153 deletions

runtime/doc/change.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ characters. If the String ends in a <NL>, it is regarded as a linewise
11391139
register. {not in Vi}
11401140

11411141
7. Selection and drop registers "*, "+ and "~
1142-
Use these register for storing and retrieving the selected text for the GUI.
1142+
Use these registers for storing and retrieving the selected text for the GUI.
11431143
See |quotestar| and |quoteplus|. When the clipboard is not available or not
11441144
working, the unnamed register is used instead. For Unix systems the clipboard
11451145
is only available when the |+xterm_clipboard| feature is present. {not in Vi}

runtime/doc/eval.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,7 @@ getpos( {expr}) List position of cursor, mark, etc.
17671767
getqflist() List list of quickfix items
17681768
getreg( [{regname} [, 1]]) String contents of register
17691769
getregtype( [{regname}]) String type of register
1770+
gettabvar( {nr}, {varname}) any variable {varname} in tab {nr}
17701771
gettabwinvar( {tabnr}, {winnr}, {name})
17711772
any {name} in {winnr} in tab page {tabnr}
17721773
getwinposx() Number X coord in pixels of GUI Vim window
@@ -1886,6 +1887,7 @@ setmatches( {list}) Number restore a list of matches
18861887
setpos( {expr}, {list}) Number set the {expr} position to {list}
18871888
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
18881889
setreg( {n}, {v}[, {opt}]) Number set register to value and type
1890+
settabvar( {nr}, {varname}, {val}) set {varname} in tab page {nr} to {val}
18891891
settabwinvar( {tabnr}, {winnr}, {varname}, {val}) set {varname} in window
18901892
{winnr} in tab page {tabnr} to {val}
18911893
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
@@ -3354,6 +3356,12 @@ getregtype([{regname}]) *getregtype()*
33543356
<CTRL-V> is one character with value 0x16.
33553357
If {regname} is not specified, |v:register| is used.
33563358

3359+
gettabvar({tabnr}, {varname}) *gettabvar()*
3360+
Get the value of a tab-local variable {varname} in tab page
3361+
{tabnr}. |t:var|
3362+
Tabs are numbered starting with one.
3363+
Note that the name without "t:" must be used.
3364+
33573365
gettabwinvar({tabnr}, {winnr}, {varname}) *gettabwinvar()*
33583366
Get the value of window-local variable {varname} in window
33593367
{winnr} in tab page {tabnr}.
@@ -5103,6 +5111,15 @@ setreg({regname}, {value} [,{options}])
51035111
nothing: >
51045112
:call setreg('a', '', 'al')
51055113
5114+
settabvar({tabnr}, {varname}, {val}) *settabvar()*
5115+
Set tab-local variable {varname} to {val} in tab page {tabnr}.
5116+
|t:var|
5117+
Note that the variable name without "t:" must be used.
5118+
Tabs are numbered starting with one.
5119+
Vim briefly goes to the tab page {tabnr}, this may trigger
5120+
TabLeave and TabEnter autocommands.
5121+
This function is not available in the |sandbox|.
5122+
51065123
settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
51075124
Set option or local variable {varname} in window {winnr} to
51085125
{val}.

runtime/doc/ft_sql.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ Example of using column completion:
536536
completion window is active. If the completion popup window is
537537
not active, a normal <Right> or <Left> will be executed.
538538

539-
Lets look how we can build a SQL statement dynamically. A select statement
539+
Let's look at how we can build a SQL statement dynamically. A select statement
540540
requires a list of columns. There are two ways to build a column list using
541541
the SQL completion plugin. >
542542
One column at a time:
@@ -738,8 +738,8 @@ platform you can also use <C-Space> or ALT keys.
738738

739739
Many times SQL can be used with different filetypes. For example Perl, Java,
740740
PHP, Javascript can all interact with a database. Often you need both the SQL
741-
completion as well as the completion capabilities for the current language you
742-
are editing.
741+
completion and the completion capabilities for the current language you are
742+
editing.
743743

744744
This can be enabled easily with the following steps (assuming a Perl file): >
745745
1. :e test.pl

runtime/doc/gui.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ and Photon GUI. It should turn up in other GUIs in due course. The
678678
default toolbar is setup in menu.vim.
679679
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
680680
can thus have menu & toolbar together, or either on its own, or neither.
681-
The appearance is controlled by the 'toolbar' option. You can chose between
681+
The appearance is controlled by the 'toolbar' option. You can choose between
682682
an image, text or both.
683683

684684
*toolbar-icon*

runtime/doc/gui_x11.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ searched for. If all three fail, the GUI will be disabled.
453453
For GTK+, Vim's configuration process requires that GTK+ be properly
454454
installed. That is, the shell script 'gtk-config' must be in your PATH, and
455455
you can already successful compile, build, and execute a GTK+ program. The
456-
reason for this is because the compiler flags (CFLAGS) and link flags
457-
(LDFLAGS) are obtained through the 'gtk-config' shell script.
456+
reason for this is that the compiler flags (CFLAGS) and link flags (LDFLAGS)
457+
are obtained through the 'gtk-config' shell script.
458458

459459
If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument
460460
to ./configure. Optionally, support for GNOME 2 will be compiled if the

runtime/doc/insert.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ Script completes:
13581358
- function names with additional info:
13591359
- in case of built-in functions list of possible arguments and after | type
13601360
data returned by function
1361-
- in case of user function arguments and name of file were function was
1361+
- in case of user function arguments and name of file where function was
13621362
defined (if it is not current file)
13631363

13641364
- constants names
@@ -1446,8 +1446,8 @@ a look at the PHP filetype to see how this works.
14461446
If you edit a file called, index.php, run the following command: >
14471447
:syntax list
14481448
1449-
First thing you will notice is there are many different syntax groups. The
1450-
PHP language can include elements from different languages like HTML,
1449+
The first thing you will notice is that there are many different syntax groups.
1450+
The PHP language can include elements from different languages like HTML,
14511451
JavaScript and many more. The syntax plugin will only include syntax groups
14521452
that begin with the filetype, "php", in this case. For example these syntax
14531453
groups are included by default with the PHP: phpEnvVar, phpIntVar,

runtime/doc/mbyte.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ Then add a command to your |gvimrc| file to set 'guifont': >
753753

754754
X INPUT METHOD (XIM) BACKGROUND *XIM* *xim* *x-input-method*
755755

756-
XIM is an international input module for X. There are two kind of structures,
756+
XIM is an international input module for X. There are two kinds of structures,
757757
Xlib unit type and |IM-server| (Input-Method server) type. |IM-server| type
758758
is suitable for complex input, such as CJK.
759759

@@ -826,7 +826,7 @@ Use the RPM or port for your system.
826826
of Preedit Area and Status Area: |OnTheSpot|, |OffTheSpot|, |OverTheSpot|
827827
and |Root|.
828828

829-
Currently, GUI Vim support three style, |OverTheSpot|, |OffTheSpot| and
829+
Currently, GUI Vim supports three styles, |OverTheSpot|, |OffTheSpot| and
830830
|Root|.
831831

832832
*. on-the-spot *OnTheSpot*

runtime/doc/netbeans.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ use the |clientserver| interface.
101101
==============================================================================
102102
3. Configuring Vim for NetBeans *netbeans-configure*
103103

104-
For more help installing Vim, please read |usr_90.txt| in the Vim User Manual.
104+
For more help about installing Vim, please read |usr_90.txt| in the Vim User
105+
Manual.
105106

106107

107108
On Unix:

runtime/doc/options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5292,7 +5292,7 @@ A jump table for the options with a short description can be found at |Q_op|.
52925292
local to window
52935293
{not in Vi}
52945294
Show the line number relative to the line with the cursor in front of
5295-
each line. Relative line numbers help you using the |count| you can
5295+
each line. Relative line numbers help you use the |count| you can
52965296
precede some vertical motion commands (e.g. j k + -) with, without
52975297
having to calculate it yourself. Especially useful in combination with
52985298
other commands (e.g. y d c < > gq gw =).

runtime/doc/os_390.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ to only work for the opening of menus (like <Alt-F> to open the file menu).
190190
They still do not work for the menu items themselves (like <Alt-F>O to open
191191
the file browser).
192192

193-
There is no solution for this as of yet.
193+
There is no solution for this yet.
194194

195195
==============================================================================
196196
7. Bugs *OS390-bugs* *zOS-Bugs*

0 commit comments

Comments
 (0)