Wednesday, December 31, 2025

Re: Q&A: MSDOS SET command gave me some of my mapped commands

One last message. Plus zero did not work. Yes, it is acting as if it
were octal. Vim should not really do that as sometimes people do put
zeros in front of the number. (At least, this old fogey remembers when
people used to do that all of the time.) Here is what works:

str2nr( $value, $type )

So I used str2nr( $ext, 10 )

And that forced it to keep the number as 10. Just thinking aloud here
but it would be nice to have 0b for binary, 0c for octal, 0x for
hexadecimal, and 0d for decimal. But I guess no one wants to do that.
:-)

Mark

On Wed, Dec 31, 2025 at 7:42 AM Mark Manning
<mark.eugene.manning@gmail.com> wrote:
>
> Ugh. Should have thought of that. I thought up a solution wfile I slept. Number gotten off of a filenamfe. So a plus zero when I get it should work Thanks again.
>
> Mark
>
>
> On Wed, Dec 31, 2025, 4:31 AM Christian Brabandt <cblists@256bit.org> wrote:
>>
>>
>> On Mi, 31 Dez 2025, Mark Manning wrote:
>>
>> > Hi again Christian!
>> >
>> > I am back with another wierdo problem.
>> >
>> > Here is the code:
>> >
>> > "
>> > " Make a new filename (ie: full file name PLUS .(high_num+1)
>> > " In other words - make a new filename with the backup number one
>> > " higher than the highest backup number. Example A.BOB;00001
>> > "
>> > echo "High_num = " . high_num
>> > let high_num = high_num + 1
>> > echo "High_num = " . high_num
>> > let ext = printf("%05d", high_num )
>> > echo "High_num = " . high_num
>> > echo "ext = " . ext
>> > let new_path = expand("%:p") . ";" . ext
>> > "
>> > " Now save the file to the new file name we just made.
>> > "
>> > echo "new_path = " . new_path
>> >
>> > And here is the output (I haven't included all of the output - only
>> > from this point).
>> >
>> > High_num = 00010
>> > High_num = 9
>> > High_num = 9
>> > ext = 00009
>> > new_path = D:\My Programs\PHP\Fix Paper Types\fixpapers.
>> > php;00009
>> >
>> > As you can see, "High_num" is originally set to "00010". (Actual
>> > variable name is "high_num".) Anyway, I add one to that number and Vim
>> > changes the number to "9". I have tried using:
>> >
>> > let high_num += 1
>> > and
>> > let ++high_num <---Got an error doing this
>> > and
>> > let high_num++ <---Got an error doing this too
>> > and
>> > let high_num = high_num + 1
>> >
>> > and I just keep getting that high_num has decremented by one. I'm using
>> > version 9.1. Should I upgrade to a higher version of Vim? Thanks ahead
>> > of time for responsing. I is after 2:00am here so I've got to go to
>> > bed. Been working on this all day trying anything I could think of.
>> >
>> > Mark
>> > PS: If you want the source code I can zip it up and send it. Simple
>> > script called decvers.vim. (DEC VERSion - probably should rename it
>> > to something like Upgrade_version.vim or maybe Make_backup.vim. I'm
>> > basing it on the old DEC 11/780 system where every time you edited a
>> > file it made a backup of the file and add the next higher number
>> > to the end as ";#####". Earlier version numbers are older
>> > than the bigger version numbers.)
>>
>> You can include the script verbose on the list, don't need to send it to
>> me. So the whole list audience has a chance to chime in.
>>
>> My guess is the value is seen as octal, and therefore Vim is increments
>> it in octal mode (00010 -> 8 decimal).
>>
>> Instead of incrementing a string value, I'd recommend to perform the
>> actual arithmetics using a decimal number and then use printf() to
>> convert it into a string value.
>>
>> Thanks,
>> Christian
>> --
>> The people rule.
>>
>> --
>> --
>> 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 a topic in the Google Groups "vim_use" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/VAd-XX1KMOU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
>> To view this discussion visit https://groups.google.com/d/msgid/vim_use/aVT7N2dFqNeLPaAr%40256bit.org.

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

Re: Q&A: MSDOS SET command gave me some of my mapped commands

Ugh.  Should have thought of that. I thought up a solution wfile I slept. Number gotten off of a filenamfe. So a plus zero when I get it should work   Thanks again. 

Mark


On Wed, Dec 31, 2025, 4:31 AM Christian Brabandt <cblists@256bit.org> wrote:

On Mi, 31 Dez 2025, Mark Manning wrote:

> Hi again Christian!
>
> I am back with another wierdo problem.
>
> Here is the code:
>
> "     
> " Make a new filename (ie: full file name PLUS .(high_num+1)
> " In other words - make a new filename with the backup number one
> " higher than the highest backup number. Example A.BOB;00001
> "
>       echo "High_num = " . high_num
>       let high_num = high_num + 1
>       echo "High_num = " . high_num
>       let ext = printf("%05d", high_num )
>       echo "High_num = " . high_num
>       echo "ext = " . ext
>       let new_path = expand("%:p") . ";" . ext
> "     
> "             Now save the file to the new file name we just made.
> "     
>       echo "new_path = " . new_path
>
> And here is the output (I haven't included all of the output - only
> from this point).
>
> High_num = 00010
> High_num = 9
> High_num = 9
> ext = 00009
> new_path = D:\My Programs\PHP\Fix Paper Types\fixpapers.
> php;00009
>
> As you can see, "High_num" is originally set to "00010". (Actual
> variable name is "high_num".) Anyway, I add one to that number and Vim
> changes the number to "9". I have tried using:
>
>       let high_num += 1
> and
>       let ++high_num  <---Got an error doing this
> and
>       let high_num++  <---Got an error doing this too
> and
>       let high_num = high_num + 1
>
> and I just keep getting that high_num has decremented by one. I'm using
> version 9.1. Should I upgrade to a higher version of Vim? Thanks ahead
> of time for responsing. I is after 2:00am here so I've got to go to
> bed. Been working on this all day trying anything I could think of.
>
> Mark
> PS: If you want the source code I can zip it up and send it. Simple
> script called decvers.vim. (DEC VERSion - probably should rename it
> to something like Upgrade_version.vim or maybe Make_backup.vim. I'm
> basing it on the old DEC 11/780 system where every time you edited a
> file it made a backup of the file and add the next higher number
> to the end as ";#####". Earlier version numbers are older
> than the bigger version numbers.)

