Skip to content

Commit 393ea4a

Browse files
committed
more straight-foward vim-ipython buffer setup
1 parent c57d9ae commit 393ea4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ftplugin/python/ipy.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def update_subchannel_msgs(debug=False):
198198
else:
199199
db = []
200200
b = vim.current.buffer
201-
startedin_vimipython = (b.name is not None and b.name.endswith('vim-ipython'))
201+
startedin_vimipython = vim.eval('@%')=='vim-ipython'
202202
if not startedin_vimipython:
203203
# switch to preview window
204204
vim.command(
@@ -217,9 +217,9 @@ def update_subchannel_msgs(debug=False):
217217
vim.command("pcl")
218218
vim.command("silent pedit +set\ ma vim-ipython")
219219
vim.command("wincmd P") #switch to preview window
220-
# subchannel window quick quit key 'q'
221-
vim.command('map <buffer> q :q<CR>')
222-
vim.command("set bufhidden=hide buftype=nofile ft=python")
220+
# subchannel window quick quit key 'q'
221+
vim.command('map <buffer> q :q<CR>')
222+
vim.command("set bufhidden=hide buftype=nofile ft=python")
223223

224224
#syntax highlighting for python prompt
225225
# QtConsole In[] is blue, but I prefer the oldschool green

0 commit comments

Comments
 (0)