Reputation: 103
I use terminal on my Macbook to SSH into Linux machines in order to complete my homework for a class. I use Vim to code in C, for which I have a small set of .vimrc configurations that is the exact same on the remote (Linux) machine as well as my local (Mac) machine. None of these should affect the color scheme of terminal/Vim.
Over SSH, the C code is illustrated with a color scheme that I have come to enjoy. Here's a snippet:
However, when I try to write code in the same way on my local machine instead of SSH, there are no colors at all. Here is the same code I have copied onto my local machine:
My Mac is set to the new Catalina Dark Mode, and Terminal is on the Basic (Default) color profile. My .vimrc contains the following:
set linebreak
set showbreak=+++
set textwidth=100
set showmatch
set hlsearch
set smartcase
set ignorecase
set incsearch
set autoindent
set cindent
set shiftwidth=4
set smartindent
set smarttab
set softtabstop=4
set ruler
set undolevels=1000
set backspace=indent,eol,start
Would this be an issue with vim color schemes/config, terminal config, or perhaps something else? Help is appreciated!
Upvotes: 0
Views: 1553
Reputation: 4683
Two things:
syntax enable
(enable works better than on) can do thisvim scp://user@remote-host/path/to/file
Upvotes: 1
Reputation: 11445
You have to turn on the syntax highlighting.
:syn on
You can set this in your .vimrc
to avoid typing it every time.
Upvotes: 1