You can include the script verbose on the list, don't need to send it to
me. So the whole list audience has a chance to chime in.

My guess is the value is seen as octal, and therefore Vim is increments
it in octal mode (00010 -> 8 decimal).

Instead of incrementing a string value, I'd recommend to perform the
actual arithmetics using a decimal number and then use printf() to
convert it into a string value.

Thanks,
Christian
--
The people rule.

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/VAd-XX1KMOU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/aVT7N2dFqNeLPaAr%40256bit.org.

--
--
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/CAPJLamyekZagPxLQ5Su2TGBNKehe2%3DwGapn%3DpjxFncVxWS7Fsw%40mail.gmail.com.

Releasing Vim 9.2

Hello everybody,

After close to 2 years and more than 2000 numbered patches, including
new features, bug fixes, and security updates, we have reached a state
where we should release a new minor version: Vim 9.2.

If you want to know what changed since the release of Vim 9.1, please
have a look at :h version-9.2 Note that this is only fully comprehensive
in the latest patch levels. It is also available online here:
https://github.com/vim/vim/blob/master/runtime/doc/version9.txt#L41542)

Thanks to everyone who has contributed to improving Vim! It's hard to
believe that 2 years have already passed since the 9.1 release.

I'd like to use the next 6 weeks (until around mid February) as the
stabilization period, followed by the release of Vim 9.2.

During this time, only runtime file updates, translations, security
fixes and clear bug fixes will be merged to make the release as stable
as possible (without introducing new issues obviously).

Now is also a good time for anyone using an older version of Vim to test
it, so we have a chance to fix any remaining issues.

If you are a maintainer of any runtime file or a translator, please
consider creating a PR for the Vim main tree. There have been quite a
few new error messages added, so please ensure that your scripts and
translations are up to date.

Thanks
Chris
--
Letzte Worte eines Chemikers:
"*H* steht für Stickstoff - und das brennt *nicht*."

--
--
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/aVUBdrDC1T90OsvN%40256bit.org.

Re: Q&A: MSDOS SET command gave me some of my mapped commands

On Mi, 31 Dez 2025, Mark Manning wrote:

> Hi again Christian!
>
> I am back with another wierdo problem.
>
> Here is the code:
>
> "
> " Make a new filename (ie: full file name PLUS .(high_num+1)
> " In other words - make a new filename with the backup number one
> " higher than the highest backup number. Example A.BOB;00001
> "
> echo "High_num = " . high_num
> let high_num = high_num + 1
> echo "High_num = " . high_num
> let ext = printf("%05d", high_num )
> echo "High_num = " . high_num
> echo "ext = " . ext
> let new_path = expand("%:p") . ";" . ext
> "
> " Now save the file to the new file name we just made.
> "
> echo "new_path = " . new_path
>
> And here is the output (I haven't included all of the output - only
> from this point).
>
> High_num = 00010
> High_num = 9
> High_num = 9
> ext = 00009
> new_path = D:\My Programs\PHP\Fix Paper Types\fixpapers.
> php;00009
>
> As you can see, "High_num" is originally set to "00010". (Actual
> variable name is "high_num".) Anyway, I add one to that number and Vim
> changes the number to "9". I have tried using:
>
> let high_num += 1
> and
> let ++high_num <---Got an error doing this
> and
> let high_num++ <---Got an error doing this too
> and
> let high_num = high_num + 1
>
> and I just keep getting that high_num has decremented by one. I'm using
> version 9.1. Should I upgrade to a higher version of Vim? Thanks ahead
> of time for responsing. I is after 2:00am here so I've got to go to
> bed. Been working on this all day trying anything I could think of.
>
> Mark
> PS: If you want the source code I can zip it up and send it. Simple
> script called decvers.vim. (DEC VERSion - probably should rename it
> to something like Upgrade_version.vim or maybe Make_backup.vim. I'm
> basing it on the old DEC 11/780 system where every time you edited a
> file it made a backup of the file and add the next higher number
> to the end as ";#####". Earlier version numbers are older
> than the bigger version numbers.)

You can include the script verbose on the list, don't need to send it to
me. So the whole list audience has a chance to chime in.

My guess is the value is seen as octal, and therefore Vim is increments
it in octal mode (00010 -> 8 decimal).

Instead of incrementing a string value, I'd recommend to perform the
actual arithmetics using a decimal number and then use printf() to
convert it into a string value.

Thanks,
Christian
--
The people rule.

--
--
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/aVT7N2dFqNeLPaAr%40256bit.org.

Re: Q&A: MSDOS SET command gave me some of my mapped commands

Hi again Christian!

I am back with another wierdo problem.

Here is the code:

"
" Make a new filename (ie: full file name PLUS .(high_num+1)
" In other words - make a new filename with the backup number one
" higher than the highest backup number. Example A.BOB;00001
"
echo "High_num = " . high_num
let high_num = high_num + 1
echo "High_num = " . high_num
let ext = printf("%05d", high_num )
echo "High_num = " . high_num
echo "ext = " . ext
let new_path = expand("%:p") . ";" . ext
"
" Now save the file to the new file name we just made.
"
echo "new_path = " . new_path

