Vim which is default Linux Text Editor, is very handy when come to editing text file and I would like to have the same text editor in my Windows 10 workstations when dealing with PowerShell
Please refer to the following steps to install and enable vim as my text editor in PowerShell instead of using NotePad
- Download and install vim7.4 for Windows
- Refer to the following PowerShell to set the alias for vim
#To verify whether PowerShell Profile had been created $profile #Creating a new PowerShell Profile new-item -path $profile -itemtype file -force #Open the PowerShell Profile notepad $profile #Set the Alias for vim and save it set-alias vim "C:/Program Files (x86)/Vim/vim74/.\vim.exe"
- Close and open again a new PowerShell console with the following command to edit the hostfile without using NotePad
PowerShell Syntax Highlight in vim
- Download and extract the following to C:\Program Files (x86)\Vim\vimfiles
- Open PowerShell Script (.ps1) and you can see the following.