File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,13 @@ augroup END
149
149
noremap <Plug> (IPython-RunFile) :update<CR> :Python2or3 run_this_file()<CR>
150
150
noremap <Plug> (IPython-ImportFile) :update<CR> :Python2or3 run_this_file('-n')<CR>
151
151
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
+ xnoremap <Plug> (IPython-RunLinesAsTopLevel) :python3 dedent_run_these_lines()<CR>
155
+ else
156
+ noremap <Plug> (IPython-RunLines) :python run_these_lines()<CR>
157
+ xnoremap <Plug> (IPython-RunLinesAsTopLevel) :python dedent_run_these_lines()<CR>
158
+ endif
153
159
noremap <Plug> (IPython-OpenPyDoc) :Python2or3 get_doc_buffer()<CR>
154
160
noremap <Plug> (IPython-UpdateShell) :Python2or3 if update_subchannel_msgs(force=True): echo("vim-ipython shell updated",'Operator')<CR>
155
161
noremap <Plug> (IPython-ToggleReselect) :Python2or3 toggle_reselect()<CR>
@@ -162,7 +168,6 @@ noremap <Plug>(IPython-ToggleSendOnSave) :call <SID>toggle_send_on_save()<CR>
162
168
noremap <Plug> (IPython-PlotClearCurrent) :Python2or3 run_command("plt.clf()")<CR>
163
169
noremap <Plug> (IPython-PlotCloseAll) :Python2or3 run_command("plt.close('all')")<CR>
164
170
noremap <Plug> (IPython-RunLineAsTopLevel) :Python2or3 dedent_run_this_line()<CR>
165
- xnoremap <Plug> (IPython-RunLinesAsTopLevel) :Python2or3 dedent_run_these_lines()<CR>
166
171
167
172
function ! s: DoMappings ()
168
173
let b: did_ipython = 1
You can’t perform that action at this time.
0 commit comments