And here is the output (I haven't included all of the output - only
from this point).

High_num = 00010
High_num = 9
High_num = 9
ext = 00009
new_path = D:\My Programs\PHP\Fix Paper Types\fixpapers.
php;00009

As you can see, "High_num" is originally set to "00010". (Actual
variable name is "high_num".) Anyway, I add one to that number and Vim
changes the number to "9". I have tried using:

let high_num += 1
and
let ++high_num <---Got an error doing this
and
let high_num++ <---Got an error doing this too
and
let high_num = high_num + 1

and I just keep getting that high_num has decremented by one. I'm using
version 9.1. Should I upgrade to a higher version of Vim? Thanks ahead
of time for responsing. I is after 2:00am here so I've got to go to
bed. Been working on this all day trying anything I could think of.

Mark
PS: If you want the source code I can zip it up and send it. Simple
script called decvers.vim. (DEC VERSion - probably should rename it
to something like Upgrade_version.vim or maybe Make_backup.vim. I'm
basing it on the old DEC 11/780 system where every time you edited a
file it made a backup of the file and add the next higher number
to the end as ";#####". Earlier version numbers are older
than the bigger version numbers.)

--
--
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/20251231030048.77b3b891e0b09c39b0bbbd9f%40gmail.com.

Tuesday, December 30, 2025

Cannot get HTML here-doc syntax to work in Perl file using Vim 7

Using Vim 7.4, with the following Perl code: 

print <<"HTML"; 
<table> 
   <tr> 
     <td>I AM THE TABLE.</td> 
   </tr> 
</table> 
HTML 

 ...I want the syntax highlighting to display as HTML. I tried adding the following code to ~/.vim/after/syntax/perl.vim:

" Load HTML syntax
syntax include @html syntax/html.vim

" Highlight HTML inside <<HTML heredocs
syntax region perlHereDocHTML
      \ matchgroup=perlHereDocDelimiter
      \ start=+<<\s*["']\=HTML["']\=+
      \ end=+^HTML$+
      \ contains=@html
      \ keepend

But it is still not working. It is displayed as plain yellow text. How do I get it to highlight the HTML elements as if I were viewing a .html file?

--
--
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/ebd8e648-f223-4dbc-b3cb-a50320a9b634n%40googlegroups.com.

Friday, December 19, 2025

Re: Bug with shell command !{cmd} using cmd.exe

>
> I still would like to know why this happens in Windows 11 (I do consider
> this a bug because I should not have to include current directory in
> path).
>

Ask Microsoft; their "innovation" broke something that previously
worked.,which is not wholly unprecedented.

--
--
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/446f6651934f765ba07703f5d77ee382.squirrel%40webmail.vybenetworks.com.

Thursday, December 18, 2025

Re: Bug with shell command !{cmd} using cmd.exe

On 2025-12-18 10:47 am, Christian Brabandt wrote:
> On Do, 18 Dez 2025, Chainsaw wrote:
>
>> The PATH variable does not matter for an executable if you are in the
>> directory of the executable, or using the absolute path. When a
>> command is
>> issued at the CMD prompt, the Operating System will first look for an
>> executable file in the current folder, if not found it will scan
>> %PATH% to
>
> Which is a huge security issue by itself. There is a reason why almost
> no other shell behaves like this and even powershell did not inherit
> this behavior. In fact MS introduced the
> $NoDefaultCurrentDirectoryInExePath environment variable to enable
> customers to disable this behaviour.
>
> And Vim does set this environment variable since patch 9.1.1947 (see
> https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834 for
> the reasoning).
>
> I'd recommend not to rely on that behavior (e.g. what happens if you
> have a malicious dir.cmd in your current directory)?
>
> In any case, I suppose you could disable this behavior by unsetting
> $NoDefaultCurrentDirectoryInExePath from your environment, like:
> set NoDefaultCurrentDirectoryInExePath=
>
>> (I do consider this a bug because I should not have to include current
>> directory in path).
>
> Well, I don't :)
>
> Thanks,
> Chris
> --
> And in the heartbreak years that lie ahead,
> Be true to yourself and the Grateful Dead.
> -- Joan Baez
>
> --
Chris,

Thanks for the info. Sorry for calling it a bug, it was the sudden
change in Vims behavior that threw me off. I download the updates daily
and do read the description of changes, but 9.1.1947 happened right at
the time I was swithing over to a new Windows 11 machine, which is why I
never saw this in Win10, and accociated it with a Vim Win11 problem.
Guess I spoke too soon.

I do like the option to set NoDefaultCurrentDirectoryInExePath, however
a malicious executable could also be anywhere in your PATH, and so many
programs/scripts rely on the OS to search the current directory first.
This is one of those 'fixes' that has pros and cons.

Thanks again for everyones help, and thank you Chris and your team for
keeping Vim alive.

Chainsaw

--
--
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/5967d1175358a53d9551d5995ff3bfe4%40fourbarlinkage.net.

Re: Bug with shell command !{cmd} using cmd.exe

> > The PATH variable does not matter for an executable if you are in
> > the directory of the executable, or using the absolute path. When a
> > command is issued at the CMD prompt, the Operating System will first
> > look for an executable file in the current folder, if not found it
> > will scan %PATH% to
>
> Which is a huge security issue by itself. There is a reason why
> almost no other shell behaves like this and even powershell
> did not inherit this behavior. In fact MS introduced the
> $NoDefaultCurrentDirectoryInExePath environment variable to enable
> customers to disable this behaviour.
>
> > (I do consider this a bug because I should not have to include
> > current directory in path).
>
> Well, I don't :)
>
> Thanks, Chris

