Skip to content

Commit d9384fa

Browse files
committed
append empty line to end of vim-ipython shell
This makes it easier and quicker to start interacting with IPython through the vim-ipython buffer in vim, because you can just start typing right away without having to make a new line
1 parent 7c8e00e commit d9384fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ftplugin/python/ipy.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def update_subchannel_msgs(debug=False):
274274
b.append(s.splitlines())
275275
except:
276276
b.append([l.encode(vim_encoding) for l in s.splitlines()])
277+
# make a newline so we can just start typing there
278+
if b[-1] != '':
279+
b.append([''])
277280
vim.command('normal G') # go to the end of the file
278281
if not startedin_vimipython:
279282
vim.command('normal p') # go back to where you were

0 commit comments

Comments
 (0)