aboutsummaryrefslogtreecommitdiffstats
path: root/src/base.vim
diff options
context:
space:
mode:
authorVincent Driessen <vincent@datafox.nl>2010-08-20 10:27:41 +0200
committerVincent Driessen <vincent@datafox.nl>2010-08-20 10:27:41 +0200
commit4422e1fbb74a85fd7167d9506c837cdfd09311ee (patch)
tree0ad81c6b8c7be28b52116ecfd706134ad72399d7 /src/base.vim
parenta53ef0ff2f7c8cc1f4efbabf59ed98ceb5bb2923 (diff)
downloadvim-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 'src/base.vim')
-rw-r--r--src/base.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base.vim b/src/base.vim
index 46bdb05..037a9dd 100644
--- a/src/base.vim
+++ b/src/base.vim
@@ -24,6 +24,9 @@ endpython
" The default mapping is registered, unless the user remapped it already.
if !exists("no_plugin_maps") && !exists("no_rst_table_maps")
if !hasmapto('ReformatTable(')
- noremap <silent> <leader><leader>f :call ReformatTable()<CR>
+ noremap <silent> <leader><leader>c :call ReformatTable()<CR>
+ endif
+ if !hasmapto('ReflowTable(')
+ noremap <silent> <leader><leader>f :call ReflowTable()<CR>
endif
endif