For a bit of context, Windows/DOS had a lot of built-in commands, such
as the previously-mentioned 'dir' and 'copy', 'del', etc. On Linux/Unix,
on the other hand, almost everything is a separate executable ('ls',
'cp', 'rm', to name three equivalents). So, in Linux, as root, you could
go into a user's subdirectory to look around and type 'ls' to see the
contents. The user, if malicious, could have created a simple shell
script or other executable executable file named 'ls' that did something
nasty ('rm -rf /' comes to mind), and when you typed 'ls', it would run
that file instead and not the /bin/ls you were hoping for. Consequently,
it would be disastrous to have the CURRENT directory in the PATH (after
all, you're probably in another user's home because you have been given
some reason to look around).

Windows is basically catching up a bit. This is definitely not a bug,
it's a security feature, albeit one that breaks backward compatibility
for Windows users.

Salman

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

Re: Bug with shell command !{cmd} using cmd.exe

On Do, 18 Dez 2025, Chainsaw wrote:

> The PATH variable does not matter for an executable if you are in the
> directory of the executable, or using the absolute path. When a command is
> issued at the CMD prompt, the Operating System will first look for an
> executable file in the current folder, if not found it will scan %PATH% to

Which is a huge security issue by itself. There is a reason why almost
no other shell behaves like this and even powershell did not inherit
this behavior. In fact MS introduced the
$NoDefaultCurrentDirectoryInExePath environment variable to enable
customers to disable this behaviour.

And Vim does set this environment variable since patch 9.1.1947 (see
https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834 for
the reasoning).

I'd recommend not to rely on that behavior (e.g. what happens if you
have a malicious dir.cmd in your current directory)?

In any case, I suppose you could disable this behavior by unsetting
$NoDefaultCurrentDirectoryInExePath from your environment, like:
set NoDefaultCurrentDirectoryInExePath=

> (I do consider this a bug because I should not have to include current
> directory in path).

Well, I don't :)

Thanks,
Chris
--
And in the heartbreak years that lie ahead,
Be true to yourself and the Grateful Dead.
-- Joan Baez

--
--
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/aUQiJEqE/Ml4mf9t%40256bit.org.

Re: Bug with shell command !{cmd} using cmd.exe

On 2025-12-18 1:47 am, 'Jürgen Krämer' via vim_use wrote:
> Hi,
>
> Chainsaw schrieb am 18.12.2025 um 06:25:
>>
>> I just switched from Windows 10 to Windows 11, and found a strange bug
>> with Vim in Windows 11.
>> Steps to reproduce:
>> 1) execute command :!start c:\windows\system32\cmd.exe (or
>> :!c:\windows\system32\cmd.exe)
>> 2) in the opened cmd.exe window, cd to a directory that contains a
>> .cmd
>> or .bat file, example cd c:\batch\test
>> 3) run a .cmd or .bat file, say test.cmd, you will get 'test.cmd' is
>> not
>> recognized as an internal or external command, operable program or
>> batch
>> file
>> 4) then in same window, run c:\batch\test\test.cmd and it will work ok
>>
>> This only happens with a cmd.exe window opened from Vim using !.
>>
>> Thanks
>>
> have a look at
>
> :help $NoDefaultCurrentDirectoryInExePath
>
> I don't know if there is a way to disable this behavior in Vim. You
> might
> need to
>
> set NoDefaultCurrentDirectoryInExePath=
>
> or
>
> set PATH=.;%PATH%
>
> in your cmd or get into the habit of explicitly prepending ".\" to the
> names of executables from the current directory when you want to run
> them,
> e.g.,
>
> .\my-program-from-here.exe param1 param2
>
>
> Regards,
> Jürgen
>
> --
> ~
> ~
> ~
> :wq
>
> --
The PATH variable does not matter for an executable if you are in the
directory of the executable, or using the absolute path. When a command
is issued at the CMD prompt, the Operating System will first look for an
executable file in the current folder, if not found it will scan %PATH%
to find it. In a CMD prompt window not launched from Vim, even if you
null the path with 'PATH ;' or set "PATH=", any executable in the
current directory will be found.

This odd behavior is only from a CMD window launched from Vim, and in
Windwso 10 I did not have this problem, it just worked.
Anyway, you did give me an idea for a workaround.

This works:
!start c:\windows\system32\cmd.exe /k path \%path\%;.

I still would like to know why this happens in Windows 11 (I do consider
this a bug because I should not have to include current directory in
path).

Thanks

--
--
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/94d676b4f5cf0cb08809373f9d67587d%40fourbarlinkage.net.

Wednesday, December 17, 2025

Re: Bug with shell command !{cmd} using cmd.exe

Hi,

Chainsaw schrieb am 18.12.2025 um 06:25:
>
> I just switched from Windows 10 to Windows 11, and found a strange bug
> with Vim in Windows 11.
> Steps to reproduce:
> 1) execute command :!start c:\windows\system32\cmd.exe (or
> :!c:\windows\system32\cmd.exe)
> 2) in the opened cmd.exe window, cd to a directory that contains a .cmd
> or .bat file, example cd c:\batch\test
> 3) run a .cmd or .bat file, say test.cmd, you will get 'test.cmd' is not
> recognized as an internal or external command, operable program or batch
> file
> 4) then in same window, run c:\batch\test\test.cmd and it will work ok
>
> This only happens with a cmd.exe window opened from Vim using !.
>
> Thanks
>
have a look at

:help $NoDefaultCurrentDirectoryInExePath

I don't know if there is a way to disable this behavior in Vim. You might
need to

set NoDefaultCurrentDirectoryInExePath=

or

set PATH=.;%PATH%

in your cmd or get into the habit of explicitly prepending ".\" to the
names of executables from the current directory when you want to run them,
e.g.,

.\my-program-from-here.exe param1 param2


Regards,
Jürgen

--
~
~
~
:wq

