Copy / etc / profile to the / tmp / directory, delete the blank beginning of the line / tmp / profile file with the Find and Replace command and set the tab indentation to four characters in vim

1. Copy the / etc / profile to the / tmp / directory, delete the blank beginning of the line / tmp / profile file with the Find and Replace command

In command mode, use regular expressions to match the beginning of the line has models whitespace character: ^ [[: space:]] * \ ([^ [: space:]] * \), the output of the command% s # ^ [[ : space:]] * \ ([^ [: space:]] * \) # \ 1 # g1

 

2, vim set the tab indent 4 characters

 vim .vimrc input SET = TabStop . 4

 

Guess you like

Origin www.cnblogs.com/mwd-123/p/11832303.html