How to delete all content after specified columns in multiple lines in vim?
怪我咯
怪我咯 2017-05-16 16:34:47
0
4
739

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?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(4)
黄舟

First select all the lines you want to replace, then :'<,'>s/,.*$//

大家讲道理

Directly control-v and then $d or D Not finished yet?

仅有的幸福

Use awk

awk  -F ','  '{print }'
Peter_Zhu

You can also do this using visual-block:

gg
f,
<c>v
$
G
x
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template