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

How to allow external network access to mysql and modify mysql account password

The root account of mysql, I usually use localhos...

Do designers need to learn to code?

Often, after a web design is completed, the desig...

An example of how to quickly deploy web applications using Tomcat in Docker

After learning the basic operations of Docker, we...

In-depth explanation of JavaScript this keyword

Table of contents 1. Introduction 2. Understand t...

Details about the like operator in MySQL

1. Introduction When filtering unknown or partial...

Tutorial on using $attrs and $listeners in Vue

Table of contents introduce Example Summarize int...

WeChat applet implements a simple calculator

A simple calculator written in WeChat applet for ...

How to create, start, and stop a Docker container

1. A container is an independently running applic...

Detailed explanation of the basic knowledge of front-end componentization

Table of contents Basic concepts of components Th...

MySql 8.0.11-Winxp64 (free installation version) configuration tutorial

1. Unzip the zip package to the installation dire...

Sample code for installing Jenkins using Docker

Two problems that are easy to encounter when inst...

How to block and prohibit web crawlers in Nginx server

Every website usually encounters many non-search ...

JavaScript implements the protocol example in which the user must check the box

In js, set the user to read a certain agreement b...