Jump to content

vi over cygwin ssh?


Recommended Posts

Hello gangs,

Does anyone have any experience in getting Vi to work when ssh-ing to another win32 box with Cygwin? Vi launched just fine locally on the ssh server, but when I try to launch it from another computer via ssh, vi couldn't launch...

So I tried set term=vt100 on the .login file, since the default was 'cygwin', no workie either.

Any ideas..? :huh:

Thanks a bunch!


Link to comment
Share on other sites

Hi Alex!

I think you have to set the TERM=vt100 in .bashrc in your homedirectory.

Hope this helps Leo


Huh... So I guess it works differently than .login, I see. Well, let me give that a try when I get home tonight. Seems like I'd have a little more configuration to do if I want to use .tcshrc...

Thanks Leo,

Alex :)

Link to comment
Share on other sites

Marc is right - it is easier, when you dont use a console like cygwin.

BUT - much more easy is: use  EMACS  <_<


Heheh. Actually, I have tried PuTTY. I got the same problem too. Couldn't launch Vi from there. Googled the web and found people have same problem, but thus far was the the solution was to do: set term=vt100. But I haven't tried it on a .tcshrc file yet.

NOw now, children, let's not try to start a vi vs emacs wars. Otherwise, no Houdini.... uhh... Ice cream for you! :lol:


Alex ;)

Link to comment
Share on other sites

When you ssh in to the other windows box, you are running an ssh client on the other side. It doesn't know about any cygwin client or any of the cygwin environments. It ain't like unix/linux.

I believe you have to type in the entire path to vi in order to run it. Either that or start manipulating the actual Windows global and user environment variables and set the PATH up to also pick up the /cygwin/bin/ where vim resides. These environment variables will set the appropriate env for you. Note that these are not the environment variables you set in the cygwin shell but the actual windows variables. My Computer> etc...

vim rules! Can't wait for Vim7.


Vim voted best text editor again. Why of course.

Link to comment
Share on other sites

Hey guys, got it to work now. Much thanks! :) I am not sure why it didn't work before tho.. Basically the .login profile on the server computer simply contain the following:

if ( $TERM == "cygwin" )

  set term=vt100


Sadly, tho, the vt100, vt102, xterm, etc. all doesn't behave quite like "cygwin" when I set it to default... Not quite sure how to describe this... :(

As far as getting Vim to work like I normally expected it to under Linux and Win32 Vim, I had to copy some of the profile settings from windows into my .vimrc file... But, it's working more or less now so i am pretty happy. :)

Wow. Some of Vim7's feature looks pretty sweet. :) Can't wait! Also, while looking at the Linux Journal, appearantly, C is still the fav. programming language. With Perl 2nd and C++ 3rd. Interesting... I didn't know that.


Alex :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...