Thread: Help set gvim bash

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    169

    Help set gvim bash

    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!
    Last edited by glo; 04-03-2008 at 10:05 AM.

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by glo View Post
    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

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    169
    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.

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    169
    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"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SystemParametersInfo set wallpaper issues
    By A10 in forum Windows Programming
    Replies: 5
    Last Post: 03-14-2008, 07:39 PM
  2. Replies: 8
    Last Post: 01-18-2008, 04:06 AM
  3. The new FAQ
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 08-30-2006, 10:05 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  5. Set default directory with GetTempDir?
    By Bajanine in forum Windows Programming
    Replies: 2
    Last Post: 05-04-2003, 11:36 PM