chaoshu的个人博客分享 http://blog.sciencenet.cn/u/chaoshu

博文

[转载]powershell使用vim

已有 4687 次阅读 2016-8-2 12:17 |个人分类:powershell|系统分类:科研笔记|关键词:学者|文章来源:转载

vim官网下载gvim74.exe,安装;

我安装路径D:Program FilesVimvim74

然后,设置PowerShell环境,使能“allow scripts to run”选项,步骤如下:

  • 以管理员的身份运行PowerShell

  • 执行Set-ExecutionPolicy RemoteSigned命令,在对话框中选择Y,如下

接下来,使用new-item命令,创建一个PowerShell的配置文件Profile。

  1. new-item -path $profile -itemtype file -force

最后,编辑配置文件(notepad $profile),添加vim相关的alias。

set-alias vim "D:/Program Files/Vim/vim74/./vim.exe"

# To edit the Powershell Profile

# (Not that I'll remember this)

Function Edit-Profile

{

   vim $profile

}

# To edit Vim settings

Function Edit-Vimrc

{

   vim $HOME_vimrc

}

重启PowerShell后,就可以正常使用了,如下(后续可以按照正常的方式,配置VIM,这里就不多说了)。

感谢蜗窝科技:http://www.wowotech.net/soft/vim_in_powershell.html



https://m.sciencenet.cn/blog-858128-994064.html

上一篇:DLL显式调用与TCP传输结构体
下一篇:windows下面使用awk、sed、grep、gnuplot

0

该博文允许注册用户评论 请点击登录 评论 (1 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-18 19:01

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部