Sample Input File
+--------------------+---------+---------
| Name | S1 | S2
+--------------------+---------+---------
| A | -4.703 | -2.378
| B | -3283.2 | -3204.5
| C | 8779 | 7302
| D | 22078 | 18018
+--------------------+---------+---------
It is required to remove the S1 Column, i.e
Desired Output
+--------------------+---------
| Name | S2
+--------------------+---------
| A | -2.378
| B | -3205.5
| C | 7302
| D | 18018
+--------------------+---------
Can anyone help with this
thanks
My pragmatic approach wins would be: look for column anchors (-+-
)
/-+-
Now, the column deletion is as simple as
d<C-v>N
(delete, block-wise, to the next occurrence of the column anchor from the end of the document).
To account for multiple columns, you'd like to be precise about which column to match
This needs a little extra oomph
0f+:exec '/\%' . col('.') . 'v\v[+|]'
Enter
NC-vN
t+d
To see more about this \%22v
way to select a virtual column, see
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With