Find the answer to your Linux question:
Results 1 to 2 of 2
I am trying to set up a non-X basic development machine. It boots fine, but Vim is without syntax highlighting. After some hours of research, it looks very much like ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    13

    How to get colour in a CLI terminal (for Vim)


    I am trying to set up a non-X basic development machine. It boots fine, but Vim is without syntax highlighting. After some hours of research, it looks very much like the non-X tty-something terminal does not support colours.
    echo $TERM && tput colors shows 'linux' and '8'

    How can I get a colourful terminal, so that we can as well use Vim syntax highlighting?

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    652
    1) Enter the command:
    Code:
    :syntax on
    For each session


    Or better yet.
    2) Edit your vimrc file (found in $HOME/.vimrc) to include:
    Code:
    syntax on
    To change color scheme the command is "colorscheme" which takes a schemename as an argument. Enter the command as above. When in the editor, enter ":colors [tabkey]" to see a list of installed scheme names. For more color schemes see VIM Color Scheme Test - Java - Sat Sep 26 16:32:24 2009 to see java code highlighted in over 400 color schemes. Change the "java" to "c", "html","perl", or "tex" (LaTex) to see the syntax highlighting using those languages instead of java code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •