diff options
author | Vincent Driessen <vincent@datafox.nl> | 2010-08-20 10:27:41 +0200 |
---|---|---|
committer | Vincent Driessen <vincent@datafox.nl> | 2010-08-20 10:27:41 +0200 |
commit | 4422e1fbb74a85fd7167d9506c837cdfd09311ee (patch) | |
tree | 0ad81c6b8c7be28b52116ecfd706134ad72399d7 /tests/fixtures | |
parent | a53ef0ff2f7c8cc1f4efbabf59ed98ceb5bb2923 (diff) | |
download | vim-rst-tables-4422e1fbb74a85fd7167d9506c837cdfd09311ee.tar.gz vim-rst-tables-4422e1fbb74a85fd7167d9506c837cdfd09311ee.tar.bz2 vim-rst-tables-4422e1fbb74a85fd7167d9506c837cdfd09311ee.zip |
Implemented the "reflow" command.
For example, if you have the following table in your source file:
Type Message
Foo I like bananas very much. Even so much that I adore them.
Position your cursor in it and call ReformatTable(). This makes the
following:
+======+===========================================================+
| Type | Message |
+======+===========================================================+
| Foo | I like bananas very much. Even so much that I adore them. |
+------+-----------------------------------------------------------+
But if you don't like these kinds of long wrappings, you can now simply
remove (or add, for that matter) some of the '='-signs from the top row,
like this:
+======+================================+
| Type | Message |
+======+===========================================================+
| Foo | I like bananas very much. Even so much that I adore them. |
+------+-----------------------------------------------------------+
And then, call ReflowTable():
+======+================================+
| Type | Message |
+======+================================+
| Foo | I like bananas very much. Even |
| | so much that I adore them. |
+------+--------------------------------+
This fixed issue #1.
Diffstat (limited to 'tests/fixtures')
-rw-r--r-- | tests/fixtures/reflow.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/fixtures/reflow.txt b/tests/fixtures/reflow.txt new file mode 100644 index 0000000..f1dbc1e --- /dev/null +++ b/tests/fixtures/reflow.txt @@ -0,0 +1,14 @@ +This is paragraph text *before* the table. + ++==========+==========================+ +| Column 1 | Column 2 | ++==========+================================================================================================+ +| Foo | Put two (or more) spaces as a field separator. | ++----------+------------------------------------------------------------------------------------------------+ +| Bar | Even very very long lines like these are fine, as long as you do not put in line endings here. | ++----------+------------------------------------------------------------------------------------------------+ +| Qux | This is the last line. | ++----------+------------------------------------------------------------------------------------------------+ + +This is paragraph text *after* the table, with +a line ending. |