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
- PS C : \Windows\System32 > Set - ExecutionPolicy remotesigned
- Executing policy changes
- 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
- in the about_execution_policies the Help topic describes. Do you want to change the execution policy?
- [Y] Yes (Y) [N] No (N) [S] Hang (S) [?] Help (the default value is "Y"): Y
- PS C : \Windows\System32 >
3. Use the New-item command to create a configuration file profile for PowerShell.
- New - ---Force
4. Edit the configuration file (Notepad $profile) to add VIM-related alias.
- Set - "C:/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
- }
After you restart PowerShell, you can use it properly.
Using Vim in PowerShell