dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.11k stars 96 forks source link

When using $n mode, formula is not evaluated for each row #186

Closed undying closed 4 years ago

undying commented 4 years ago

I'm trying to evaluate the formula $5=($1,2*$2)+($1,3*$3)+($1,4*$4) for this kind of table:

|  | USD | EUR | RUB   | Total    |
|--|-----|-----|-------|----------|
|  | 79  | 92  | 1     | 0        |
|--|-----|-----|-------|----------|
|  | 0   | 550 | 0     | 50600.0  |
|--|-----|-----|-------|----------|
|  | 0   | 0   | 25000 | 25000.0  |
|--|-----|-----|-------|----------|
|  | 350 | 0   | 0     | 27650.0  |
|--|-----|-----|-------|----------|
|  | 0   | 0   | 23600 | 23600.0  |
|--|-----|-----|-------|----------|
|  | 0   | 0   | 0     | 0.0      |
|--|-----|-----|-------|----------|
|  | 0   | 0   | 0     |          |
|--|-----|-----|-------|----------|
|  | 0   | 0   | 0     |          |
|--|-----|-----|-------|----------|
|  | 0   | 0   | 0     |          |
|--|-----|-----|-------|----------|
|  |     |     |       | 126850.0 |
<!-- tmf: $5=($1,2*$2)+($1,3*$3)+($1,4*$4);$10,-1=Sum(2,5:9,5);$1,5=0 -->

Expected behaviour is that each cell in the 5 column will be filled. But it's working only for the first row. To evaluate for every row I have to write formula in $n,m mode for every row.

undying commented 4 years ago

It seems to be fixed in master, thanks :)