On 23/02/22 4:53 PM, Maxim Kim wrote:

Is there a builtin function to edit a buffer in the current window?

 There is no function as far as I know for this.

I use

execute string(bnr) .. 'buffer'

Anything more script oriented?

Pretty much this, with variations using string interpolation:

:exe $"{bnr}buffer"
:exe $"b {bnr}"

Thanks, hadn't thought of string interpolation

Looking again I saw that ":5buffer" and ":buffer 5" are the same (as you show, and I should have known)

I've started using

    execute 'buffer' bnr

-ernie


--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/6fb57b3e-1b3c-4379-b0e9-341ba69e30f0n%40googlegroups.com <https://groups.google.com/d/msgid/vim_dev/6fb57b3e-1b3c-4379-b0e9-341ba69e30f0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/469fda24-9fe8-7716-b26b-bc6ee8fb796e%40raelity.com.

Raspunde prin e-mail lui