1 , how to change the automatically indented characters from the default eight to four
: Set tabstop=4
2 , copy the/etc/grub2.cfg configuration file to the/tmp directory, and use the Find and replace command to delete the beginning blank character in the file
CENTOS6 Copy the/etc/grub.conf
:%[email protected]^[[:space:]]@@g
3 , copy the/etc/rc.d/init.d/functions file to the/tmp directory, use the Find and replace command as a line that begins with a blank character in the file, add a # to the beginning of the header, and the original whitespace character must be preserved
:%[email protected]\ (^[[:space:]]\) @\1#@g
:%[email protected]^[[:space:]]@&#@g
4 , replace/etc/sysconfig/init with/var/log in the/tmp/functions file with the Find replacement command
:%[email protected]/etc/sysconfig/[email Protected]/var/[email protected]
5 , use the Find replacement command to delete all lines beginning with # in the/tmp/funtions file, and # followed by at least one white space character at the beginning of the line #
%[email protected]^#\ ([[: Space:]]\) @\[email protected]
August 30 Sixth session Linux text editing tools Vim's use job