1.需要去Vim官网下载并安装一个可运行于Win8系统的执行文件(ftp://ftp.vim.org/pub/vim/pc/gvim74.exe)。

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

    • 以管理员的身份运行PowerShell
    • 执行Set-ExecutionPolicy RemoteSigned命令,在对话框中选择Y,如下
  1. PS C:\Windows\system32> Set-ExecutionPolicy RemoteSigned
  2. 执行策略更改
  3. 执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 http://go.microsoft.com/fwlink/?LinkID=135170
  4. 中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
  5. [Y] 是(Y) [N] 否(N) [S] 挂起(S) [?] 帮助 (默认值为“Y”): Y
  6. PS C:\Windows\system32>

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

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

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

  1. set-alias vim "C:/Program Files/Vim/Vim74/./vim.exe"
  2. # To edit the Powershell Profile
  3. # (Not that I'll remember this)
  4. Function Edit-Profile
  5. {
  6. vim $profile
  7. }
  8. # To edit Vim settings
  9. Function Edit-Vimrc
  10. {
  11. vim $HOME\_vimrc
  12. }

重启PowerShell后,就可以正常使用了

在PowerShell中使用Vim的更多相关文章

  1. PowerShell中的基础数据类型

    PowerShell是一个面向对象的语言,在申明变量的时候不强制要求申明数据类型,使用$开头来申明变量即可. 基本数据类型 PowerShell本身是基于.Net开发出来的,所以在.Net中的基本数据 ...

  2. 使用管道符在PowerShell中进行各种数据操作

    最近在培训PowerShell,在讲到Pipeline的时候,对于我这种长期和数据(数据库)打交道的人来说,觉得很实用,所以写此博文,记录一下. 无论是在Linux中写Bash脚本还是在Window上 ...

  3. powershell中使用超大内存对象

    powershell中使用超大内存对象 简单介绍了powershell中超大内存对象的用途,开启powershell超大内存对象的办法. powershell 传教士 原创文章 2016-12-31 ...

  4. 处理SecureCRT中使用vim出现中文乱码问题

    处理SecureCRT中使用vim出现中文乱码问题 引用原文:http://blog.chinaunix.net/uid-20639775-id-3475608.html因为cat没有问题,定位是vi ...

  5. powershell中的两只爬虫

    --------------------序-------------------- (PowerShell中的)两只爬虫,两只爬虫,跑地快,爬网页不赖~~~ 一只基于com版的ie,一只基于.net中 ...

  6. 在本地主机上powershell中连接远程主机执行vbs脚本,得到执行结果(2008版及以上)

    在桌面版的主机上远程管理服务器版主机,在本地powershell中连接远程主机执行vbs脚本,得到执行结果. 执行步骤: 1.将本地主机上的Hyper.vbs复制到远程连接主机上.例如,本地vbs脚本 ...

  7. 在Mac OS X中使用VIM开发STM32(2)

    本文原创于http://www.cnblogs.com/humaoxiao,非法转载者请自重! 在我先前的博文⎣在Mac OS X中使用VIM开发STM32(1)⎤中,我们安装完成了MACVIM,这一 ...

  8. PowerShell_零基础自学课程_5_自定义PowerShell环境及Powershell中的基本概念

    PowerShell_零基础自学课程_5_自定义PowerShell环境及Powershell中的基本概念 据我个人所知,windows下的cmd shell除了能够通过修改系统参数来对其中的环境变量 ...

  9. 在CMD命令行和PowerShell中实现复制粘贴功能

    在CMD命令行和PowerShell中实现复制粘贴功能         常常使用命令行或者PowerShell的朋友肯定会遇到这样的情况:粘贴文本非常easy,右键--选择粘贴就可以,可是想要复制命令 ...

随机推荐

  1. LeetCode 90:Subsets II

    Given a collection of integers that might contain duplicates, nums, return all possible subsets. Not ...

  2. python module install

    1.issue: How can I bypass kivy module error: ImportError: DLL load failed: The specified module coul ...

  3. dyld`__abort_with_payload:

    dyld`__abort_with_payload: 0x1030422f0 <+0>:  mov    x16, #0x209 0x1030422f4 <+4>:  svc  ...

  4. CoffeeScript简介 <一>

    介绍 coffeeScript是一种轻量级的编程语言,可以用编译器生成原生javascript代码.它简化了许多javascript繁琐的方式,可以让你用简单的方式直接使用一行程序代表javascri ...

  5. void android.graphics.Bitmap.recycle()

    void android.graphics.Bitmap.recycle() Free up the memory associated with this bitmap's pixels, and ...

  6. MFC总结之CListCtrl用法及技巧

    复制于:http://www.cnblogs.com/lidabo/archive/2012/08/23/2652796.html 1.基本操作 分别从下面四点来介绍CListCtrl的基本操作: ① ...

  7. Nginx 设置域名转向配置

    #运行用户 #user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 2; #全局错误日志及PID文件 error_log logs/error.lo ...

  8. Atitit php vs node.js attilax总结

    Atitit php vs node.js attilax总结 1.1. 上手度  还是php 1 1.2. Node.js最大的缺点  异步回调导致可读性差..特别嵌套的时候.. 1 1.1. 上手 ...

  9. ceph crush 之 crush_do_rule

      crush_do_rule中,用了一个scratch空间来完成item的搜索. scratch空间总共有3个max_result这么大,并且按照max_result长度划分为三个部分(下图中的a. ...

  10. flink source code

    https://github.com/apache/flink/tree/master/docs https://github.com/flink-china/1.6.0 https://github ...