aboutsummaryrefslogtreecommitdiffstats
path: root/src/base.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/base.vim')
-rw-r--r--src/base.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/base.vim b/src/base.vim
new file mode 100644
index 0000000..fc30e05
--- /dev/null
+++ b/src/base.vim
@@ -0,0 +1,28 @@
+"
+" reStructuredText tables plugin
+" Language: Python (ft=python)
+" Maintainer: Vincent Driessen <vincent@datafox.nl>
+" Version: Vim 7 (may work with lower Vim versions, but not tested)
+" URL: http://github.com/nvie/vim-rst-tables
+"
+
+" Only do this when not done yet for this buffer
+if exists("g:loaded_rst_tables_ftplugin")
+ finish
+endif
+let loaded_rst_tables_ftplugin = 1
+
+python << endpython
+__PYTHON_SOURCE__
+endpython
+
+" Add mappings, unless the user didn't want this.
+" The default mapping is registered, unless the user remapped it already.
+if !exists("no_plugin_maps") && !exists("no_rst_table_maps")
+ if !hasmapto('CreateTable(')
+ noremap <silent> <leader><leader>c :call CreateTable()<CR>
+ endif
+ if !hasmapto('ReformatTable(')
+ noremap <silent> <leader><leader>f :call ReformatTable()<CR>
+ endif
+endif