Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even though vi is in PATH, PowerShell returns "The term 'vi' is not recognized as the name of..." #2817

Open
2 tasks done
Znoy108x opened this issue Jan 22, 2023 · 3 comments

Comments

@Znoy108x
Copy link

Znoy108x commented Jan 22, 2023

Question

When I do vi abhay.txt the terminal shows this error, even though I have added the vim in the path

image
image

Checklist

  • I have read the documentation and made sure what I'm looking for isn't present, or is unclear.
  • I have searched for similar issues, and either this question wasn't asked before, or I didn't find any that describe my question.
@DRSDavidSoft
Copy link
Contributor

DRSDavidSoft commented Jan 22, 2023

Hi there, since you're on PowerShell please run the following commands:

Get-Command -All vim | ForEach-Object { Write-Host $_.Source }

And

Get-Command -All vi | ForEach-Object { Write-Host $_.Source }

And

Write-Host (($Env:PATH -Split ";")-Join "`n")

Then paste output of each command separately here.

Note: copy and paste as text, do not take a screenshot

@Znoy108x
Copy link
Author

C:\Users\Hp>Get-Command -All vim | ForEach-Object { Write-Host $_.Source }
'Get-Command' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Hp>Get-Command -All vi | ForEach-Object { Write-Host $_.Source }
'Get-Command' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Hp>Write-Host (($Env:PATH -Split ";")-Join "`n")
'Write-Host' is not recognized as an internal or external command,
operable program or batch file.

@DRSDavidSoft
Copy link
Contributor

You executed the commands in cmd.exe shell rather than PowerShell.

On cmd.exe, please run the following commands instead and post the results:

where vim

and

where vi

and

set PATH

@DRSDavidSoft DRSDavidSoft added the 👀 Awaiting Response Waiting to hear back from the issue reporter. label Jun 15, 2024
@DRSDavidSoft DRSDavidSoft changed the title Question : When i am doing vi abhay.txt then the terminal shows the error even tough i have added the vim in the path Even though vi is in PATH, PowerShell returns "The term 'vi' is not recognized as the name of..." Jun 15, 2024
@stale stale bot removed the 👀 Awaiting Response Waiting to hear back from the issue reporter. label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants