Tuesday, March 3, 2026

Does popup_menu() functions asynchronous?

I try to use popup_menu() in linear code like:

——

func PopupResult(id, sel)
    let g:popup_sel = a:result
    echo "In popup: " .. g:result
endfunc

call popup_menu(["A","B","C"], #{ callback: 'PopupResult' })

echo 'After popup'

——-

but 'After popup' is displayed immediately, not waiting for finish the call. 
Does popup_menu works asynchronous? How can I execute such code in linear way?

Piotr

--
--
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 visit https://groups.google.com/d/msgid/vim_use/78474f86-0bd6-401c-bdc3-fc85b4ca7b45n%40googlegroups.com.

Wednesday, February 18, 2026

Design patterns in Vim9script

Hi all,

I have created a repository (https://github.com/yegappan/design-patterns)
containing implementations of various design patterns using the latest
features in Vim9script (e.g., classes, interfaces, enums, type aliases, etc.).

I used GitHub Copilot to help generate these example scripts.

The goal of this effort is to showcase the modern capabilities of Vim9script
and provide a reference for the community.

Regards,
Yegappan

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CAAW7x7%3D1Ea-zF%3Dupz7T4k5rUPByZ1E1usd%2BB8TCVje8JC%2Bie-A%40mail.gmail.com.

Friday, February 13, 2026

Re: blacklist some ftplugins?

hello Gary,

thanks for helping but the solution Ben provided is idiomatic and simple
so I will stick with it.

> I use the following system in my vimrc for controlling which
> filetypes get syntax highlighting, but I think the above is
> sufficient.

this is interesting: I'll give a look later on that.

Regards

--
Marc Chantreux

--
--
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 visit https://groups.google.com/d/msgid/vim_use/aY9xUdEsUUf0s63j%40prometheus.

Re: blacklist some ftplugins?

hello,

On Fri, Feb 13, 2026 at 09:10:57AM -0800, D. Ben Knoble wrote:
> No such feature exists that I'm aware of, but:
> - what is it about sh.vim that you don't like?

I often set &mp and &efm manually to have a quickfix mode whatever I'm
doing and it pissed me off multiple times to "magically" lose them then
I realized it happened when I setf or e a shell script so I gave a look at
it and realized that I none of the things done by this plugin has any
value in my workflow so I decided just to delete it instead of fixing
it.

But then I came to another machine and got the same problem and that's
why I asked here.

> - are you aware you can override any ftplugin with either
> ~/.vim/ftplugin/sh.vim or (usually my preference, when I'm extending
> rather than replacing) ~/.vim/after/ftplugin/sh.vim? Ditto for syntax and
> indent, since that's what we ship right now.

I actually had all of my stuff in ~/.config/vim/after and completely forgot
about ~/.config/vim/ftplugin. just moving/touching files to maintain the
blacklist is wonderful. thanks for helping me reactivate my rusted
brain.

> See `:help ftplugin-overrule`, `:help 30.3` (indenting), `:help
> mysyntaxfile` (Yikes, what a documentation mess!)

I'm really impressed by the quality of the documentation given all the
changes that are made in vim from the first version I used (which was
3.something) but yes: sometimes it's hard to find the good part of the
doc.

Thank you so much.

--
Marc Chantreux

--
--
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 visit https://groups.google.com/d/msgid/vim_use/aY9wx4mtWTDISPzp%40prometheus.

Re: blacklist some ftplugins?

On 2026-02-12, Marc Chantreux wrote:
> Hello people,
>
> I saw there is a write-filetype-plugin section in a documentation and
> will read it (and maybe discuss about it) to get something I would like:
> ftplugins to provide suggestions instead of setting them (maybe it could
> be conventions on how to name the variable that can be the candidate to
> setup &mp).
>
> I have no time for this right now and just fixed the problem:
>
> find /usr/share/vim/vim91/ -name sh.vim |
> sed 'p;s!/!_!g' |
> xargs -n2 mv
>
> That was brutal. was there something less destructive?
> for exemple: a way yo blacklist some system filetypes?
>
> filetype plugin user=sh,raku # to say that I take care about those ones
> filetype plugin disable=sh,raku # to say I just don't want plugins for those ones
>
> thanks for any help and regards,

How about this? Put this autocommand early in your vimrc, before
any filetype or syntax commands:

autocmd Filetype sh,raku let b:did_ftplugin = 1

Then put this autocommand late in your vimrc, after all filetype and
syntax commands:

autocmd Filetype sh,raku syn clear | unlet! b:current_syntax


I use the following system in my vimrc for controlling which
filetypes get syntax highlighting, but I think the above is
sufficient. (b:syn is used to track the desired state of 'syntax'.
Other autocommands use it to control syntax highlighting when 'diff'
is turned on and off.)

" ":syntax manual" will enable syntax highlighting only for specific
" buffers in which :set syntax=ON" is set. See ":help :syn-manual".
"
syntax manual

let no_syntax_filetypes = [ 'c', 'cpp', 'man', 'netrw', 'objcpp', 'python', 'vim' ]
autocmd FileType * if !empty(expand("<amatch>"))
\ | if !count(no_syntax_filetypes, expand("<amatch>"))
\ | let b:syn="ON"
\ | if !&diff
\ | setlocal syntax=ON
\ | endif
\ | else
\ | syn clear
\ | if exists("b:current_syntax")
\ | unlet b:current_syntax
\ | endif
\ | endif
\ | endif

Regards,
Gary

--
--
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 visit https://groups.google.com/d/msgid/vim_use/20260213171426.GG14680%40phoenix.

Re: blacklist some ftplugins?

On Thursday, February 12, 2026 at 7:36:32 AM UTC-5 Marc Chantreux wrote:
Hello people,

I saw there is a write-filetype-plugin section in a documentation and
will read it (and maybe discuss about it) to get something I would like:
ftplugins to provide suggestions instead of setting them (maybe it could
be conventions on how to name the variable that can be the candidate to
setup &mp).

I have no time for this right now and just fixed the problem:

find /usr/share/vim/vim91/ -name sh.vim |
sed 'p;s!/!_!g' |
xargs -n2 mv

That was brutal. was there something less destructive?
for exemple: a way yo blacklist some system filetypes?

filetype plugin user=sh,raku # to say that I take care about those ones
filetype plugin disable=sh,raku # to say I just don't want plugins for those ones

thanks for any help and regards,
--
Marc Chantreux

No such feature exists that I'm aware of, but:

- what is it about sh.vim that you don't like?
- are you aware you can override any ftplugin with either ~/.vim/ftplugin/sh.vim or (usually my preference, when I'm extending rather than replacing) ~/.vim/after/ftplugin/sh.vim? Ditto for syntax and indent, since that's what we ship right now.

See `:help ftplugin-overrule`, `:help 30.3` (indenting), `:help mysyntaxfile` (Yikes, what a documentation mess!)

--
--
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 visit https://groups.google.com/d/msgid/vim_use/69190e30-e96d-41e6-a5af-ca748ce88ee9n%40googlegroups.com.

Thursday, February 12, 2026

blacklist some ftplugins?

Hello people,

I saw there is a write-filetype-plugin section in a documentation and
will read it (and maybe discuss about it) to get something I would like:
ftplugins to provide suggestions instead of setting them (maybe it could
be conventions on how to name the variable that can be the candidate to
setup &mp).

I have no time for this right now and just fixed the problem:

find /usr/share/vim/vim91/ -name sh.vim |
sed 'p;s!/!_!g' |
xargs -n2 mv

That was brutal. was there something less destructive?
for exemple: a way yo blacklist some system filetypes?

filetype plugin user=sh,raku # to say that I take care about those ones
filetype plugin disable=sh,raku # to say I just don't want plugins for those ones

thanks for any help and regards,
--
Marc Chantreux

--
--
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 visit https://groups.google.com/d/msgid/vim_use/aY3JOyyzQnXI22B_%40prometheus.