- 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.
Readme mentions settings for Markdown and ReST, but we can apply them
automatically for the current filetype. If a user is editing a no
filetype scratch buffer, they'll still need to configure these options
themselves. But this provides better defaults when editing a buffer of
these filetypes.
Adds get_buffer_or_global_option that could be used for any other
buffer-local (filetype-specific) options.
Initial support. Alignment and border creation is fixed and is
consistent in considering the escaped table separator as part of the
column.
TODO :
* Fix syntax to reflect the above.
* Fix cell definition, motion & formula engine to incorporate this.
In order to use vim table mode over vimwiki native table formatting
support you need to add the following vimwiki settings to your vimrc :
```vim
let g:vimwiki_table_mappings=0
let g:vimwiki_table_auto_fmt=0
```
We now have support for center alignment, simply add a header border
with the `g:table_mode_align_char` as both the first and the last
character so it would look something like `+:.....:+` to center align
the column values.
* Fixed tablemode#spreadsheet#cell#SetCell() to accommodate the fact that we
can have borders anywhere in the table. Using
tablemode#spreadsheet#LineNr() to get get the line of the actual row
in the table.
* Fixed tablemode#spreadsheet#LineNr()
Added tablemode#logger#log && g:table_mode_verbose
Use logger wherever needed for logging general things, in future we can
scale this to do more things like write to a log file for debugging. It
uses g:table_mode_verbose to determine whether or not to actually log
the message.
Added a mapping `<Plug>(table-mode-sort)` which is mapped by default to
`<Leader>ts` that sorts the current table by the column in which the
cursor is currently.
Also added `TableSort` command that gives you a little more control over
the sorting, you can pass in additional :sort flags like u, i, n etc and
also use it with a `!` to sort in reverse order.
Altered table mode behavior such that if there is a header line, i.e.
the first line of the table is separated by a border with the rest of
the table, then it is not taken into account for formulas and cell
arithmetic