--
--
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/b07b4f38-80e4-4f9a-9b98-7ac083e79e92%40googlemail.com.

Bug with shell command !{cmd} using cmd.exe

Hello,

I just switched from Windows 10 to Windows 11, and found a strange bug
with Vim in Windows 11.
Steps to reproduce:
1) execute command :!start c:\windows\system32\cmd.exe (or
:!c:\windows\system32\cmd.exe)
2) in the opened cmd.exe window, cd to a directory that contains a .cmd
or .bat file, example cd c:\batch\test
3) run a .cmd or .bat file, say test.cmd, you will get 'test.cmd' is not
recognized as an internal or external command, operable program or batch
file
4) then in same window, run c:\batch\test\test.cmd and it will work ok

This only happens with a cmd.exe window opened from Vim using !.

Thanks

--
--
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/2a2f1c7f741191f52d2c55a2c573fede%40fourbarlinkage.net.

Wednesday, December 10, 2025

bug with multi-monitor setup on Ubuntu 25.10

Hi I have a bug affecting GVim on Ubuntu 25.10 

When I open or move a GVim window to my secondary monitor it locks up and becomes unresponsive from the tabbar down, the menu's still seem to work but it is hard to tell as nothing happens bellow, also it stays like that if I move it to my main monitor, were I otherwise do not experience this problem, so my GVim usage is imprisoned to my main/primary monitor, very annoying, not sure if this is the correct email list for bug reports, long time Vim/GVim user but I don't think I ever had to report one before, testament to Vim's general awesomeness!



--
   .~.     In my life God comes first....     /V\         but Linux is pretty high after that :-D    /( )\    Francis (Grizzly) Smit  ᚠᚱᚫᚾᚳᛁᛋ᛫ᚷᚱᛁᛋᛋᛚᛄ᛫ᛋᛗᛁᛏ    ^^-^^    http://www.smit.id.au/  

Monday, December 8, 2025

Re: Q&A: MSDOS SET command gave me some of my mapped commands

Let me try that.

On Mon, Dec 8, 2025 at 9:24 AM Christian Brabandt <cblists@256bit.org> wrote:
>
>
> On So, 07 Dez 2025, markem wrote:
>
> > No - I do not want to get rid of the commands. They are a part of my
> > VIM Script when I edit a PHP file. After trying several things for a
> > few hours all I can say is - is that for some reason, when I execute
> > the PHP - these three commands just include themselves. Unknow why. Oh
> > well, I'll just make sure to remove them
> > from whatever information I get from doing an EXEC() command. I was
> > mainly wondering if VIM makes temporary Windows variables.
>
> It does so if you do :let $var=..., see :h :let-$
>
> Thanks,
>
>
> Thanks,
> Christian
> --
> A Los Angeles judge ruled that "a citizen may snore with immunity in
> his own home, even though he may be in possession of unusual and
> exceptional ability in that particular field."
>
> --
> --
> 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 a topic in the Google Groups "vim_use" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/VAd-XX1KMOU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/vim_use/aTbtb1qHo38hSXDu%40256bit.org.

--
--
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/CAPJLamx29W0VLe9gOPm1iBKA8eUh6YWaAs-opY%3DvDn%2BtQnpDdg%40mail.gmail.com.

Re: Q&A: MSDOS SET command gave me some of my mapped commands

On So, 07 Dez 2025, markem wrote:

> No - I do not want to get rid of the commands. They are a part of my
> VIM Script when I edit a PHP file. After trying several things for a
> few hours all I can say is - is that for some reason, when I execute
> the PHP - these three commands just include themselves. Unknow why. Oh
> well, I'll just make sure to remove them
> from whatever information I get from doing an EXEC() command. I was
> mainly wondering if VIM makes temporary Windows variables.

It does so if you do :let $var=..., see :h :let-$

Thanks,


Thanks,
Christian
--
A Los Angeles judge ruled that "a citizen may snore with immunity in
his own home, even though he may be in possession of unusual and
exceptional ability in that particular field."

--
--
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/aTbtb1qHo38hSXDu%40256bit.org.

Sunday, December 7, 2025

Re: Q&A: MSDOS SET command gave me some of my mapped commands

No - I do not want to get rid of the commands. They are a part of my VIM Script when I edit a PHP file. After trying several things for a few hours all I can say is - is that for some reason, when I execute the PHP - these three commands just include themselves. Unknow why. Oh well, I'll just make sure to remove them from whatever information I get from doing an EXEC() command. I was mainly wondering if VIM makes temporary Windows variables.

On Sunday, November 30, 2025 at 3:48:13 AM UTC-6 Christian Brabandt wrote:

On Fr, 28 Nov 2025, markem wrote:

> I am writing a PHP script to allow me to modify everything in my environment variables. All I have gotten to so far was to do the Microsoft DOS command SET to get the list of environment variables. To my surprise I got the following:
>
>     [51] => map_h=:map h :w<CR>:!cls<CR>:!C:\xampp\php/php %<CR>
>     [52] => map_i=:map i :w<CR>:!cls<CR>:!C:\xampp\php/php -l %<CR>
>     [53] => map_u=:map u :w<CR>:!cls<CR>:!C:\xampp\php/php % > out.dat<CR>
>
> So I went "That's really weird. Maybe I did something wrong in my program." So I did a
>
> :!set > out.dat
>
> And in looking at the output file I found:
>
> macos9_path=C:\Program_Files\MacOS9\Programs
> mame_path=C:\Program_Files\Mame Gaming
> map_h=:map h :w<CR>:!cls<CR>:!C:\xampp\php/php %<CR>
> map_i=:map i :w<CR>:!cls<CR>:!C:\xampp\php/php -l %<CR>
> map_u=:map u :w<CR>:!cls<CR>:!C:\xampp\php/php % > out.dat<CR>
> mingw_path=C:\Program Files (x86)\MinGWStudio\MinGW\bin
> MSDevDir=C:\Program Files (x86)\DSv5\SharedIDE

