Vim script-vertical bars & amp; #39; | & amp; #39; and backslash & amp; #39 ;\& amp; #39; Directory: [-] meaning an example means that a vertical line is used to link multiple commands into a single command, which is like a 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... 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 : If & list 4 \ set nolist 5 \ echo "do not show tab" 6 \ else 7 \ set list 8 \ echo "show tab" 9 \ endif In the above code It is the ing of a vertical line in the map command, indicating that multiple command links are one, while other commands can be written below with a comfortable line feed style under the action of a backslash. By the way, here is something to note: look at the above code, It cannot be directly written as '|', because this is the command to be mapped, that is, it is responsible for the map command, which is explained by map. the backslash '\' can be directly written, because it is interpreted by the vim script.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service