Python in Vim buffer?

Is it possible to have a Python interpreter open in a Vim buffer? Something like:

________________________
|                      |
|                      |
|  my python script    |
|                      |
|                      |
------------------------
|                      |
|  python interpreter  |
------------------------

Right now I have Vim open and a separate interpreter open. I saw the answer to this and was blown away.

Anyway, thanks for the help and if there is something I can just google then point me in that direction.

How to modify a Vim buffer with a python script?

The official Vim python interface documentation states, that modifying buffers with python is very simple, basically: :py import vim :py vim.current.buffer[0] = Hello world However, python throws a

Vim python’s buffer.append(line) switch window’s focus

I am trying to fill Vim’s buffer from separate thread by using this python code. python << PYTHON_CODE import vim import time buffer_number = -1 class AppendLineTest( Thread ): def run(self): bu

Change the color of line in buffer using Vim+Python

I’m using Vim python for writing a plugin, I want to know how I can change the color of line number based on vim.buffers from the vim module and also execute commands specific to the buffer. I skimmed

VIM unsaved buffer warning

I am using FuzzyFinder with vim to open files and switch between buffers. It works like a charm except when the current file I am working on has some changes. Vim wouldn’t let me switch the buffer til

vim: move to buffer?

Is there a function in Vim which will move to a buffer? For example, if I know that I have “TODO.txt” open in some window in some tab, I’d like to jump to that tab and focus that window. Is that possi

VIM: Referring to current buffer in key mappings

I would like to map a certain key mapping to make the Python interpreter run the current edited buffer in VIM. What I’m doing now (manually): :!python <FILENAME> But I’d like the variable to

Set python virtualenv in vim

I use vim for coding and for python coding in particular. Often I want to execute the current buffer with python interpreter. (for example to run unittests), usually I do this with :!python % <Ente

Buffer switcher plugin for vim

I’m looking for a buffer switcher plugin for vim. It’s shown in the following screenshot. Can anyone tell me what it is and how to get it?

Get offset of current buffer in vim (in particular, via python scripting)

i want to get the offset of the current cursor position the current selection range in vim, beginning from the start of the file. I do this in python, so hints how to do it with vim’s python script

Always create scratch buffer on vim startup?

Maybe someone has a way to always start vim with scratch buffer? Ideally always with same buffer id (again ideally 1:) ), but maybe just simply named scratch buffer with chose name. Also if starting w

Answers

Check out Pimp. Also, read this related question.

what you want is have a vim window act as a terminal. AFAIK vim can’t do this (yet?). otoh, if you aren’t wed to vim (yet), try emacs, which does have that feature.

No, you can’t run a shell in Vim by default. That’s by design.

However, there are a handful of ways to accomplish this:

You could have a look at PIDA. Not exactly what you asked for but it is a Python IDE that embeds vim so might do the trick.

Looks like this vim plugin seems to do the job.

http://www.vim.org/scripts/script.php?script%5Fid=2043

This can be accomplished with tmux and tslime.vim.

See this post for more info: http://joshuadavey.com/post/15619414829/faster-tdd-feedback-with-tmux-tslime-vim-and