Vim script-vertical line '|' and backslash '\' directory: [-] Meaning an example of vertical line is used to link Multiple commands as one command, it is like the semicolon in shell. Note that it is not a pipe. A backslash is used to link multiple rows of scripts to a row of scripts for execution. It is similar to the previous shell scripts and is used to ignore line breaks. Generally, it is placed at the beginning of the next line. In one example, I want to add a shortcut key to my vim to control the personalized display of the TAB (the first character of the TAB shows the vertical line, and the rest is still a space ), in addition, this key acts as a Toggle. The main code is as follows: 1 "F4 use a vertical line to display tab 2 set listchars = tab: \ | \, 3map <silent> <F4>: if & list <Bar> 4 \ set nolist <Bar> 5 \ echo "do not show tab" <Bar> 6 \ else <Bar> 7 \ set list <Bar> 8 \ echo "display tab" <Bar> 9 \ endif <CR> the <Bar> in the above Code is the ing of the vertical bars in the map command, it indicates that multiple commands are linked to one line, while other commands can be written below with a comfortable line feed style under the action of the backslash. By the way, here is something worth attention: Look at the code above. <Bar> cannot be directly written as '|', because this is the command to be mapped, that is, it is responsible for the map command, it is interpreted by map, while the backslash '\' can be directly written, because it is originally interpreted by vim scripts.