So it seems you did define those in your environment, not inside vim.
Check Environment settings for your Windows operating system.

>
> But when I tried to get rid of these map commands, I am told

What exactly did you try? You should either use `:unlet $map_h` but this
will only unset those variables inside your Vim session, or using
set map_h=
in a cmd.com terminal window to remove it temporarily inside your
cmd.exe session.


Thanks,
Christian
--
Why does a ship carry cargo and a truck carry shipments?

--
--
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/a20a4bfe-8d8c-4a4e-826b-05a77c2d5b98n%40googlegroups.com.

Saturday, December 6, 2025

Re: Sorting large numbers

Oh awesome.

Could you please tag @igbanam in the bug, so I see what's changing?

Thanks!


Igbanam


On Fri, Dec 5, 2025 at 5:25 PM Yegappan Lakshmanan <yegappanl@gmail.com> wrote:
Hi,

On Fri, Dec 5, 2025 at 1:11 AM Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
I am realizing you can reduce the problem to just the first three entries, so you don't have to copy much when reproducing

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550)]->sort({a, b -> a[0] - b[0]})


This is a bug in the code.  I will create a PR this weekend.

- Yegappan
 

Igbanam


On Fri, Dec 5, 2025 at 9:00 AM Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
Hi all,

It's the time of the year when I use Vimscript to do what it was not designed for: AdventOfCode.

For today's problem, I notice that `:h sort()`, with a Funcref, breaks for large numbers — "breaks" here means that it does not keep to contract in the docs, not that it throws an exception. Since it's not really an exception, I don't think I can file it as a bug… so I'm bringing it here. Maybe someone can help me catch what I'm doing wrong.

In Vimscript…

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]->sort({a, b -> a[0] - b[0]})

yields

[(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]

This is the same list because I got it from runtime working on the larger list.

Looking closely, I noticed that the third range is smaller than the first range. This got me thinking about things like overflow. But I checked and `v:numbermax == 9223372036854775807` which is bigger than all the numbers here.

This same operation in Python and Ruby yield the same results different from Vimscript's

In Python

sorted([(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)])

In Ruby

[[229539777187355, 229539777187355], [487766135067138, 491977135306566], [188325333471071, 188931909913550], [264028451845520, 265514296554744], [245727634348687, 249469249579525], [375117820166731, 378942174241518], [535474757750378, 535849288071548]].sort { |a, b| a[0] - b[0] }

…both yield

[(188325333471071, 188931909913550), (229539777187355, 229539777187355), (245727634348687, 249469249579525), (264028451845520, 265514296554744), (375117820166731, 378942174241518), (487766135067138, 491977135306566), (535474757750378, 535849288071548)]

Is there some way to use sort that I'm missing here?


Igbanam


--
--
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/CAAW7x7ki7k4djawX6-4DkJjx7Vy2dFyy9QbD9Q8doNwNvJ3Ffg%40mail.gmail.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/CAOmRJrdkwj5-sz3wPvMt6F%2BQFoOoQ4Uw%3D2qpxhgSa3hZ_56YDQ%40mail.gmail.com.

Friday, December 5, 2025

Re: Sorting large numbers

Hi,

On Fri, Dec 5, 2025 at 1:11 AM Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
I am realizing you can reduce the problem to just the first three entries, so you don't have to copy much when reproducing

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550)]->sort({a, b -> a[0] - b[0]})


This is a bug in the code.  I will create a PR this weekend.

- Yegappan
 

Igbanam


On Fri, Dec 5, 2025 at 9:00 AM Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
Hi all,

It's the time of the year when I use Vimscript to do what it was not designed for: AdventOfCode.

For today's problem, I notice that `:h sort()`, with a Funcref, breaks for large numbers — "breaks" here means that it does not keep to contract in the docs, not that it throws an exception. Since it's not really an exception, I don't think I can file it as a bug… so I'm bringing it here. Maybe someone can help me catch what I'm doing wrong.

In Vimscript…

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]->sort({a, b -> a[0] - b[0]})

yields

[(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]

This is the same list because I got it from runtime working on the larger list.

Looking closely, I noticed that the third range is smaller than the first range. This got me thinking about things like overflow. But I checked and `v:numbermax == 9223372036854775807` which is bigger than all the numbers here.

This same operation in Python and Ruby yield the same results different from Vimscript's

In Python

sorted([(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)])

In Ruby

[[229539777187355, 229539777187355], [487766135067138, 491977135306566], [188325333471071, 188931909913550], [264028451845520, 265514296554744], [245727634348687, 249469249579525], [375117820166731, 378942174241518], [535474757750378, 535849288071548]].sort { |a, b| a[0] - b[0] }

…both yield

[(188325333471071, 188931909913550), (229539777187355, 229539777187355), (245727634348687, 249469249579525), (264028451845520, 265514296554744), (375117820166731, 378942174241518), (487766135067138, 491977135306566), (535474757750378, 535849288071548)]

Is there some way to use sort that I'm missing here?


Igbanam


--
--
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/CAAW7x7ki7k4djawX6-4DkJjx7Vy2dFyy9QbD9Q8doNwNvJ3Ffg%40mail.gmail.com.

Re: Sorting large numbers

I am realizing you can reduce the problem to just the first three entries, so you don't have to copy much when reproducing

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550)]->sort({a, b -> a[0] - b[0]})


Igbanam


On Fri, Dec 5, 2025 at 9:00 AM Igbanam Ogbuluijah <xigbanam@gmail.com> wrote:
Hi all,

It's the time of the year when I use Vimscript to do what it was not designed for: AdventOfCode.

