Change this
flip 翻转[左右变成右左] fork 叉子\分岔\岔口\复刻
Convert to
flip ;翻转[左右变成右左] fork ;叉子\分岔\岔口\复刻
I use
:%s/^\([ a-zA-Z]\+\)\([\U4E00-\U9FFF ]\+.\+\)\([ a-zA-Z]\+\)\([\U4E00-\U9FFF ]\+.\+\)$/; ;/g
Now I want
flip 翻转[左右变成右左] fork 叉子\分岔\岔口\复刻
become
flip ;翻转[左右变成右左]
fork ;叉子\分岔\岔口\复刻
How to modify the vim command to complete the line break while adding the ; symbol?
There are two more brackets
PS: For Chinese matching, there is a method using [^ -x]1 on the Internet. The test found that it works, but I don’t know the principle.
If there are no English or spaces in the Chinese explanation, you can write it more simply
You can add a map to map ; to ;<CR>
For example: inoremap ; ;<CR>