comparison runtime/doc/vim9.txt @ 23978:54b2aa1f0d42 v8.2.2531

patch 8.2.2531: Vim9: the :k command is obscure Commit: https://github.com/vim/vim/commit/10b9421f3bb7ac971fa63bd025c4c603c98f4a49 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 19 21:42:57 2021 +0100 patch 8.2.2531: Vim9: the :k command is obscure Problem: Vim9: the :k command is obscure. Solution: Disallow using :k, can use :mark instead. (closes https://github.com/vim/vim/issues/7874)
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Feb 2021 21:45:03 +0100
parents d4f7e4138544
children ef454a7f485d
comparison
equal deleted inserted replaced
23977:182c7ecd2cf3 23978:54b2aa1f0d42
94 - Variables and functions are script-local by default. 94 - Variables and functions are script-local by default.
95 - Functions are declared with argument types and return type: > 95 - Functions are declared with argument types and return type: >
96 def CallMe(count: number, message: string): bool 96 def CallMe(count: number, message: string): bool
97 - Call functions without `:call`: > 97 - Call functions without `:call`: >
98 writefile(['done'], 'file.txt') 98 writefile(['done'], 'file.txt')
99 - You cannot use `:xit`, `:t`, `:append`, `:change`, `:insert` or curly-braces 99 - You cannot use `:xit`, `:t`, `:k`, `:append`, `:change`, `:insert` or
100 names. 100 curly-braces names.
101 - A range before a command must be prefixed with a colon: > 101 - A range before a command must be prefixed with a colon: >
102 :%s/this/that 102 :%s/this/that
103 - Unless mentioned specifically, the highest |scriptversion| is used. 103 - Unless mentioned specifically, the highest |scriptversion| is used.
104 104
105 105
560 var dict = {123: 'without', [456]: 'with'} 560 var dict = {123: 'without', [456]: 'with'}
561 echo dict 561 echo dict
562 {'456': 'with', '123': 'without'} 562 {'456': 'with', '123': 'without'}
563 563
564 564
565 No :xit, :t, :append, :change or :insert ~ 565 No :xit, :t, :k, :append, :change or :insert ~
566 566
567 These commands are too easily confused with local variable names. 567 These commands are too easily confused with local variable names.
568 Instead of `:x` or `:xit` you can use `:exit`. 568 Instead of `:x` or `:xit` you can use `:exit`.
569 Instead of `:t` you can use `:copy`. 569 Instead of `:t` you can use `:copy`.
570 Instead of `:k` you can use `:mark`.
570 571
571 572
572 Comparators ~ 573 Comparators ~
573 574
574 The 'ignorecase' option is not used for comparators that use strings. 575 The 'ignorecase' option is not used for comparators that use strings.