Generate self-signed certificates

Open the key chain to access the application, select the following image



Heavy signature Xcode

Close Xcode and sign Xcode with the following command.

sudo codesign -f -s XcodeSigner /Applications/Xcode.app 

This step will take some time, so please be patient.

The thing to notice is this one right here
XcodeSignerYou can use the same certificate name as the one generated in the previous step.


In addition, if your Xcode is in a directory different from mine, it also needs to be modified according to the actual situation

Install XVim2

Cloning the Xvim2 code

git clone https://github.com/XVimProject/XVim2.git 

The installation

cd XVim2
xcode-select -s /Applications/Xcode.app/Contents/Developer
make

When finished, you can see the prompts shown in the picture below

Open Xcode and you will be prompted to load XVIM2. Please selectLoad Bundle

If you make a wrong selection by hand, you can reset it in the following way, and restart Xcode to reappear the prompt just shown

defaults delete  com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-X.X 

Where X.X writes your version of Xcode

XVim2 configuration

You can create an.xvimrc file in the ~ directory to hold the configuration in Xcode.

Refer to the following:

XVim github address XVim official guide