win10用power shell启动vim

479 阅读1分钟

前提:已下载安装vim

以管理员身份运行powershell

在PowerShell中,输入命令 Set-ExecutionPolicy RemoteSigned 输入Y[是] enter确认

继续输入命令 new-item -path $profile -itemtype file -force 进入显示的power shell目录中找到配置文件(此时是空的)

添加一下文本内容

set-alias vim "此处为vim的安装路径" 
 
Function Edit-Profile
{
    vim $profile
}
 
Function Edit-Vimrc
{
    vim $HOME\_vimrc
}