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.
This commit is contained in:
Dhruva Sagar
2013-03-18 12:02:48 +05:30
parent 71135d6b60
commit b2ba3caf24
4 changed files with 82 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
*table-mode.txt* Table Mode for easy table formatting. v1.0
===============================================================================
Table Mode, THE AWESOME AUTOMATIC TABLE CREATOR & FORMATTER
VERSION 1.0
VERSION 1.1
Author: Dhruva Sagar <http://dhruvasagar.com/>
License: MIT <http://opensource.org/licenses/MIT/>
@@ -55,6 +55,7 @@ Overview:
|table-mode-options-fillchar| ........ Set table fillchar character
|table-mode-options-toggle-map| ...... Set table mode toggle mapping
|table-mode-options-always-active| ... Set table mode to always enabled
|table-mode-options-delimiter| ....... Set the delimiter for Tableize
g:table_mode_loaded *table-mode-options-loaded*
Use this option to disable the plugin: >
@@ -99,32 +100,55 @@ g:table_mode_always_active *table-mode-options-always-active*
the table mode or |table-mode-commands-enable| to enable and
|table-mode-commands-disable| to disable mode when needed.
g:table_mode_delimiter *table-mode-options-delimiter*
Use this option to define the delimiter which used by
|table-mode-commands-tableize|
===============================================================================
MAPPINGS *table-mode-mappings*
*table-mode-mappings-toggle*
<Leader>tm Enable table mode for the current buffer. You can change this
using the |toggle-mode-options-toggle-map| option. This is
applicable only if |table-mode-options-always-active| is not set.
<Leader>tm Toggle table mode for the current buffer. You can change this
using the |toggle-mode-options-toggle-map| option.
NOTE This is applicable only if
|table-mode-options-always-active| is not set.
*table-mode-mappings-trigger*
| Trigger table creation in table mode. You can change this
using the |toggle-mode-options-separator| option.
<Leader>T Triggers |table-mode-commands-tableize| on the visually
selected content.
===============================================================================
COMMANDS *table-mode-commands*
*table-mode-commands-toggle*
:TableModeToggle
Toggles the table mode. Same effect as |toggle-mode-mappings-toggle|
Toggles the table mode. Same effect as |toggle-mode-mappings-toggle|.
NOTE this is applicable only if |table-mode-options-always-active| is
not set.
*table-mode-commands-enable*
:TableModeEnable
Enables Table Mode.
NOTE this is applicable only if |table-mode-options-always-active| is
not set.
*table-mode-commands-disable*
:TableModeDisable
Disables Table Mode.
Disables Table Mode.
NOTE this is applicable only if |table-mode-options-always-active| is
not set.
:Tableize *table-mode-commands-tableize*
This converts the current line into a table if it consists of
|table-mode-options-delimiter|. This accepts a range, without which it
applies on the current line.
===============================================================================
CONTRIBUTING *table-mode-contributing*

View File

@@ -1,6 +1,7 @@
table-mode-commands table-mode.txt /*table-mode-commands*
table-mode-commands-disable table-mode.txt /*table-mode-commands-disable*
table-mode-commands-enable table-mode.txt /*table-mode-commands-enable*
table-mode-commands-tableize table-mode.txt /*table-mode-commands-tableize*
table-mode-commands-toggle table-mode.txt /*table-mode-commands-toggle*
table-mode-contents table-mode.txt /*table-mode-contents*
table-mode-contributing table-mode.txt /*table-mode-contributing*
@@ -13,6 +14,7 @@ table-mode-options table-mode.txt /*table-mode-options*
table-mode-options-always-active table-mode.txt /*table-mode-options-always-active*
table-mode-options-border table-mode.txt /*table-mode-options-border*
table-mode-options-corner table-mode.txt /*table-mode-options-corner*
table-mode-options-delimiter table-mode.txt /*table-mode-options-delimiter*
table-mode-options-fillchar table-mode.txt /*table-mode-options-fillchar*
table-mode-options-loaded table-mode.txt /*table-mode-options-loaded*
table-mode-options-separator table-mode.txt /*table-mode-options-separator*