Commit Graph

28 Commits

Author SHA1 Message Date
Dhruva Sagar
652de4d29c Releasing v4.2.0
* Refactored cell & formula logic out into separate files
* Added more tests to test things independently.
2014-04-09 11:20:10 +05:30
Dhruva Sagar
5012486cbe Fixed function references in plugin 2014-04-07 19:10:26 +05:30
Dhruva Sagar
de2039dd24 Removed a config by mistake 2014-04-07 12:37:48 +05:30
Dhruva Sagar
7eef29529d Removed erroneous configs 2014-04-07 12:07:36 +05:30
Dhruva Sagar
f20ff17b42 Updated plugin mappings 2014-04-06 11:56:30 +05:30
Dhruva Sagar
b63b0401a0 Refactored code into autoload/tablemode/table.vim 2014-04-06 03:54:32 +05:30
Dhruva Sagar
6d2ade59dc Added command TableModeRealign 2014-03-18 18:25:15 +05:30
Dhruva Sagar
8e37d67505 Fixed tablemode#TableMotion, supports [count] 2014-03-18 18:20:58 +05:30
Dhruva Sagar
10ab0425f6 Fixes #17
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.
2014-01-29 11:32:30 +05:30
Dhruva Sagar
5c42d58d4b Updated table mode
- Bumped version
- Added new mapping \t? to echo current cells representation for
  defining formulas.
- Updated docs
2013-12-31 12:30:52 +05:30
Dhruva Sagar
8609ad4778 Releasing version 3.3.1
* Borders are now disregarded, so add as many as you'd like.
* Improved test coverage.
2013-12-11 12:48:25 +05:30
Dhruva Sagar
e94bbcc0b4 Switched to using || mapping for table border generation, more intuitive & create a minimal border on a new line without a table 2013-11-13 08:45:15 +05:30
Dhruva Sagar
0799523ffb Releasing v3.2
* Added tests to test various use cases
* Added .travis.yml for travis integration
2013-09-19 12:28:47 +05:30
Dhruva Sagar
cca55e72ce Releasing Table Mode v3.1
* 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.
2013-09-19 02:10:49 +05:30
Dhruva Sagar
0810512c54 Fixed #8
- 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.
2013-05-18 03:58:03 +05:30
Dhruva Sagar
dd38fcfeeb Releasing v3.0
- Added feature to define & add formula expressions to table and
  calculate them.
- Persist the fomulas as comments as line right after table.
2013-05-17 07:45:49 +05:30
Dhruva Sagar
f23737d5fa Releasing v2.1
- 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.
2013-03-20 07:24:54 +05:30
Dhruva Sagar
39d71ddfd3 Releasing v2.0
- Moved relevant code to autoload.
- Added markers for folding.
- Updated README.md
- Updated doc/text-mode.txt
2013-03-19 09:25:30 +05:30
Dhruva Sagar
ab11ee1035 Added normal mode mapping as well
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).
2013-03-18 19:01:14 +05:30
Dhruva Sagar
a3aba5100e Fixed Tableize indentation issue
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.
2013-03-18 17:57:14 +05:30
Dhruva Sagar
12700a2a3b Updated UpdateLineBorder function
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.
2013-03-18 17:55:01 +05:30
Dhruva Sagar
8169303d40 Added helpful comment for magic within TableizeRange 2013-03-18 17:20:17 +05:30
Dhruva Sagar
c94b91237e Added s:strlen for counting multibyte characters
Check :h strlen() for more details with regards to counting multibyte
characters accurately.
2013-03-18 17:06:15 +05:30
Dhruva Sagar
674f3e376c Removed unnecessary check 2013-03-18 16:11:31 +05:30
Dhruva Sagar
5defaa10e4 Fixed ConvertDelimiterToSeparator
- We now aggressively add separators to a line even if it does not have
  the g:table_mode_delimiter. If the user calls Tableize, we should
  trust the user he wishes to tableize everything. Earlier
  implementation skips & fails for lines in text that did not have the
  g:table_mode_delimiter and hence formed inconsistent tables.

  Everything can be undone with a single 'u' anyways.
2013-03-18 12:19:38 +05:30
Dhruva Sagar
b2ba3caf24 Added Tableize to wrap content into a table.
- Added :Tableize which accepts a range. It checks if the content has a
  delimiter defined by g:table_mode_delimiter and if so, it adds a table
  around it.
- Added <Leader>T mapping, which is defined by g:table_mode_tableize_map
  that applies :Tableize on the visually selected range.
- Added options for tableize.
- Updated vim doc.
2013-03-18 12:10:12 +05:30
Dhruva Sagar
b9eb7a25d5 Added more commands & updated help dpc
- Added :TableModeEnable to explicitly enable & :TableModeDisable to
  explicitly disable the plugin.
2013-03-17 04:37:11 +05:30
Dhruva Sagar
368d32de45 Table Mode v1.0 2013-03-17 03:56:43 +05:30