For today's problem, I notice that `:h sort()`, with a Funcref, breaks for large numbers — "breaks" here means that it does not keep to contract in the docs, not that it throws an exception. Since it's not really an exception, I don't think I can file it as a bug… so I'm bringing it here. Maybe someone can help me catch what I'm doing wrong.

In Vimscript…

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]->sort({a, b -> a[0] - b[0]})

yields

[(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]

This is the same list because I got it from runtime working on the larger list.

Looking closely, I noticed that the third range is smaller than the first range. This got me thinking about things like overflow. But I checked and `v:numbermax == 9223372036854775807` which is bigger than all the numbers here.

This same operation in Python and Ruby yield the same results different from Vimscript's

In Python

sorted([(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)])

In Ruby

[[229539777187355, 229539777187355], [487766135067138, 491977135306566], [188325333471071, 188931909913550], [264028451845520, 265514296554744], [245727634348687, 249469249579525], [375117820166731, 378942174241518], [535474757750378, 535849288071548]].sort { |a, b| a[0] - b[0] }

…both yield

[(188325333471071, 188931909913550), (229539777187355, 229539777187355), (245727634348687, 249469249579525), (264028451845520, 265514296554744), (375117820166731, 378942174241518), (487766135067138, 491977135306566), (535474757750378, 535849288071548)]

Is there some way to use sort that I'm missing here?


Igbanam

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

Sorting large numbers

Hi all,

It's the time of the year when I use Vimscript to do what it was not designed for: AdventOfCode.

For today's problem, I notice that `:h sort()`, with a Funcref, breaks for large numbers — "breaks" here means that it does not keep to contract in the docs, not that it throws an exception. Since it's not really an exception, I don't think I can file it as a bug… so I'm bringing it here. Maybe someone can help me catch what I'm doing wrong.

In Vimscript…

:echo [(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]->sort({a, b -> a[0] - b[0]})

yields

[(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)]

This is the same list because I got it from runtime working on the larger list.

Looking closely, I noticed that the third range is smaller than the first range. This got me thinking about things like overflow. But I checked and `v:numbermax == 9223372036854775807` which is bigger than all the numbers here.

This same operation in Python and Ruby yield the same results different from Vimscript's

In Python

sorted([(229539777187355, 229539777187355), (487766135067138, 491977135306566), (188325333471071, 188931909913550), (264028451845520, 265514296554744), (245727634348687, 249469249579525), (375117820166731, 378942174241518), (535474757750378, 535849288071548)])

In Ruby

[[229539777187355, 229539777187355], [487766135067138, 491977135306566], [188325333471071, 188931909913550], [264028451845520, 265514296554744], [245727634348687, 249469249579525], [375117820166731, 378942174241518], [535474757750378, 535849288071548]].sort { |a, b| a[0] - b[0] }

…both yield

[(188325333471071, 188931909913550), (229539777187355, 229539777187355), (245727634348687, 249469249579525), (264028451845520, 265514296554744), (375117820166731, 378942174241518), (487766135067138, 491977135306566), (535474757750378, 535849288071548)]

Is there some way to use sort that I'm missing here?


Igbanam

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

Monday, December 1, 2025

Re: What do you use for (fuzzy) file search?

On 30.11.25 22:01, Roberto Tonino wrote:
> Search in buffers only. Sometimes avoids using Tab when I have only a
> bunch of files opened, e.g. let's suppose to have Avatar.tsx,
> Avatar.test.tsx and more files in the project. I open only Avatar.tsx
> and other files and <leader><leader>Avat<Enter> brings me directly to
> the file without having to Tab through. Works even better when there are
> many files with the same prefix in the project.

Not quite understanding the need for other than inbuilt Vim fuzziness in this case. In the src directory just:
$ vim *.S *.c obj/*.lst [Mm]akefile
giving twenty or forty buffers. Then if in Vim:
:ls
  1 %a   "adc.S"                        line 1
  2      "init.S"                       line 0
  3      "os.S"                         line 0
  4      "serial.S"                     line 0
  5      "timer.S"                      line 0
  6      "include/events.h"             line 0
  7      "include/os.h"                 line 0
  8      "include/sc.h"                 line 0
  9      "include/service.h"            line 0
10      "include/sys.h"                line 0
11      "obj/app.dump"                 line 0
12      "makefile"                     line 0
13      "ld.lnk"                       line 0
14      "obj/map"                      line 0
15      "obj/adc.o.lst"                line 0
16      "obj/init.o.lst"               line 0
17      "obj/os.o.lst"                 line 0
18      "obj/serial.o.lst"             line 0
19      "obj/timer.o.lst"              line 0

:bu ini <Tab>
gives
init.S
and on a second <Tab>
obj/init.o.lst
then cycling - choose as suits. To save keystrokes, and speed buffer switches:
noremap <A-b> :bu
That does all useful fuzziness on the full set of legitimate match
targets, I find.

For a variety of projects, a simple selector serves:
$ vpr
1) ~/Embedded/avr/projects/fence_monitor           4) ~/Embedded/avr/projects/arduino_hobber
2) ~/Embedded/avr/projects/OGPD                    5) ~/cnc/emc2/hr2gc/
3) /usr/local/src/binutils-2.23_mydev/obj-avr      6) ~/Embedded/avr/experiments/bigmem
#? 1
given, in .bashrc :
vpr () {
   select project in $PROJECTS ; do
      eval cd $project/src
      uxterm -fg yellow -bg darkslategrey -cr red -geometry 70x38+1000+10 \
             -e vim obj/*.dump &
         vim `find . -type f -name '*.[chSsld]*'` [Mm]akefile
      break       # To exit from the "select" have-another-go loop.
   done
}
where $PROJECTS is a list of project paths, defined in .bashrc.

The uxterm opens a second window on the right, to display a disassembly of the ROM-resident post-compilation microcontroller code, as it will be laid out in memory. That's nifty for checking the interrupt vector table, initialisation code, and other good stuff - all while flicking between the source code files in the left hand window, using Alt-B and a couple of letters from the filename. Make an edit, "make", then :e! in the right hand window to refresh the code dump. Voila.
That's more than enough IDE, I find, especially with exuberant ctags added.
Erik

--
--
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/366ffa75-307e-4b23-ab23-218a68dfaee6%40localhost.

Sunday, November 30, 2025

Re: What do you use for (fuzzy) file search?

Hi Romain,

your suggestion made me delete Telescope entirely! I am now solely
relying on your way of finding files. I find it more efficient as you
lovely described.

For the sake of sharing, here are mappings I added for myself:

nnoremap <leader><leader> :b *

Search in buffers only. Sometimes avoids using Tab when I have only a
bunch of files opened, e.g. let's suppose to have Avatar.tsx,
Avatar.test.tsx and more files in the project. I open only Avatar.tsx
and other files and <leader><leader>Avat<Enter> brings me directly to
the file without having to Tab through. Works even better when there are
many files with the same prefix in the project.

nnoremap <leader>fg :grep<space>

Grep stuff. Not much to add other than that <space> is necessary
otherwise you have to type it yourself everytime, and writing the literal
space character gets deleted by vim deleting trailing spaces by default.

nnoremap <leader><not-sure-what-to-use-here> :tab b *

This is only something I am considering adding. Maybe will use <leader>T
because I don't find myself using it a lot, but would like to remember
to.

Best,

--

Roberto Tonino

--
--
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/7aa9f572-8cd5-4c18-a022-b32466936a3b%40gmail.com.

Re: Q&A: MSDOS SET command gave me some of my mapped commands

On Fr, 28 Nov 2025, markem wrote:

> I am writing a PHP script to allow me to modify everything in my environment variables. All I have gotten to so far was to do the Microsoft DOS command SET to get the list of environment variables. To my surprise I got the following:
>
>     [51] => map_h=:map h :w<CR>:!cls<CR>:!C:\xampp\php/php %<CR>
>     [52] => map_i=:map i :w<CR>:!cls<CR>:!C:\xampp\php/php -l %<CR>
>     [53] => map_u=:map u :w<CR>:!cls<CR>:!C:\xampp\php/php % > out.dat<CR>
>
> So I went "That's really weird. Maybe I did something wrong in my program." So I did a
>
> :!set > out.dat
>
> And in looking at the output file I found:
>
> macos9_path=C:\Program_Files\MacOS9\Programs
> mame_path=C:\Program_Files\Mame Gaming
> map_h=:map h :w<CR>:!cls<CR>:!C:\xampp\php/php %<CR>
> map_i=:map i :w<CR>:!cls<CR>:!C:\xampp\php/php -l %<CR>
> map_u=:map u :w<CR>:!cls<CR>:!C:\xampp\php/php % > out.dat<CR>
> mingw_path=C:\Program Files (x86)\MinGWStudio\MinGW\bin
> MSDevDir=C:\Program Files (x86)\DSv5\SharedIDE

So it seems you did define those in your environment, not inside vim.
Check Environment settings for your Windows operating system.

>
> But when I tried to get rid of these map commands, I am told

What exactly did you try? You should either use `:unlet $map_h` but this
will only unset those variables inside your Vim session, or using
set map_h=
in a cmd.com terminal window to remove it temporarily inside your
cmd.exe session.


Thanks,
Christian
--
Why does a ship carry cargo and a truck carry shipments?

--
--
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/aSwSsZWF3frTXewu%40256bit.org.

Friday, November 28, 2025

Re: Q&A: MSDOS SET command gave me some of my mapped commands

Sorry - I am running VIM v9.1 on Windows 10 system. If you need more info - let me know. Thanks.

On Saturday, November 29, 2025 at 12:27:50 AM UTC-6 markem wrote:
I am writing a PHP script to allow me to modify everything in my environment variables. All I have gotten to so far was to do the Microsoft DOS command SET to get the list of environment variables. To my surprise I got the following:

    [51] => map_h=:map h :w<CR>:!cls<CR>:!C:\xampp\php/php %<CR>
    [52] => map_i=:map i :w<CR>:!cls<CR>:!C:\xampp\php/php -l %<CR>
    [53] => map_u=:map u :w<CR>:!cls<CR>:!C:\xampp\php/php % > out.dat<CR>

So I went "That's really weird. Maybe I did something wrong in my program." So I did a

:!set > out.dat

And in looking at the output file I found:

macos9_path=C:\Program_Files\MacOS9\Programs
mame_path=C:\Program_Files\Mame Gaming
map_h=:map h :w<CR>:!cls<CR>:!C:\xampp\php/php %<CR>
map_i=:map i :w<CR>:!cls<CR>:!C:\xampp\php/php -l %<CR>
map_u=:map u :w<CR>:!cls<CR>:!C:\xampp\php/php % > out.dat<CR>
mingw_path=C:\Program Files (x86)\MinGWStudio\MinGW\bin
MSDevDir=C:\Program Files (x86)\DSv5\SharedIDE

But when I tried to get rid of these map commands, I am told

ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
Hit any key to close this window...

Now - I really do have those commands in my VIM script and they all work. The map_u command was how I just ran the PHP script. What I am wondering about is - how are they being generated. Is it something I'm doing in Vim itself? All I have is a map command:

:map <rest of the command>

So I thought this was rather strange. If anyone has ideas I'd like to hear them because this has me baffled.

Thanks in advance.

Mark

--
--
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/c1c2f934-d26b-4621-8967-f3e64de31a3fn%40googlegroups.com.