From c57d9aeaedaf38735a1644ba6b9cce8790f4151b Mon Sep 17 00:00:00 2001 From: Paul Ivanov Date: Thu, 10 Nov 2011 18:58:20 -0800 Subject: [PATCH] make vim-ipython buffer always modifiable this fixes a bug which prevented from modifying the 'vim-ipython' buffer if it was first invoked from a buffer that was readonly - such as the vim help buffers. --- ftplugin/python/ipy.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ftplugin/python/ipy.vim b/ftplugin/python/ipy.vim index f3278dc..87a2b17 100644 --- a/ftplugin/python/ipy.vim +++ b/ftplugin/python/ipy.vim @@ -205,7 +205,7 @@ def update_subchannel_msgs(debug=False): "try" "|silent! wincmd P" "|catch /^Vim\%((\a\+)\)\=:E441/" - "|silent pedit vim-ipython" + "|silent pedit +set\ ma vim-ipython" "|silent! wincmd P" "|endtry") # if the current window is called 'vim-ipython' @@ -215,8 +215,8 @@ def update_subchannel_msgs(debug=False): else: # close preview window, it was something other than 'vim-ipython' vim.command("pcl") - vim.command("silent pedit vim-ipython") - vim.command("normal P") #switch to preview window + vim.command("silent pedit +set\ ma vim-ipython") + vim.command("wincmd P") #switch to preview window # subchannel window quick quit key 'q' vim.command('map q :q') vim.command("set bufhidden=hide buftype=nofile ft=python")