How do I have vim and a console in the same window? For example, I am splitting up the vim window into multiple windows (vertically or horizontally). What I want is to have the code window on the left side, and the interpreter or console or whatever on the right side, so I can easily switch between them. How does that work? Is there something there for this?
You probably are looking for GNU Screen.
From this tutorial
Don't forget the vim
quickfix
commands for the edit-compile cycle (see:help quickfix
and:help make
).Maybe it's a radical suggestion but consider using a tiling window manager. In the following screenshot you can see vim in the left column, with the quickfix window opened, and on the right an xterm used to launch and test the application. The window manager used is called wmii.
You can also try tmux , which is an alternative to GNU screen and is actively developed. You can set screen like shortcuts and have a nice configurable status bar.
You can use the VIM-Shell patch. This way, you don't have to remember to create a screen session for Vim before editing.
If you don't use vim-specific features (but rather use only vi-compatible commands), you might try vile, a vi clone with intelligent multiple buffer handling, more similar to emacs.
This also has the advantage of allowing you to use your editor inside a screen session without removing your use of any other screen windows.
You could try the Conque Shell plugin. Haven't tried this yet myself but it's got a high (1:3) rating-to-download ratio, and claims to do just what you want. The actual rating is pretty decent, especially since it's only been around since 2009-09, and only hit version 1.0 in February. The advantage of using this over the VIM-Shell patch is that you don't have to patch vim; you just install the plugin in your ~/.vim directory.
You may also be interested in trying the Dynamic Virtual Terminal Manager. It does something similar to the
screen
features highlighted in a previous answer, but is in my opinion easier to work with. Here are some of the default keybindings:Ctrl+G C Create a new shell window
Ctrl+G X Close focused window
Ctrl+G J Focus next window
Ctrl+G K Focus previous window
Ctrl+G G Organize windows in a grid layout
Ctrl+G T Organize windows in a vertical stack tiling layout
Ctrl+G B Organize windows in a horisontal stack tiling layout
Ctrl+G M Maximize current window (display one window at the time)
Ctrl+G . Minimize current window (show only window title)
DVTM also supports mouse integration; simply click on a terminal window in order to select it. Screenshots are available at the website linked above.