Diff to HTML by rtfpessoa

Files changed (7) hide show
  1. runtime/doc/builtin.txt +11 -1
  2. runtime/doc/develop.txt +5 -1
  3. runtime/doc/gui.txt +3 -1
  4. runtime/doc/gui_x11.txt +9 -1
  5. runtime/doc/usr_41.txt +3 -1
  6. runtime/doc/version9.txt +2 -1
  7. runtime/doc/vim9class.txt +28 -1
runtime/doc/builtin.txt CHANGED
@@ -1,4 +1,4 @@
1
- *builtin.txt* For Vim version 9.1. Last change: 2024 Nov 10
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
@@ -222,6 +222,7 @@ getbufline({buf}, {lnum} [, {end}])
222
  getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
223
  getbufvar({buf}, {varname} [, {def}])
224
  any variable {varname} in buffer {buf}
 
225
  getcellwidths() List get character cell width overrides
226
  getchangelist([{buf}]) List list of change list items
227
  getchar([{expr}]) Number or String
@@ -3786,6 +3787,15 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
3786
  Return type: any, depending on {varname}
3787
 
3788
 
 
 
 
 
 
 
 
 
 
3789
  getcellwidths() *getcellwidths()*
3790
  Returns a |List| of cell widths of character ranges overridden
3791
  by |setcellwidths()|. The format is equal to the argument of
1
+ *builtin.txt* For Vim version 9.1. Last change: 2024 Nov 11
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
222
  getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
223
  getbufvar({buf}, {varname} [, {def}])
224
  any variable {varname} in buffer {buf}
225
+ getcellpixels() List get character cell pixel size
226
  getcellwidths() List get character cell width overrides
227
  getchangelist([{buf}]) List list of change list items
228
  getchar([{expr}]) Number or String
3787
  Return type: any, depending on {varname}
3788
 
3789
 
3790
+ getcellpixels() *getcellpixels()*
3791
+ Returns a |List| of terminal cell pixel size.
3792
+ List format is [xpixels, ypixels].
3793
+ Only works on Unix. For gVim and on other systems,
3794
+ returns [-1, -1].
3795
+
3796
+ Return type: list<Number>
3797
+
3798
+
3799
  getcellwidths() *getcellwidths()*
3800
  Returns a |List| of cell widths of character ranges overridden
3801
  by |setcellwidths()|. The format is equal to the argument of
runtime/doc/develop.txt CHANGED
@@ -1,4 +1,4 @@
1
- *develop.txt* For Vim version 9.1. Last change: 2024 Oct 31
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
@@ -166,6 +166,10 @@ stick to these rules, to keep the sources readable and maintainable.
166
 
167
  This list is not complete. Look in the source code for more examples.
168
 
 
 
 
 
169
 
170
  MAKING CHANGES *style-changes*
171
 
1
+ *develop.txt* For Vim version 9.1. Last change: 2024 Nov 11
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
166
 
167
  This list is not complete. Look in the source code for more examples.
168
 
169
+ The code repository contains an editorconfig file, that can be used together
170
+ with the distributed editorconfig plugin |editorconfig-install| to ensure the
171
+ recommended style is followed.
172
+
173
 
174
  MAKING CHANGES *style-changes*
175
 
runtime/doc/gui.txt CHANGED
@@ -1,4 +1,4 @@
1
- *gui.txt* For Vim version 9.1. Last change: 2024 Jul 17
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
@@ -474,6 +474,8 @@ When the "unnamed" string is included in the 'clipboard' option, the unnamed
474
  register is the same as the "* register. Thus you can yank to and paste the
475
  selection without prepending "* to commands.
476
 
 
 
477
  ==============================================================================
478
  5. Menus *menus*
479
 
1
+ *gui.txt* For Vim version 9.1. Last change: 2024 Nov 07
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
474
  register is the same as the "* register. Thus you can yank to and paste the
475
  selection without prepending "* to commands.
476
 
477
+ See also |W23|.
478
+
479
  ==============================================================================
480
  5. Menus *menus*
481
 
runtime/doc/gui_x11.txt CHANGED
@@ -1,4 +1,4 @@
1
- *gui_x11.txt* For Vim version 9.1. Last change: 2024 Apr 22
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
@@ -708,6 +708,14 @@ Examples: (assuming the default option values)
708
  Note that the text in the "+ register remains available when making a Visual
709
  selection, which makes other text available in the "* register. That allows
710
  overwriting selected text.
 
 
 
 
 
 
 
 
711
  *x11-cut-buffer*
712
  There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7. Vim only
713
  uses CUT_BUFFER0, which is the one that xterm uses by default.
1
+ *gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 11
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
708
  Note that the text in the "+ register remains available when making a Visual
709
  selection, which makes other text available in the "* register. That allows
710
  overwriting selected text.
711
+
712
+ *W23*
713
+ When you are yanking into the "* or "+ register and Vim cannot establish a
714
+ connection to the X11 selection (or clipboard), it will use register 0 and
715
+ output a warning:
716
+
717
+ Warning: Clipboard register not available, using register 0 ~
718
+
719
  *x11-cut-buffer*
