Vim terminal syntax highlights

37 views
Skip to first unread message

Tatenda Biti

unread,
Jun 2, 2019, 6:48:26 AM6/2/19
to vim_use
Might be a silly question. But why doesn't vim's terminal on windows 10 have syntax highlighting like neovim

meine

unread,
Jun 2, 2019, 6:59:59 AM6/2/19
to vim...@googlegroups.com
On Sun, Jun 02, 2019 at 01:18:35AM -0700, Tatenda Biti wrote:
> Might be a silly question. But why doesn't vim's terminal on windows 10 have syntax highlighting like neovim

it probably depends on the colorscheme you use (what and how your syntax
is displayed) and on a line in your .vimrc: `syntax enable'

see also `:help syntax' for further instructions on the use and
possibilities.

//meine

Tatenda Biti

unread,
Jun 2, 2019, 11:44:31 AM6/2/19
to vim_use

Pretty sure that is not the case:

Vimcmdline:

Neovim:
NEO 2019-06-02_11-43-09.png
Vim:
Vim 2019-06-02_11-41-20.png

Can you get syntax highlighting like that in vim?

NEO 2019-06-02_11-43-09.png
Vim 2019-06-02_11-41-20.png

JESii

unread,
Jun 8, 2019, 11:38:23 AM6/8/19
to vim_use
I agree with meine -- when I look at your vim screenshot, it's clear to me that there IS synta highlighting applied to your file. It's just different than the newvim screenshot you provided.

Tatenda Biti

unread,
Jun 10, 2019, 3:59:30 PM6/10/19
to vim_use
I don't think I was clear this is Gvim on windows. When you create a terminal buffer there are no colors. Do you use Windows Gvim and have colors in the terminal??

Eric Christopherson

unread,
Jun 10, 2019, 4:49:49 PM6/10/19
to vim_use
When you say "terminal", are you talking about the window at the bottom that shows the Python interpreter? I'm pretty sure those "windows" (they aren't really first-class citizens in Vim's window layout, e.g. you can't resize them, move them around, etc.) have never had syntax coloring in Vim proper; you need an actual window with an actual buffer (for instance a file you're editing) to have syntax highlighting. I'm not sure how NeoVim goes about it; it looks like they just use one style for things in quotes, one for sequences that look like times, and another for sequences that look like integer or floating-point numbers; whether there's an actual file *type* behind all that I don't know. It might be that they just figured 

In my experience, for whatever reason, when I run commands like :!python in Windows gVim, I always get a separate Windows command prompt window that holds the command I've launched from Vim. On other platforms, I get something like what you show in the Vim 8 screenshot.

--
        Eric Christopherson
Reply all
Reply to author
Forward
0 new messages