Because tablemode#spreadsheet#DeleteColumn() and
tablemode#spreadsheet#DeleteRow() take v:count1 into account, the
automatic repetition of vim has to be suppressed.
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.
This is for better experience with auto align, we override the
updatetime with the value of the configuration g:table_mode_update_time.
Once table mode is disabled prior defaults are restored.
Symptom:
when trying to sort a column using <leader>ts the following error would
be displayed:
E119: Not enough arguments for function: tablemode#spreadsheet#Sort
Problem:
Function call tablemode#spreadsheet#Sort() was missing a arguemnts for
it's named parameter bang.
Solution:
Add a blank value of '' as the argument for the bang parameter
----
Related Issues: #38
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.
Added a new configuration option g:table_mode_corner_corner to
correspond to the extreme corners of the table border, by default it is
set to '|' to maintain backward compatibility but it can be overriden to
anything else.
* Removed table border and related options. You can now optionally have
a header instead, simply add a table header and add a border to it
triggered by the vim iabbrev '+-' on the line immidiately after the
header and it will expand to the correct border. It will auto update
as the table realigns with changes. Similar approach as followed by
tables in org-mode.
* Fixed bug of incorrect indentation of a newly added formula line.
* Fixed bug in ConvertDelimiterToSeparator causing incorrect
tableization of commented blocks of delimited content.
- Renamed option for eval_expr.
- Defined a new option `g:table_mode_map_prefix` set to `<Leader>t` by
default to be used as a prefix for all other table mode commands.
- Updated docs to reflect the same.
- Updated README.
- Moved plugin to an after/plugin to ensure table-mode is loaded after
Tabularize.
- Gracefully exit with appropriate error message in case Tabularize is
not available and skip loading of plugin.
- Fixed typo in copyright.
- Updated version numbers across.
This allows you to do [count]<Leader>T eg.) 10\T (\ is the leader key on
my system). That will Tableize the next 10 lines into a table. Can be
faster than visual at times, also works faster if you want to tableize
just the current line (I know this is not a very useful scenario).
When applying Tableize on an indented code, the table was created
however the indentation was lost in the process. Earlier the function
s:ConvertDelimiterToSeparator(line) was replace the ^ (start of line),
the g:table_mode_delimiter and $ (end of line) with
g:table_mode_separator and then processing each line for creation of the
table around it, hence since the start of line was replaced it was
causing the indentation to be lost. Fixed this by replacing ^\s*\zs\ze.
(matches just before the first non-blank character) along with
g:table_mode_delimiter and $ and hence the indentation is preserved.
Rather than get a variable number of arguments to make it optional I now
require one argument, the line number to operate on for the function
UpdateLineBorder. Makes sense to be this way.
Also improved some conditionals for better readability.