@@ -14,31 +14,36 @@ execute, and also get back object introspection and word completions in
1414Vim, like what you get with: ``object?<enter> `` and ``object.<tab> `` in
1515IPython.
1616
17- The big change from previous versions of ``ipy.vim `` is that it no longer
18- requires the old brittle ``ipy_vimserver.py `` instantiation, and since
17+ The big change from previous versions of ``ipy.vim `` is that it no longer
18+ requires the old brittle ``ipy_vimserver.py `` instantiation, and since
1919it uses just vim and python, it is platform independent (i.e. should work
2020even on windows, unlike the previous \* nix only solution). The requirements
2121are IPython 0.11+ with zeromq capabilities, vim compiled with +python.
2222
23- If you can launch ``ipython qtconsole `` and ``:echo has('python') `` returns 1
24- in vim, you should be good to go.
23+ If you can launch ``ipython qtconsole `` or ``ipython kernel ``, and
24+ `` :echo has('python') `` returns 1 in vim, you should be good to go.
2525
2626-----------------
2727Quickstart Guide:
2828-----------------
2929Start ``ipython qtconsole `` [*]_ and copy the connection string.
3030Source ``ipy.vim `` file, which provides new IPython command::
3131
32- :source ipy.vim
32+ :source ipy.vim
3333 (or copy it to ~/.vim/ftplugin/python to load automatically)
3434
35- :IPythonClipboard
35+ :IPythonClipboard
3636 (or :IPythonXSelection if you're using X11 without having to copy)
3737
38- The :IPython command allows you to put the full string, e.g.::
38+ The :IPython command allows you to put the full connection string. For IPython
39+ 0.11, it would look like this::
3940
4041 :IPython --existing --shell=41882 --iopub=43286 --stdin=34987 --hb=36697
4142
43+ and for IPython 0.12, like this::
44+
45+ :IPython --existing kernel-85997.json
46+
4247The ``:IPythonClipboard `` command just uses the ``+ `` register to get the
4348connection string, whereas ``:IPythonXSelection `` uses the ``* `` register
4449
@@ -77,7 +82,7 @@ It also works blockwise in Visual Mode. Select and send these lines using
7782 '%d'*len(code)%code == str(int(math.pi*1e5))
7883
7984Then, go to the qtconsole and run this line::
80-
85+
8186 print secret_decoder(_i,_)
8287
8388You can also send whole files to IPython's ``%run `` magic using ``<F5> ``.
@@ -106,7 +111,7 @@ vim-ipython 'shell'
106111**NEW since IPython 0.11 **!
107112
108113By monitoring km.sub_channel, we can recreate what messages were sent to
109- IPython, and what IPython sends back in response.
114+ IPython, and what IPython sends back in response.
110115
111116``monitor_subchannel `` is a parameter that sets whether this 'shell' should
112117updated on every sent command (default: True).
@@ -124,6 +129,7 @@ You can change these at the top of the ipy.vim::
124129 monitor_subchannel = True # update vim-ipython 'shell' on every send?
125130 run_flags= "-i" # flags to for IPython's run magic when using <F5>
126131
132+ **Disabling default mappings **
127133In your own ``.vimrc ``, if you don't like the mappings provided by default,
128134you can define a variable ``let g:ipy_perform_mappings=0 `` which will prevent
129135vim-ipython from defining any of the default mappings.
@@ -135,25 +141,25 @@ Current issues:
135141- The ipdb integration is not yet re-implemented.
136142- If you're running inside ``screen ``, read about the ``<CTRL-S> `` issue `here
137143 <http://munkymorgy.blogspot.com/2008/07/screen-ctrl-s-bug.html> `_, and add
138- this line to your ``.bashrc `` to fix it::
144+ this line to your ``.bashrc `` to fix it::
139145
140- stty stop undef # to unmap ctrl-s
146+ stty stop undef # to unmap ctrl-s
141147
142148- In vim, if you're getting ``ImportError: No module named
143149 IPython.zmq.blockingkernelmanager `` but are able to import it in regular
144150 python, **either **
145151
146152 1. your ``sys.path `` in vim differs from the ``sys.path `` in regular python.
147153 Try running these two lines, and comparing their output files::
148-
154+
149155 $ vim -c 'py import vim, sys; vim.current.buffer.append(sys.path)' -c ':wq vim_syspath'
150156 $ python -c "import sys; f=file('python_syspath','w'); f.write('\n'.join(sys.path)); f.close()"
151-
157+
152158 **or **
153159
154160 2. your vim is compiled against a different python than you are launching. See
155161 if there's a difference between ::
156-
162+
157163 $ vim -c ':py import os; print os.__file__' -c ':q'
158164 $ python -c ':py import os; print os.__file__'
159165
@@ -170,15 +176,14 @@ Current issues:
170176 ``monitor_subchannel `` is set. This is a bug in minibufexpl.vim and the workaround
171177 is described in vim-ipython issue #7.
172178
173- ------
174- Thanks
175- ------
179+ ----------------------------
180+ Thanks and Bug Participation
181+ ----------------------------
176182* @MinRK for guiding me through the IPython kernel manager protocol.
177-
178- *Bugs *
179-
180183* @nakamuray and @tcheneau for reporting and providing a fix for when vim is compiled without a gui (#1)
181184* @unpingco for reporting Windows bugs (#3,#4)
182185* @simon-b for terminal vim arrow key issue (#5)
183186* @jorgesca and @kwgoodman for shell (#6)
184187* @zeekay for easily allowing custom mappings (#9)
188+ * @minrk for support of connection_file-based IPython connection (#13)
189+ * @jorgesca for reporting the lack of profile handling capability (#14)
0 commit comments