aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin/rst_tables.vim
blob: c847c705093f1fe0a90335ef67dd50f0fdd369c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"
" 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
import vim
import os
import os.path
from vim_bridge import bridged



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