Interactive terminal in VIM

I use Vim to edit the source code, but I would also like to have a terminal built into the vim window (like in Kate, you know).

Now I saw the vimsh plugin that turns the vim buffer into an interactive terminal, but I don't like two things:

  • It opens automatically at startup. Can I disable it and call the terminal with a special command when I want?

  • It splits the window into two parts and occupies the upper window, but I would like it to occupy the lower window. Could this be organized?

PS: I'm not just a wim-guru :)

+6
linux vim ide
source share
4 answers

Perhaps this is what you want: Conque Shell - VIM Plugin

+9
source share

There is also an older patch that you can apply. This requires recompiling the VIM source code.

0
source share

Perhaps I will not answer exactly your question, but in any case I will offer a different approach to working with Vim and the terminal.

The first approach is to run shell commands directly from vim in command mode, adding them with "!":

:!ls 

will run the ls command and display it in a time window. This is useful if you just want to run one or more commands.

If you want to chat longer, I suggest pausing the vim session with Ctrl-z , working in the shell and releasing fg as the last command to return to vim.

Hope this helps you.

0
source share

Another option you can try is to use tmux / screen to separate your terminal so that you can run vim on one panel and have your shell in another. I also generously use Control Z to go to the shell from vim, and then fg to return to vim after finishing working with the shell.

0
source share

All Articles