720
  There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7. Vim only
721
  uses CUT_BUFFER0, which is the one that xterm uses by default.
runtime/doc/usr_41.txt CHANGED
@@ -1,4 +1,4 @@
1
- *usr_41.txt* For Vim version 9.1. Last change: 2024 Oct 05
2
 
3
  VIM USER MANUAL - by Bram Moolenaar
4
 
@@ -778,6 +778,7 @@ String manipulation: *string-functions*
778
  strdisplaywidth() size of string when displayed, deals with tabs
779
  setcellwidths() set character cell width overrides
780
  getcellwidths() get character cell width overrides
 
781
  reverse() reverse the order of characters in a string
782
  substitute() substitute a pattern match with a string
783
  submatch() get a specific match in ":s" and substitute()
@@ -1394,6 +1395,7 @@ Various: *various-functions*
1394
  did_filetype() check if a FileType autocommand was used
1395
  diff() diff two Lists of strings
1396
  eventhandler() check if invoked by an event handler
 
1397
  getpid() get process ID of Vim
1398
  getscriptinfo() get list of sourced vim scripts
1399
  getimstatus() check if IME status is active
1
+ *usr_41.txt* For Vim version 9.1. Last change: 2024 Nov 11
2
 
3
  VIM USER MANUAL - by Bram Moolenaar
4
 
778
  strdisplaywidth() size of string when displayed, deals with tabs
779
  setcellwidths() set character cell width overrides
780
  getcellwidths() get character cell width overrides
781
+ getcellpixels() get character cell pixel size
782
  reverse() reverse the order of characters in a string
783
  substitute() substitute a pattern match with a string
784
  submatch() get a specific match in ":s" and substitute()
1395
  did_filetype() check if a FileType autocommand was used
1396
  diff() diff two Lists of strings
1397
  eventhandler() check if invoked by an event handler
1398
+ getcellpixels() get List of cell pixel size
1399
  getpid() get process ID of Vim
1400
  getscriptinfo() get list of sourced vim scripts
1401
  getimstatus() check if IME status is active
runtime/doc/version9.txt CHANGED
@@ -1,4 +1,4 @@
1
- *version9.txt* For Vim version 9.1. Last change: 2024 Nov 06
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41621,6 +41621,7 @@ Functions: ~
41621
  |foreach()| apply function to List items
41622
  |getcmdcomplpat()| Shell command line completion
41623
  |getcmdprompt()| get prompt for input()/confirm()
 
41624
  |getregion()| get a region of text from a buffer
41625
  |getregionpos()| get a list of positions for a region
41626
  |id()| get unique identifier for a Dict, List, Object,
1
+ *version9.txt* For Vim version 9.1. Last change: 2024 Nov 11
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
41621
  |foreach()| apply function to List items
41622
  |getcmdcomplpat()| Shell command line completion
41623
  |getcmdprompt()| get prompt for input()/confirm()
41624
+ |getcellpixels()| get List of terminal cell pixel size
41625
  |getregion()| get a region of text from a buffer
41626
  |getregionpos()| get a list of positions for a region
41627
  |id()| get unique identifier for a Dict, List, Object,
runtime/doc/vim9class.txt CHANGED
@@ -1,4 +1,4 @@
1
- *vim9class.txt* For Vim version 9.1. Last change: 2024 Apr 13
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
@@ -873,6 +873,33 @@ Note that the method name must start with "new". If there is no method called
873
  "new()" then the default constructor is added, even though there are other
874
  constructor methods.
875
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876
  Compiling methods in a Class ~
877
  *class-compile*
878
  The |:defcompile| command can be used to compile all the class and object
1
+ *vim9class.txt* For Vim version 9.1. Last change: 2024 Nov 11
2
 
3
 
4
  VIM REFERENCE MANUAL by Bram Moolenaar
873
  "new()" then the default constructor is added, even though there are other
874
  constructor methods.
875
 
876
+ Using variable type "any" for an Object~
877
+ *obj-var-type-any*
878
+ You can use a variable declared with type "any" to hold an object. e.g.
879
+ >
880
+ vim9script
881
+ class A
882
+ var n = 10
883
+ def Get(): number
884
+ return this.n
885
+ enddef
886
+ endclass
887
+
888
+ def Fn(o: any)
889
+ echo o.n
890
+ echo o.Get()
891
+ enddef
892
+
893
+ var a = A.new()
894
+ Fn(a)
895
+ <
896
+ In this example, Vim cannot determine the type of the parameter "o" for
897
+ function Fn() at compile time. It can be either a |Dict| or an |Object|
898
+ value. Therefore, at runtime, when the type is known, the object member
899
+ variable and method are looked up. This process is not efficient, so it is
900
+ recommended to use a more specific type whenever possible for better
901
+ efficiency.
902
+
903
  Compiling methods in a Class ~
904
  *class-compile*
905
  The |:defcompile| command can be used to compile all the class and object