cannot run gvim on windows

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

cannot run gvim on windows

David Shen

Hi,

I installed cygwin on my vista sp1 system. then I install gvim in
cygwin. I can run vim in cygwin. But when I run gvim, it exits with
error "e233: cannot open display". Does anyone how to fix this?


--
Best Regards,
David Shen

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

Tom Link-3

> I can run vim in cygwin. But when I run gvim, it exits with
> error "e233: cannot open display". Does anyone how to fix this?

You're probably trying to run the x windows version but have no x
server running. You could either run x windows or use the native
windows gui version.

tom.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

Tony Mechelynck
In reply to this post by David Shen

On 07/03/09 17:50, David Shen wrote:
> Hi,
>
> I installed cygwin on my vista sp1 system. then I install gvim in
> cygwin. I can run vim in cygwin. But when I run gvim, it exits with
> error "e233: cannot open display". Does anyone how to fix this?
>
>

The Cygwin version of gvim requires a Cygwin X server to be running
prior to loading gvim. However, what's wrong with running native-Windows
versions of Vim and gvim, such as those from
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721 
? (Click the clipboard-like icon to see what was compiled-in.)


Best regards,
Tony.
--
When someone says "I want a programming language in which I need only
say what I wish done," give him a lollipop.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

Gary Johnson-4
In reply to this post by David Shen

On 2009-03-08, David Shen wrote:
> Hi,
>
> I installed cygwin on my vista sp1 system. then I install gvim in
> cygwin. I can run vim in cygwin. But when I run gvim, it exits with
> error "e233: cannot open display". Does anyone how to fix this?

gvim on Cygwin does not run as a native Windows application, it
requires an X server to be running.  You'll need to install
Cygwin-X or some other X server for Windows to use Cygwin's gvim.

What I do is use Cygwin's vim and Windows' gvim.

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

Gary Johnson-4
In reply to this post by Tony Mechelynck

On 2009-03-07, Tony Mechelynck wrote:

> However, what's wrong with running native-Windows
> versions of Vim and gvim, such as those from
> https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721 
> ? (Click the clipboard-like icon to see what was compiled-in.)

The advantages to using Cygwin's vim rather than Windows' vim (not
gvim) is that Cygwin terminals such as rxvt are more versatile than
the Windows console (although you can get third-party Windows
consoles, too) and that from Cygwin's vim you have access to a
Unix-like environment any time vim needs the OS or a shell.

I tried for a while to use Windows' gvim with Cygwin's shell but
found too many cases where it just didn't work quite right.  For
example, some Cygwin commands will return the full path names of
files such as

    /usr/local/src/foo
    /cygdrive/c/bar

and native-Windows gvim can't find them.

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

Tony Mechelynck

On 07/03/09 18:46, Gary Johnson wrote:

> On 2009-03-07, Tony Mechelynck wrote:
>
>> However, what's wrong with running native-Windows
>> versions of Vim and gvim, such as those from
>> https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721
>> ? (Click the clipboard-like icon to see what was compiled-in.)
> The advantages to using Cygwin's vim rather than Windows' vim (not
> gvim) is that Cygwin terminals such as rxvt are more versatile than
> the Windows console (although you can get third-party Windows
> consoles, too) and that from Cygwin's vim you have access to a
> Unix-like environment any time vim needs the OS or a shell.
>
> I tried for a while to use Windows' gvim with Cygwin's shell but
> found too many cases where it just didn't work quite right.  For
> example, some Cygwin commands will return the full path names of
> files such as
>
>      /usr/local/src/foo
>      /cygdrive/c/bar
>
> and native-Windows gvim can't find them.
>
> Regards,
> Gary

To pass a Cygwin-like path to a Windows-like application, you have to
process it first via cygpath (see "man cygpath"). That's what the
vim72/src/make_cyg.mak does to compile (with Windows Perl) the
if_perl.xs module required by the Perl interface.

What I recommend if you want to run Vim within Cygwin but don't want the
trouble of running an X-server on top of Windows, is to use the Console
version of Cygwin vim. When I was on Windows, I used Cygwin a lot, but
not exclusively, and I used Cygwin vim (started from Cygwin bash),
Windows vim (started from cmd.exe) and Windows gvim (started from
cmd.exe or from a desktop shortcut), as the need arose.


Best regards,
Tony.
--
Crash programs fail because they are based on the theory that, with
nine women pregnant, you can get a baby a month.
                -- Wernher von Braun

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

Gary Johnson-4

On 2009-03-07, Tony Mechelynck wrote:

> On 07/03/09 18:46, Gary Johnson wrote:
> > On 2009-03-07, Tony Mechelynck wrote:
> >
> >> However, what's wrong with running native-Windows
> >> versions of Vim and gvim, such as those from
> >> https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721
> >> ? (Click the clipboard-like icon to see what was compiled-in.)
> > The advantages to using Cygwin's vim rather than Windows' vim (not
> > gvim) is that Cygwin terminals such as rxvt are more versatile than
> > the Windows console (although you can get third-party Windows
> > consoles, too) and that from Cygwin's vim you have access to a
> > Unix-like environment any time vim needs the OS or a shell.
> >
> > I tried for a while to use Windows' gvim with Cygwin's shell but
> > found too many cases where it just didn't work quite right.  For
> > example, some Cygwin commands will return the full path names of
> > files such as
> >
> >      /usr/local/src/foo
> >      /cygdrive/c/bar
> >
> > and native-Windows gvim can't find them.

> To pass a Cygwin-like path to a Windows-like application, you have to
> process it first via cygpath (see "man cygpath"). That's what the
> vim72/src/make_cyg.mak does to compile (with Windows Perl) the
> if_perl.xs module required by the Perl interface.

Right, but that's only if you're invoking some Windows-like
application from the command line.  That doesn't work from within
a Windows application that access files with some internal
mechanism.  One example is vim's gf command.  Another is vim's
quickfix list.

> What I recommend if you want to run Vim within Cygwin but don't want the
> trouble of running an X-server on top of Windows, is to use the Console
> version of Cygwin vim. When I was on Windows, I used Cygwin a lot, but
> not exclusively, and I used Cygwin vim (started from Cygwin bash),
> Windows vim (started from cmd.exe) and Windows gvim (started from
> cmd.exe or from a desktop shortcut), as the need arose.

That's what I do and what I wrote before.

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: cannot run gvim on windows

David Shen
In reply to this post by Tom Link-3


On Mar 8, 1:25 am, Tom <[hidden email]> wrote:
> > I can run vim in cygwin. But when I run gvim, it exits with
> > error "e233: cannot open display". Does anyone how to fix this?
>
> You're probably trying to run the x windows version but have no x
> server running. You could either run x windows or use the native
> windows gui version.
>
> tom.

yeah, gVim for windows is better than gvim in cygwin.
and about the problem, it is my mistake that i did not install x.

Thanks,
David
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---