Commit Graph

46 Commits

Author SHA1 Message Date
Paweł Tomak
84e382123d Use table_mode_map_prefix for the tableize mappings 2014-12-08 13:44:03 +01:00
Dhruva Sagar
29cae13802 Fixed #44
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.
2014-11-18 07:57:45 +05:30
Dhruva Sagar
bba22a4f04 Added g:table_mode_header_fillchar
* Allows configuring a separate character for header border to be used
  with pandoc
2014-11-16 13:40:14 +05:30
Dhruva Sagar
ffc734c38d Added TableModeEnabled & TableModeDisabled autocmd
* Added custom User autocmds TableModeEnabled & TableModeDisabled for
  working with other plugins like vim-pandoc #43
2014-11-15 16:38:22 +05:30
Dhruva Sagar
ea78f62565 Releasing Table Mode v4.6.1
* Added configurable table mappings.
* Updated docs & README.
2014-10-28 13:31:16 +05:30
Dhruva Sagar
ef0eef0f35 Fixed #38
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.
2014-09-17 01:36:59 +05:30
Dhruva Sagar
8683146a5f Removed unnecessary code / headers 2014-08-15 07:55:19 +05:30
Alex Rodionov
67969ae5cf Set table_mode_disable_mappings to 0 by default 2014-07-23 10:23:09 +07:00
Dhruva Sagar
0f1254e1fe Updated table syntax to get toggled with table mode 2014-05-30 12:05:31 +05:30
Dhruva Sagar
e7e806916f Refactored toggleMapping 2014-05-30 11:49:13 +05:30
Dhruva Sagar
9336261063 Added cell text object for visual mode 2014-05-15 11:02:21 +05:30
Dhruva Sagar
80ec86e385 Version 4.4.2
* Updated mappings to be buffer local
* Updated mappings to toggle with Table Mode
2014-05-13 11:18:42 +05:30
Dhruva Sagar
7258a56d20 Updated Table syntax to incorporate commented tables 2014-05-04 10:13:40 +05:30
Dhruva Sagar
8d3c4912a2 Added syntax for matching tables 2014-05-03 02:19:19 +05:30
Dhruva Sagar
71051e2c22 Merge branch 'master' into feature/gfm_column_alignment
Conflicts:
	autoload/tablemode/table.vim
2014-04-25 14:31:33 +05:30
Dhruva Sagar
43d0c0ff6f Cosmetic refactoring
* Changed the API calls to be more sensible & simple and free of
  redundancy.
2014-04-25 11:09:14 +05:30
Dhruva Sagar
00c54e8e02 Refactoring alignment 2014-04-24 15:48:57 +05:30
Dhruva Sagar
cfbac6979d Fixed #25
Minor refactoring & corrected variable names
2014-04-23 11:27:25 +05:30
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