diff options
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r-- | runtime/doc/builtin.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index bf0ae8564..98fd13840 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 14 +*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1583,11 +1583,9 @@ col({expr}) The result is a Number, which is the byte index of the column buffer. For the cursor position, when 'virtualedit' is active, the column is one higher if the cursor is after the end of the - line. This can be used to obtain the column in Insert mode: > - :imap <F2> <C-O>:let save_ve = &ve<CR> - \<C-O>:set ve=all<CR> - \<C-O>:echo col(".") .. "\n" <Bar> - \let &ve = save_ve<CR> + line. Also, when using a <Cmd> mapping the cursor isn't + moved, this can be used to obtain the column in Insert mode: > + :imap <F2> <Cmd>echo col(".")<CR> < Can also be used as a |method|: > GetPos()->col() |