Using Vim in PowerShell

Source: Internet
Author: User

1. Need to go to the VIM website to download and install a executable file (Ftp://ftp.vim.org/pub/vim/pc/gvim74.exe) that can run on the WIN8 system.

2. Set up the PowerShell environment so that the "Allow scripts to run" option is available, in the following steps:

  • Run PowerShell as an administrator
  • Execute the set-executionpolicy remotesigned command, select Y in the dialog box, as follows
  •      
       
      
    1. PS C : \Windows\System32 > Set - ExecutionPolicy remotesigned
    2. Executing policy changes
    3. execution policies can help you prevent untrusted scripts from being executed. Changing execution policies can create security risks, such as http://go. Microsoft . com / fwlink /? LinkID = 135170
    4. in the about_execution_policies the Help topic describes. Do you want to change the execution policy?
    5. [Y] Yes (Y) [N] No (N) [S] Hang (S) [?] Help (the default value is "Y"): Y
    6. PS C : \Windows\System32 >

3. Use the New-item command to create a configuration file profile for PowerShell.

 
   
  
  1. New - ---Force

4. Edit the configuration file (Notepad $profile) to add VIM-related alias.

 
   
  
  1. Set - "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. }

After you restart PowerShell, you can use it properly.

Using Vim in PowerShell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.