Jonathan Dewein
Jonathan Dewein

Reputation: 984

How do I use vim :split to open ghci and a Haskell file?

I am currently studying Write yourself a Scheme.

I love vim and want to use :split to have my top file be my Haskell file, and the bottom split to be ghci, repl.

However, split just opens files. Is this true? How do I open my top split and my Haskell file and my bottom split as ghci?

Upvotes: 4

Views: 711

Answers (1)

Daniel Wagner
Daniel Wagner

Reputation: 152707

You can use the :terminal command (thanks, @PeterRincker!) to create a terminal emulator split. Add the command you want to run; e.g. :terminal ghci.

My previous advice, which was predicated on the non-existence of :terminal (and should therefore probably be ignored), is included below for completeness rather than helpfulness.

If you actually mean vim (and not gvim), you can use tmux or similar. This vim plugin might be nice for automating interactions between the two tmux panes.

Otherwise you'll need to use a plugin for doing terminal stuff from within gvim. vimshell and conque look relevant in this space.

Upvotes: 6

Related Questions