Slimv - Change REPL Vertical Split

331 views Asked by At

I am using Slimv (version 0.9.13) with Vim (version 7.4). When I compile or run code or do anything that opens the REPL, it always opens in a window above my code, with the height split 50/50. Is it possible to make it open in a smaller window and below my source code by default?

1

There are 1 answers

0
EvergreenTree On BEST ANSWER

According to the documentation (https://github.com/vim-scripts/slimv.vim/blob/master/doc/slimv.txt#L461) doing the below should make the REPL open in a split below the current window.

let g:slimv_repl_split=2

As for the size of the window, I don't think slimv provides an option for that. However, I think an autocommand could do the trick.

autocmd BufEnter REPL :20wincmd _

'20' Can be replaced by whatever height you want the window to be, and 'REPL' should be replaced by the name of the REPL buffer. The default value g:slimv_repl_name is 'REPL' so it should work. If you need any more information on the commands used in this solution, you can read these in vim:

:help :autocmd
:help autocmd-events
:help :wincmd