Skip to content

Commit 292f47d

Browse files
committed
Fix run_these_lines() maps
1 parent 0437e45 commit 292f47d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ftplugin/python/ipy.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ augroup END
149149
noremap <Plug>(IPython-RunFile) :update<CR>:Python2or3 run_this_file()<CR>
150150
noremap <Plug>(IPython-ImportFile) :update<CR>:Python2or3 run_this_file('-n')<CR>
151151
noremap <Plug>(IPython-RunLine) :Python2or3 run_this_line()<CR>
152-
noremap <Plug>(IPython-RunLines) :Python2or3 run_these_lines()<CR>
152+
if has('python3') && get(g:, 'pymode_python', '') !=# 'python'
153+
noremap <Plug>(IPython-RunLines) :python3 run_these_lines()<CR>
154+
else
155+
noremap <Plug>(IPython-RunLines) :python run_these_lines()<CR>
156+
endif
153157
noremap <Plug>(IPython-OpenPyDoc) :Python2or3 get_doc_buffer()<CR>
154158
noremap <Plug>(IPython-UpdateShell) :Python2or3 if update_subchannel_msgs(force=True): echo("vim-ipython shell updated",'Operator')<CR>
155159
noremap <Plug>(IPython-ToggleReselect) :Python2or3 toggle_reselect()<CR>

0 commit comments

Comments
 (0)