vim usage example

[root @ localhost ~] # cd ~ tilde to enter the user's home directory
[root @ localhost ~] # ls -al> /home/student/vimfile.txt output of the ls written to a file
to view results vi
Here Insert Picture Description
Copy files
cp / home / student / vimfile.txt /home/student/longlisting.txt
use vi visual mode, video mode may be used to select rows or columns, then the desired operating
ctrl + V x delete the selected column, as
the original file
Here Insert Picture Description
ctrl + v to delete the selected column
Here Insert Picture Description
x delete
Here Insert Picture Description
uppercase V, select one
Here Insert Picture Description
x delete
Here Insert Picture Description
the picture do the same, then the last line mode: wq to save and exit

Guess you like

Origin blog.csdn.net/qq_37257758/article/details/93417365