PowerShell using vim

PowerShell using vim

http://www.wowotech.net/soft/vim_in_powershell.html

  1. Download and install vim under Windows;
  2. To set up the PowerShell environment, you can use "allow scripts to run", the steps are as follows:
Set-ExecutionPolicy RemoteSigned
提示输入Y
  1. Use the new-item command to create a PowerShell configuration file Profile
new-item -path $profile -itemtype file -force
  1. Edit the profile (notepad $profile) and add the relevant alias
set-alias vim "D:/software/Vim/vim80/./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
}
  1. restart powershell

vim encoding problem

In the _vimrc file in the gvim installation directory, add the following configuration:

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim7.1在windows下的编码设置。By Huadong.Liu
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
 set fileencoding=chinese
else
 set fileencoding=utf-8
endif
"解决菜单乱码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决consle输出乱码
language messages zh_CN.utf-8

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325145537&siteId=291194637