Skip to content

Instantly share code, notes, and snippets.

@Varal7
Created February 12, 2019 18:38
Show Gist options
  • Save Varal7/16a172c359c1da41920024a51ea45ce0 to your computer and use it in GitHub Desktop.
Save Varal7/16a172c359c1da41920024a51ea45ce0 to your computer and use it in GitHub Desktop.
" Slime
let g:slime_target = "tmux"
let g:slime_default_config = {"socket_name": "default", "target_pane": "code:.0"}
let g:slime_dont_ask_default = 1
let g:slime_python_ipython = 1
let g:slime_preserve_curpos = 0
nmap <leader>v <Plug>SlimeConfig
"In visual mode, send selection
xmap <leader><leader> <Plug>SlimeRegionSend
xmap <leader>f <Plug>SlimeRegionSend`>}}{j
"In normal mode, send paragraph
nmap <leader>f <Plug>SlimeParagraphSend}}{j
"In insert mode, send paragraph
imap <leader>f <Esc><S-v><Plug>SlimeParagraphSend}a
"In normal mode, send current line
nmap <leader><leader> <S-v><Plug>SlimeRegionSend
"In insert mode, send current line
imap <leader><leader> <Esc><S-v><Plug>SlimeRegionSend}a
nmap <leader>n }}{j
nmap <leader>N `>}}{j
nmap <leader>p {{j
"nmap <leader>d v/# In[<CR><leader>f
map <leader>d o## -- ##<Esc>
map <leader>D O## -- ##<Esc>
imap <leader>d <CR>## -- ##<CR>
map <leader>S j?## -- ##<CR>v/## -- ##<CR><leader><leader>
map <leader>s j?## -- ##<CR>v/## -- ##<CR><leader>f
map <leader>= ^"ayt=o<Esc>"ap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment