Sunday, November 30, 2025

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.

No comments: