vim - what is double forward slash in removing traling whitespace in vi -
i see following command in vi: delete trailing whitespace (at end of each line) with:
:%s/\s\+$//
i know
%: current buffer;
s: search , replace;
\s: white space;
+: 1 or more occurrences;
$: end of line
but "//" ?
the /
characters separators.
between first , second slashes, defining you're searching , between second , third slashes you're defining you're replacing with.
//
@ end says you're replacing search text (trailing white space) nothing.
Comments
Post a Comment