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

Syntax highlighting through an ssh connection

Expand Messages
  • Kaleb23
    My apologies for asking for help on something which may have already been answered. I m on a mac ssh d into a Centos box. On my local system vi will show
    Message 1 of 5 , Dec 10, 2010
    • 0 Attachment
      My apologies for asking for help on something which may have already
      been answered.

      I'm on a mac ssh'd into a Centos box. On my local system vi will show
      syntax highlighting but when I shell in it does not. I've tried to
      find an answer to this for quite a long time now. "Syntax on" does
      not work. I've copied the sample vimrc that came with the
      installation which is version 7.0.237 and that did not work either. I
      would not call myself a vi newbie but I can't figure this out. If I'm
      forced to look at badly formatted code the least they can do is let me
      see it in technicolor.

      --
      You received this message from the "vim_mac" 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
    • Kyle Lippincott
      This typically indicates that TERM is not set properly. I assume you use Terminal.app, bash, and the default 10.5 or 10.6 ssh. This should automatically get
      Message 2 of 5 , Dec 10, 2010
      • 0 Attachment
        This typically indicates that TERM is not set properly.  I assume you use Terminal.app, bash, and the default 10.5 or 10.6 ssh.  This should automatically get you a 16-color terminal.  In vim on the Centos box, what do you get when you run: ":set t_Co?"  What about ":set term?"  Try setting t_Co to be 8 (it will use bold to simulate 16, which you can configure in Terminal.app's settings): ":set t_Co=8".  

        Ensure of course that you have a color scheme and syntax file set: ":set ft?" to determine if the filetype was identified correctly, and ":color koehler" should work on a low-color terminal.

        If you were to use iTerm2 you would be able to have 256 colors, but that probably involves a bit more setup than the simple case listed above.

        On Fri, Dec 10, 2010 at 11:06 AM, Kaleb23 <john.vonachen@...> wrote:
        My apologies for asking for help on something which may have already
        been answered.

        I'm on a mac ssh'd into a Centos box.  On my local system vi will show
        syntax highlighting but when I shell in it does not.  I've tried to
        find an answer to this for quite a long time now.  "Syntax on" does
        not work.  I've copied the sample vimrc that came with the
        installation which is version 7.0.237 and that did not work either.  I
        would not call myself a vi newbie but I can't figure this out.  If I'm
        forced to look at badly formatted code the least they can do is let me
        see it in technicolor.

        --
        You received this message from the "vim_mac" 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

        --
        You received this message from the "vim_mac" 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
      • John Vonachen
        ... I typed vim instead of vi. That was it. We aparently have more than one version of vi and one worked and the other did not. Thanks for your efforts.
        Message 3 of 5 , Dec 10, 2010
        • 0 Attachment
          On Fri, Dec 10, 2010 at 4:35 PM, Kyle Lippincott <spectral@...> wrote:
          This typically indicates that TERM is not set properly.  I assume you use Terminal.app, bash, and the default 10.5 or 10.6 ssh.  This should automatically get you a 16-color terminal.  In vim on the Centos box, what do you get when you run: ":set t_Co?"  What about ":set term?"  Try setting t_Co to be 8 (it will use bold to simulate 16, which you can configure in Terminal.app's settings): ":set t_Co=8".  

          Ensure of course that you have a color scheme and syntax file set: ":set ft?" to determine if the filetype was identified correctly, and ":color koehler" should work on a low-color terminal.

          If you were to use iTerm2 you would be able to have 256 colors, but that probably involves a bit more setup than the simple case listed above.



          I typed vim instead of vi.  That was it.  We aparently have more than one version of vi and one worked and the other did not.  Thanks for your efforts.   BTW - I downloaded iterm2 and tried it out and I think I like the normal Terminal better.

          --
          You received this message from the "vim_mac" 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
        • Kyle Lippincott
          Honestly, I like Apple s Terminal.app better as well, but if I m doing a lot of work in vim from the mac (normally I m on a linux box), I like to have my color
          Message 4 of 5 , Dec 10, 2010
          • 0 Attachment
            Honestly, I like Apple's Terminal.app better as well, but if I'm doing a lot of work in vim from the mac (normally I'm on a linux box), I like to have my color scheme (requires 256 color support) and mouse support.  If Apple would just add those to Terminal.app, I don't think I'd ever use iTerm :)

            On Fri, Dec 10, 2010 at 3:46 PM, John Vonachen <john.vonachen@...> wrote:


            On Fri, Dec 10, 2010 at 4:35 PM, Kyle Lippincott <spectral@...> wrote:
            This typically indicates that TERM is not set properly.  I assume you use Terminal.app, bash, and the default 10.5 or 10.6 ssh.  This should automatically get you a 16-color terminal.  In vim on the Centos box, what do you get when you run: ":set t_Co?"  What about ":set term?"  Try setting t_Co to be 8 (it will use bold to simulate 16, which you can configure in Terminal.app's settings): ":set t_Co=8".  

            Ensure of course that you have a color scheme and syntax file set: ":set ft?" to determine if the filetype was identified correctly, and ":color koehler" should work on a low-color terminal.

            If you were to use iTerm2 you would be able to have 256 colors, but that probably involves a bit more setup than the simple case listed above.



            I typed vim instead of vi.  That was it.  We aparently have more than one version of vi and one worked and the other did not.  Thanks for your efforts.   BTW - I downloaded iterm2 and tried it out and I think I like the normal Terminal better.

            --
            You received this message from the "vim_mac" 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

            --
            You received this message from the "vim_mac" 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
          • Carl Jacobsen
            ... Indeed, on our Linux systems (RHEL), vi gets /bin/vi, which is vim compiled with tiny features (and thus doesn t have syntax highlighting), while vim
            Message 5 of 5 , Dec 12, 2010
            • 0 Attachment
              On Fri, 10 Dec 2010, John Vonachen wrote:

              > I typed vim instead of vi. That was it. We aparently have more than one
              > version of vi and one worked and the other did not.

              Indeed, on our Linux systems (RHEL), "vi" gets /bin/vi, which is vim
              compiled with "tiny" features (and thus doesn't have syntax highlighting),
              while "vim" gets /usr/bin/vim, which is compiled with "huge" features and
              the Perl & Python interpreters. I suspect other Linux flavors do similar.

              Cheers,
              Carl

              --
              You received this message from the "vim_mac" 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
            Your message has been successfully submitted and would be delivered to recipients shortly.