I am editing a large text array in vim and I want to compute it in one column.
A simplified example of an edited file:
name value name saturation red 5 green 2 blue 7 yellow 7 other text
I want to pass column 4 through an external calc.pl program, calc.pl replaces the numbers with new input numbers, for example:
name value name saturation red 5 green 2.4 blue 7 yellow 7.14 other text
When I select the rectangle in column 4 using v.motion and! perl calc.pl all lines are transmitted through channels in calc.pl, and not just in a rectangle.
The work around will be to: cut out the rectangle for the temporary file, run calc.pl in the temp file, and then read the output as a rectangle.
Is there a direct solution in vim, without for cropping / wrapping / pasting?
vim
mosh
source share