你如何在 Windows 中运行 Vim? [英] How do you run Vim in Windows?

查看:43
本文介绍了你如何在 Windows 中运行 Vim?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 gVim,并尝试使用通常适用于 linux 的常用vim myfile.java"技术来打开文件并对其进行编辑.但不幸的是,这似乎不起作用.我也试过gvim myfile.java",但这也不起作用.

I just installed gVim, and tried using the usual "vim myfile.java" technique that usually works for linux to open up a file and edit it. But unfortunately, this doesn't seem to work. I've also tried "gvim myfile.java", but that doesn't work either.

有谁知道如何使用 Windows Powershell 或其他技术打开 vim(并像在 linux 中一样使用它)?

Does anyone know how to open up vim (and use it like you do in linux) using Windows Powershell, or some other technique?

推荐答案

安装 gVim 时:
请确保选中[✓] 为命令行使用创建 .bat 文件.
它将在 C:\Windows\:

C:\>cd %windir%
C:\WINDOWS>dir /b *.bat
evim.bat
gview.bat
gvim.bat
gvimdiff.bat
view.bat
vim.bat
vimdiff.bat
vimtutor.bat

注意:C:\WINDOWS 已经在 PATH 环境变量中.
当您在命令行中输入 vim 时,将启动 C:\WINDOWS\vim.bat.
如果不勾选上面提到的复选框,则需要手动修改PATH.

Notice that: C:\WINDOWS is already in the PATH environment variable.
When you type vim in command line, C:\WINDOWS\vim.bat will be launched.
If you leave the checkbox mentioned above unchecked, you need to modify PATH manually.

这篇关于你如何在 Windows 中运行 Vim?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