How to add vim implementation code examples in power shell

How to add vim implementation code examples in power shell

1. Go to Vim's official website to download the executable file suitable for the operating system

Address: https://www.vim.org/download.php#pc

2. Find the vimrc file in the Vim folder and modify it, adding the following 4 lines.

set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,chinese,cp936

3. Create a new profile.ps1 file in the C:\Windows\System32\WindowsPowerShell\v1.0 directory and copy the following code into the profile.ps1 file.

# There's usually much more than this in my profile!
$SCRIPTPATH ​​= "C:\Program Files (x86)\Vim"
$VIMPATH = $SCRIPTPATH ​​+ "\vim80\vim.exe"
 
Set-Alias ​​vi $VIMPATH
Set-Alias ​​vim $VIMPATH
 
# for editing your PowerShell profile
Function Edit-Profile
{
vim $profile
}
 
# for editing your Vim settings
Function Edit-Vimrc
{
vim $home\_vimrc
}

4. Restart Shell and execute the Set-ExecutionPolicy RemoteSigned command to change the mode.

Set-ExecutionPolicy RemoteSigned

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • PowerShell Basic Use Tutorial
  • PowerShell command operation collection (summary)
  • How to use PowerShell to monitor Win-Server performance
  • Detailed explanation of Job-related commands and parallel execution tasks in PowerShell
  • Detailed explanation of the use of PowerShell in Ubuntu system
  • PowerShell remote execution task method steps
  • How to use PowerShell to play all versions of SQL SERVER

<<:  js tag syntax usage details

>>:  HTML tutorial, easy to learn HTML language

Recommend

Detailed explanation of Linux system directories sys, tmp, usr, var!

The growth path from a Linux novice to a Linux ma...

JavaScript to switch multiple pictures

This article shares the specific code of JavaScri...

In-depth explanation of MySQL stored procedures (in, out, inout)

1. Introduction It has been supported since versi...

Unicode signature BOM (Byte Order Mark) issue for UTF-8 files

I recently encountered a strange thing when debug...

How are Vue components parsed and rendered?

Preface This article will explain how Vue compone...

Summary of common functions and usage methods of WeChat applet development

Here, I have mainly sorted out some commonly used...

Implementation code for using mongodb database in Docker

Get the mongo image sudo docker pull mongo Run th...

Methods and steps to upgrade MySql5.x to MySql8.x

Several Differences Between MySQL 5.x and MySQL 8...

HTML table markup tutorial (43): VALIGN attribute of the table header

In the vertical direction, you can set the alignm...

View MySQL installation information under Linux server

View the installation information of mysql: #ps -...

Detailed explanation of how to use $props, $attrs and $listeners in Vue

Table of contents background 1. Document Descript...

jQuery plugin to implement minesweeper game (1)

This article shares the specific code of the firs...

Detailed explanation of the use of MySQL mysqldump

1. Introduction to mysqldump mysqldump is a logic...