Tuesday, June 2, 2026

Re: Loading filetype scripts when editing a file on VimEnter

On 6/2/2026 9:22 AM, 黄岚军 wrote: > Try adding `:filetype detect` to the line after `edit`. This fixed it. Thank you! John -- -- 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/6cc9b491-8afd-41da-8fa1-6ada5100dfc5%40johnridesa.bike.

Re: Loading filetype scripts when editing a file on VimEnter

Try adding `:filetype detect` to the line after `edit`.
在2026年6月2日星期二 UTC+8 00:23:18<John Jackson> 写道:
Hello Vim users,

I want an installation of gVim to auto-edit a "notes" file when opened
with no arguments. I'm using this script in my Vim configuration:

vim9script
def LoadNotes()
  if argc() == 0
    edit path\to\notes.md
    echomsg "Auto-opened notes.md."
  endif
enddef
autocmd VimEnter * ++once LoadNotes()

This edits the file as expected. However, Vim does not apply syntax
highlighting to the file. When I run :scriptnames, none of the Markdown
ftplugin or syntax scripts are listed. (Although many other ftplugin
script names are listed.)

If I manually run :edit after startup, then the syntax highlighting
works, and Vim's ftplugin\markdown.vim and its associated scripts are
now all listed in :scriptnames.

Is there a way to guarantee that Vim will load all of the needed
filetype scripts during the VimEnter event? Or is there a more
appropriate event for this use case? I'm happy to provide more details
if they're helpful.

:version
VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Feb 14 2026 12:17:29)
MS-Windows 64-bit GUI/console version with OLE support

John

--
--
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/3745a3e2-f3c3-4505-ad29-a78c004a3f8fn%40googlegroups.com.

Monday, June 1, 2026

Loading filetype scripts when editing a file on VimEnter

Hello Vim users, I want an installation of gVim to auto-edit a "notes" file when opened with no arguments. I'm using this script in my Vim configuration: vim9script def LoadNotes()   if argc() == 0     edit path\to\notes.md     echomsg "Auto-opened notes.md."   endif enddef autocmd VimEnter * ++once LoadNotes() This edits the file as expected. However, Vim does not apply syntax highlighting to the file. When I run :scriptnames, none of the Markdown ftplugin or syntax scripts are listed. (Although many other ftplugin script names are listed.) If I manually run :edit after startup, then the syntax highlighting works, and Vim's ftplugin\markdown.vim and its associated scripts are now all listed in :scriptnames. Is there a way to guarantee that Vim will load all of the needed filetype scripts during the VimEnter event? Or is there a more appropriate event for this use case? I'm happy to provide more details if they're helpful. :version VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Feb 14 2026 12:17:29) MS-Windows 64-bit GUI/console version with OLE support John -- -- 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/0fde278a-c7b1-4e57-8016-03a673adaf1f%40icloud.com.

Wednesday, May 27, 2026

Is it possible to map ?

Hi,

Is it possible to map <M-Space> to something ?
If I use:

map <Esc><Space> ...

then I would get a delay on each single <Esc>, right ?

I don't want to lower timeouts or else over ssh I might get some spurious chars, etc.
I have tried keyprotocol=kitty and mok2 but doesn't seem to help.
I have tried
exec set <F22>=^[   (there is a space after the esc char)
exec map <F22> <F22>
Then use <F22> for lhs but this causes some real disaster with rgb terminal esc codes.

thx,
-m

--
--
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/8bd25a86-79bd-4ac7-8bf5-83aa1121a580n%40googlegroups.com.

Bug in popup maxwidth?

Hello,

GVim 9.2, patch 541, Windows 11.

My popups are as wide as the widest line, ignoring the maxwidth setting. This was working fine in 9.1, patch 2125, from where I upgraded yesterday.

The maxheight works fine.

--
 
Salman

I, too, shall something make and glory in the making.

--
--
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/CANuxnEfeoDYktZ3Ku5iZ8G_H_4hs0iWcdMB_8_ikTKp4cQSZsQ%40mail.gmail.com.

Bug in popup with opacity?

Hello,

I am on GVim 9.2, patch 541, on Windows 11.

If I set opacity in a popup to anything but 100, my font settings aren't observed. For example, my 'InfoBorder' (used for borderhighlight) is set to:

InfoBorder     xxx guibg=#6f4246 font=Consolas:h9

If the opacity is either unspecified or explicitly set to 100, the font is observed. Any actual opacity and the font is ignored and goes to the regular font used throughout.

Thank you.

--
 
Salman

I, too, shall something make and glory in the making.

--
--
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/CANuxnEc0_fDYBB99jYM_YV1axRUZ324VhDKzV%3DK7Cvs7QBj_1w%40mail.gmail.com.

Tuesday, May 26, 2026

Re: AW: Find a value , and insert it at the begining of line

 

------ Original Message ------
From: janis_papanagnou@hotmail.com
To: vim_use@googlegroups.com
Sent: Tuesday, May 26th 2026, 17:54
Subject: AW: Find a value , and insert it at the begining of line
A little shorter would probably be :%s/\(.*\)\(18\d\d\)\(.*\)/\2&/ (But since you haven't provided input samples and corresponding expected output I'm not sure and you will have to confirm it.) Janis ________________________________________ Von: 'c.willis111 ' via vim_use Gesendet: Dienstag, 26. Mai 2026 18:06 An: vim_use@googlegroups.com Betreff: Find a value , and insert it at the begining of line Hi this works. Is there a niftier way? (ie without capturing the context). :%s/\(.*\)\(18\d\d\)\(.*\)/\2\1\2\3/ It seems that the nested capture which wd have been a tad shorter, doesn't work. regards - Chris -- -- 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/483eb624.1c088.19e6509f0f5.Webtop.140%40btinternet.com

 

Thanks Janis, and particularly Tim. I keep forgetting about &.

 

regards - Chris . -- -- 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/DU0PR02MB104223044573EC3CE5325CB5FF30B2%40DU0PR02MB10422.eurprd02.prod.outlook.com.

--
--
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/288d3ac2.1c3eb.19e654dd762.Webtop.140%40btinternet.com.