For example:
111,a 222,bb 333,ccc 444,dddd 555,eeeee 666,ffffff 777,ggggggg
You can use Ctrl + v to select all the columns where the comma is located. If you want to delete all the content to the right of it, is there any shortcut?
Ctrl + v
走同样的路,发现不同的人生
First select all the lines you want to replace, then :'<,'>s/,.*$//
:'<,'>s/,.*$//
Directly control-v and then $d or D Not finished yet?
Use awk
awk -F ',' '{print }'
You can also do this using visual-block:
gg f, <c>v $ G x
First select all the lines you want to replace, then
:'<,'>s/,.*$//
Directly control-v and then $d or D Not finished yet?
Use awk
You can also do this using visual-block: