On Friday, September 7, 2012 1:10:17 AM UTC-4, Linda W wrote: > AndyHancock wrote: > > > This problem dogged me for many years, and I finally hunkered down to > > > chase it down. > > > > > > Here is the solution that I found works for me: > > > > > > "set shell=c:\cygwin\bin\bash.exe\ -i > > > "Won't always find ~/.bashrc cuz depending on how vim is launched, > > > "~ doesn't always resolve to c:/cygwin/home/$USERNAME > > > "let &shell='c:\cygwin\bin\bash.exe\ --rcfile c:\cygwin\home\' . > > > " \ $USERNAME . '\.bashrc' > > > "Backslashes are hated by bash. Also needs -i to ensure bash is > > > "interactive so that .bashrc is sourced > > > let &shell='c:\cygwin\bin\bash.exe --rcfile c:/cygwin/home/' . > > > \ $USERNAME . '/.bashrc -i' > > > " Depending on how vim is launched, c:/cygwin/home/$USERNAME > > > " will sometimes be equivalent to ~. If so, then it will be > > > " replaced by ~ in &shell. > > > > > > Thanks to all those who helped on the unix, bash, cygwin, and vim > > > forums. > > > > > > > > Wow... that looks complicated. > > > > Why don't you just set > > SHELL=C:/Bin/Bash.exe > > > > I have my cygwin in C:/ > > > > In my system environment vars (controlpanel->system-> > > advanced system settings(system properties)->Advanced-> > > Environment variables->System Variables, > > I have: > > > > DISPLAY=:0 > > CYGWIN=nodosfilewarning winsymlinks export > > PATH=C:\prog64\vim;%SystemRoot%\system32;%SystemRoot%;C:\bin;[other > > stuff]... > > SHELL=C:/Bin/Bash.exe > > > > Bash starts and runs it's RC vars, which pick up my home.. and > > that runs my .bashrc. > > > > One of the aliases I have in my bash startup files > > for gvim is "setsid gvim" > > > > That allows gvim to run in the background... > > > > Would that work for you? > > > > I let bash & cygwin figure out my userid and home ..
Thanks Linda, this worked perfectly for me. Though I did leave the "set shell=..." in my vimrc. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
