Friday, June 14, 2024

Re: ":b {bufname}" tab-completion uses whole filepath

On Fri, 14 Jun 2024 22:52:10 +0200
Christian Brabandt <cblists@256bit.org> wrote:
>
> You could try the following mapping:
>
> :cnoremap <expr> B getcmdtype()==#':'&&getcmdpos()==1?'b */':'B'
>
> And then type :B which would expand to :b */ on the commandline and then
> whatever you type would be anchored to the directory separator.

I think the cnoremap only maps 'B' to expand to "b */" if it's at the
start of the commandline. But what's "b */" supposed to do? I added
this mapping and then typed "deep" (so the whole commandline became "b
*/deep" and then pressed tab. It didn't do anything. No completion.

Could you explain the logic behind "anchored to the directory
separator"?

Note that I also tried "b *\" and "b *\\" since I'm in Windows.


--
Enan

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240614190301.00004a7e%40gmail.com.

No comments:

Post a Comment