Starting gvim from Windows
Jerry D. Hedden
jerry@hedden.us
Thu Mar 9 14:20:00 GMT 2006
Neil Watson asked:
> I have X running. How can I start Cygwin's build of Gvim from Windows,
> without doing from an xterm? I tried issuing gvim from a cmd window but
> I receive an error "cygice-6.dll was not found".
I don't use X. I just use RXVT windows on top of the Windows Desktop.
I don't use Cygwin's version of Gvim. I use the Windows version. To
use Gvim from Cygwin, I have a small script (attached) that converts
Cygwin paths to Windows paths and then launches Gvim. With this setup,
I can use a single version of Gvim from both Windows and Cygwin.
If you'd like more details, email me directly.
-------------- next part --------------
#!/usr/bin/bash
#####
#
# vi - Launches gVim
#
# Windows User environment variables
# VIM = C:\Program File\vim
# VIMTMP = X:\Temp
#
#####
# Handle vim flags
while [[ $# -gt 0 ]]; do
if [[ $1 =~ '^-' ]]; then
FLAGS="$FLAGS $1"
shift
else
break
fi
done
# Generate Windows paths for args
for (( ii=1; $ii <= $#; ii=$ii + 1 )); do
if [[ -d ${!ii} ]]; then
echo "${!ii} is a directory - ignored"
elif [[ ! -d `dirname "${!ii}"` ]]; then
echo 'No such dir:' \'`dirname "${!ii}"`\'
exit 1
else
lst[$ii]=`cygpath -w "${!ii}"`
fi
done
# Run Windows version of gVim
"/cygdrive/c/program files/vim/vim64/gvim.exe" $FLAGS -i "$VIM\\_viminfo" "${lst[@]}" </dev/null >/dev/null 2>&1 &
exit 0
# EOF
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list