Help set gvim bash [Archive] - C Board

PDA

View Full Version : Help set gvim bash


glo
04-03-2008, 10:02 AM
Hi.
I'm trying to learn vim.

Is it possible to change gvim's shell from the default cmd.exe to my lovely msys sh?
I want to be able to run make or execute a newly compiled program from within gvim, and preferably hotkey these actions.

Thanks!

brewbuck
04-03-2008, 12:00 PM
Hi.
I'm trying to learn vim.

Is it possible to change gvim's shell from the default cmd.exe to my lovely msys sh?
I want to be able to run make or execute a newly compiled program from within gvim, and preferably hotkey these actions.

Thanks!

Add this to your .vimrc (or whatever the equivalent is for gvim on Windows):

set shell=/path/to/shell

glo
04-03-2008, 12:53 PM
How can I configure the path to point to sh.exe if it needs the following arguments: "--login -i" ?
I tried both:
set shell="/path/to/sh.exe --login -i"
set shell=/path/to/sh.exe --login -i
but neither worked.

glo
04-04-2008, 07:44 AM
Problem solved.

first put this in the vimrc file:
set shell=path\to\sh\ --login\ -c

next edit msys's ~/.profile configuration and comment out the last part where it autoexecs a cd to $(HOME) :
#cd "$HOME"
instead of
cd "$HOME"