Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IPython 3.0. #114

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
language: vim

before_install: |
sudo apt-get update -qq
sudo apt-get install python-pip
sudo pip install --upgrade pyzmq

before_script: |
git clone https://github.com/junegunn/vader.vim.git
git clone https://github.com/ipython/ipython.git

script: |
vim -Nu <(cat << VIMRC
PYTHONPATH=ipython python -m IPython notebook --no-browser &
PYTHONPATH=ipython vim -Nu <(cat << VIMRC
filetype off
set rtp+=vader.vim
set rtp+=.
set rtp+=after
filetype plugin indent on
VIMRC) -c 'Vader! test/*' > /dev/null
42 changes: 21 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vim-ipython

A two-way integration between Vim and IPython.

IPython versions 0.11.x, 0.12.x, 0.13.x, 1.x and 2.x
Supports IPython versions 0.11.x, 0.12.x, 0.13.x, 1.x, 2.x and 3.x.

* author: Paul Ivanov (http://pirsquared.org)
* github: http://github.com/ivanov/vim-ipython
Expand All @@ -18,12 +18,12 @@ IPython.

The big change from previous versions of ``ipy.vim`` is that it no longer
requires the old brittle ``ipy_vimserver.py`` instantiation, and since
it uses just vim and python, it is platform independent (i.e. works
even on windows, unlike the previous \*nix only solution). The requirements
are IPython 0.11 or newer with zeromq capabilities, vim compiled with +python.
it uses just Vim and Python, it is platform independent (i.e. works
even on Windows, unlike the previous \*nix only solution). The requirements
are IPython 0.11 or newer with ZeroMQ capabilities, Vim compiled with +python.

If you can launch ``ipython qtconsole`` or ``ipython kernel``, and
``:echo has('python')`` returns 1 in vim, you should be good to go.
``:echo has('python')`` returns 1 in Vim, you should be good to go.

-----------------
Quickstart Guide:
Expand Down Expand Up @@ -119,7 +119,7 @@ IPython's object? Functionality
-------------------------------

If you're using gvim, mouse-over a variable to see IPython's ``?`` equivalent.
If you're using vim from a terminal, or want to copy something from the
If you're using Vim from a terminal, or want to copy something from the
docstring, type ``<leader>d``. ``<leader>`` is usually ``\`` (the backslash
key). This will open a quickpreview window, which can be closed by hitting
``q`` or ``<escape>``.
Expand All @@ -128,7 +128,7 @@ key). This will open a quickpreview window, which can be closed by hitting
IPython's tab-completion Functionality
--------------------------------------
vim-ipython activates a 'completefunc' that queries IPython.
A completefunc is activated using ``Ctrl-X Ctrl-U`` in Insert Mode (vim
A completefunc is activated using ``Ctrl-X Ctrl-U`` in Insert Mode (Vim
default). You can combine this functionality with SuperTab to get tab
completion.

Expand All @@ -146,7 +146,7 @@ If at any later time you wish to bring this shell up, including if you've set
``monitor_subchannel=False``, hit ``<leader>s``.

**NEW since IPython 0.12**
For local kernels (kernels running on the same machine as vim), `Ctrl-C` in
For local kernels (kernels running on the same machine as Vim), `Ctrl-C` in
the vim-ipython 'shell' sends an keyboard interrupt. (Note: this feature may
not work on Windows, please report the issue to ).

Expand Down Expand Up @@ -205,10 +205,10 @@ editor and REPL combination.
---------------
Known issues:
---------------
- For now, vim-ipython only connects to an ipython session in progress.
- The standard ipython clients (console, qtconsole, notebook) do not currently
- For now, vim-ipython only connects to an IPython session in progress.
- The standard IPython clients (console, qtconsole, notebook) do not currently
display the result of computation which they did not initialize. This means
that if you send print statements for execution from within vim, they will
that if you send print statements for execution from within Vim, they will
only be shown inside the vim-ipython shell buffer, but **not** within any of
the standard clients. This is not a limitation of vim-ipython, but a
limitation of those built-in clients, see `ipython/ipython#1873
Expand All @@ -217,30 +217,30 @@ Known issues:
[IPython PR #3089](https://github.com/ipython/ipython/pull/3089)
- If ``<CTRL-S>`` does not work inside your terminal, but you are able to run
some of the other commands successfully (``<F5>``, for example), try running
this command before launching vim in the terminal (add it to your
this command before launching Vim in the terminal (add it to your
``.bashrc`` if it fixes the issue)::

stty stop undef # to unmap ctrl-s

- In vim, if you're getting ``ImportError: No module named
- In Vim, if you're getting ``ImportError: No module named
IPython.zmq.blockingkernelmanager`` but are able to import it in regular
python, **either**
Python, **either**

1. your ``sys.path`` in vim differs from the ``sys.path`` in regular python.
1. your ``sys.path`` in Vim differs from the ``sys.path`` in regular Python.
Try running these two lines, and comparing their output files::

$ vim -c 'py import vim, sys; vim.current.buffer.append(sys.path)' -c ':wq vim_syspath'
$ python -c "import sys; f=file('python_syspath','w'); f.write('\n'.join(sys.path)); f.close()"

**or**

2. your vim is compiled against a different python than you are launching. See
2. your Vim is compiled against a different Python than you are launching. See
if there's a difference between ::

$ vim -c ':py import os; print os.__file__' -c ':q'
$ python -c 'import os; print os.__file__'

- For vim inside a terminal, using the arrow keys won't work inside a
- For Vim inside a terminal, using the arrow keys won't work inside a
documentation buffer, because the mapping for ``<Esc>`` overlaps with
``^[OA`` and so on, and we use ``<Esc>`` as a quick way of closing the
documentation preview window. If you want go without this quick close
Expand Down Expand Up @@ -269,20 +269,20 @@ pull request with your attribution.
* @minrk for guiding me through the IPython kernel manager protocol, and
support of connection_file-based IPython connection (#13), and keeping
vim-ipython working across IPython API changes.
* @nakamuray and @tcheneau for reporting and providing a fix for when vim is
* @nakamuray and @tcheneau for reporting and providing a fix for when Vim is
compiled without a gui (#1)
* @unpingco for reporting Windows bugs (#3,#4), providing better multiline
dedenting (#15), and suggesting that a resized vim-ipython shell stays
resized (#16).
* @simon-b for terminal vim arrow key issue (#5)
* @simon-b for terminal Vim arrow key issue (#5)
* @jorgesca and @kwgoodman for shell update problems (#6)
* @xowlinx and @vladimiroff for Ctrl-S issues in Konsole (#8)
* @zeekay for easily allowing custom mappings (#9)
* @jorgesca for reporting the lack of profile handling capability (#14),
only open updating 'shell' if it is open (#29)
* @enzbang for removing mapping that's not currently functional (#17)
* @ogrisel for fixing documentation typo (#19)
* @koepsell for gracefully exiting in case python is not available (#23)
* @koepsell for gracefully exiting in case Python is not available (#23)
* @mrterry for activating completefunc only after a connection is made (#25),
Ctrl-C implementation in vim-ipython 'shell' (#28)
* @nonameentername for completion on import statements (#26)
Expand All @@ -301,7 +301,7 @@ Similar Projects
* `screen.vba`_ - Simulate a split shell, using GNU Screen / tmux, that you
can send commands to (Eric Van Dewoestine)
* `vimux`_ - vim plugin to interact with tmux (Ben Mills)
* `vimux-pyutils`_ - send code to tmux ipython session (Julien Rebetez)
* `vimux-pyutils`_ - send code to tmux IPython session (Julien Rebetez)
* conque_ - terminal emulator which uses a Vim buffer to display the program
output (Nico Raffo)
* `ipyqtmacvim`_ - plugin to send commands from MacVim to IPython Qt console
Expand Down
Loading