1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-02 01:30:28 +08:00
2019-06-09 14:11:17 +08:00

36 lines
1.3 KiB
VimL

"=============================================================================
" ipynb.vim --- SpaceVim lang#ipynb layer
" Copyright (c) 2016-2019 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
function! SpaceVim#layers#lang#ipynb#plugins() abort
let plugins = []
" TODO: use remote plugin https://github.com/szymonmaszke/vimpyter
call add(plugins, ['wsdjeg/vimpyter', {'merged' : 0}])
return plugins
endfunction
function! SpaceVim#layers#lang#ipynb#config() abort
call SpaceVim#mapping#space#regesit_lang_mappings('ipynb', function('s:language_specified_mappings'))
endfunction
function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','p'],
\ 'VimpyterInsertPythonBlock',
\ 'insert python block', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','u'],
\ 'VimpyterUpdate',
\ 'update note book', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','j'],
\ 'VimpyterStartJupyter',
\ 'start jupyter', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','n'],
\ 'VimpyterStartNteract',
\ 'start nteract', 1)
endfunction