Number manipulation within Vim -


If I have a data file containing columns of numbers such as

  3.14 0.42 6.66 < / Code> 

Is there any way from within Vim that I can manipulate these tasks like addition, subtraction and division? For example, say that I wanted to add 2.1 to each number in the column, how would I have to go about this? A

I can do this by piping for awk, but I would like to know that there is a built-in method, and I have not got anything in help files.

Experiment with expression register = .

The following command will add a number to a number on a line:

  C & lt; CTRL-R & gt; = & Lt; CTRL-R & gt; "+2.1   

is associated with a macro, this can produce some interesting results, such as.


Comments