Loading ...
Sorry, an error occurred while loading the content.

ViM & SSH

Expand Messages
  • Matthew J. Stott
    FYI, this is slightly offtopic but here goes. I run ViM on many different Unix systems as well as Windows. I am constantly connecting to remote servers via
    Message 1 of 1 , Nov 13, 2004
    • 0 Attachment
      FYI, this is slightly offtopic but here goes.

      I run ViM on many different Unix systems as well as Windows. I am
      constantly
      connecting to remote servers via ssh. If you are doing the same, then
      you really
      really need to checkout the GNU Screen application. It's included with
      Panther,
      try 'man screen'.

      Screen is basically a way to manage multiple virtual consoles and
      switch between them.
      This is not a problem in a GUI environment because you can just open
      multiple terminal
      sessions and drag them around or even use expose. However, when you
      ssh into a
      remote console there is no GUI (well, not counting tunneling X11). So
      it's either make
      multiple connections to the remote box or use screen. The most useful
      feature of Screen
      (at least for me) is the ability to detach from the screen session and
      all of your programs
      are still running.

      For example, say you ssh into a Sun box and run GNU Screen. Then you
      create new
      screens and launch different applications. i.e. top, vim, tail,
      prompt, etc. Then you
      tell Screen to detach and you go home. Once you get home, you ssh back
      into the
      sunbox and re-attach Screen. Congratulations, you just picked up
      exactly where you
      left off while you were at work! All of the programs are still
      running. Creating new
      screens is similar, in function, to creating new buffers in ViM.

      The possibilities are limited by your imagination. I run a Gentoo box
      and since
      just about everything in Gentoo is compiled, it can take quite some
      time to complete (days)
      so I leave a GNU screen session running so I can monitor it's progress
      or perform other
      duties. This allows be to detach the screen session and disconnect my
      ssh connection
      while it goes on it's merry way compiling. If I just disconnect ssh
      without using screen, then
      my compile job aborts.

      Read the great intro and beginners tutorial below then read the Screen
      man pages.

      GNU Screen Tutorial
      http://www.kuro5hin.org/story/2004/3/9/16838/14935
    Your message has been successfully submitted and would be delivered to recipients shortly.