reformat in vim for a nice column layout

后端 未结 13 1077
野性不改
野性不改 2020-11-30 16:21

I have this dataset in a csv file

1.33570301776, 3.61194e-06, 7.24503e-06, -9.91572e-06, 1.25098e-05, 0.0102828, 0.010352, 0.0102677, 0.0103789, 0.00161604,          


        
13条回答
  •  有刺的猬
    2020-11-30 17:16

    If you're on some kind of UNIX (Linux, etc), you can cheat and filter it through the column(1) command.

    :%!column -t
    

    The above will parse on delimiters inside string literals which is wrong, so you will likely need pre-processing steps and specifying the delimiter for this file for example:

    %!sed 's/","/\&/' | column -t -s '&'
    

提交回复
热议问题