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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -