Friday, November 28, 2025

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

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/a37bf480-2e29-4e8d-aa44-9c9c018aa451n%40googlegroups.com.

No comments: