Fixes#86
This allows the formula line to be evaluated, even if there is a single
empty line after the table. The "empty" line is allowed to contain
whitespace, but nothing else.
The formula will evaluate if triggered on the table, the empty line, or
the formula lines.
Some reformatting and markdown / code chunk cleanup for the installation section, including installations instructions with Vim 8+ native package manager.
* Does not try to forcefully cast column content to float
* Silences any errors during formula evaluation, you can look at
`v:errmsg` to see if there was any error during the evaluation for
debugging
1) `it's` is a contraction of `it is`. `its` is the possessive
2) Made consistent the formatting of `[count]` as used in various locations
3) Made consistent the various `g:` formattings
4) `immidiately` is correctly spelled `immediately`
5) Shortened some sentences for clarity
As an aside, this is an immensely useful plugin. Thanks so much for contributing your code.
fixed a Vim error(E907) in Min/Max when comparing v:null to a float
fixed CountE/CountNE/PercentE/PercentNE to support spanning rows/columns
added test cases for all the new formula functions
- Min: get the lowest value
- Max: get the highest value
- CountE: count the number of empty cells
- CountNE: count the number of non-empty cells
- PercentE: percent of empty cells
- PercentNE: percent of non-empty cells
- AverageNE: average over non-empty cells
Also added a subtle tweak that ignores an HTML comment tag ('<!--')
found between the table and the starting formula line. Being able to
wrap all the formula lines with an HTML comment prevents the formulas
from being rendered in Markdown/ReST output.
If a g:table_mode_separator is escaped by a backslash, the table is
aligned ignoring this instance of the g:table_mode_separator, but the
column deletion and insertion functions did not consider this behaviour.
The g:table_mode_escaped_separator regex is simplified and optimized a
little bit. Also more care is taken to prevent unexpected behaviour if
special characters are used as g:table_mode_separator.