Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

VIM syntax highlighting, not working

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
dreamLogic
n00b
n00b
Posts: 15
Joined: Tue Mar 26, 2024 3:37 am
Location: Canada

VIM syntax highlighting, not working

  • Quote

Post by dreamLogic » Wed Apr 10, 2024 1:17 am

Hello.

I have emerged VIM-9.0.2167 (without the minimal flag) and there is no syntax highlighting. I also have "filetype plugin on" and "syntax on" in my .vimrc
Top
bstaletic
Guru
Guru
Posts: 517
Joined: Sat Apr 05, 2014 5:46 pm

  • Quote

Post by bstaletic » Wed Apr 10, 2024 5:07 am

Code: Select all

:scriptnames
That will show what vim scripts have been sourced.

Code: Select all

:filetype
That will show if you have really set `filetype`.

Code: Select all

:set
That will show all set options.

Code: Select all

:verbose set $THING
That will show from where was $THING set.
Top
dreamLogic
n00b
n00b
Posts: 15
Joined: Tue Mar 26, 2024 3:37 am
Location: Canada

vim command outputs

  • Quote

Post by dreamLogic » Thu Apr 11, 2024 12:44 am

Here's the output

https://dpaste.com/5J2VZVU3B
Top
bstaletic
Guru
Guru
Posts: 517
Joined: Sat Apr 05, 2014 5:46 pm

  • Quote

Post by bstaletic » Thu Apr 11, 2024 9:45 am

`filetype` is not set, therefore no syntax highlighting.
You do have `filetype detect` on, so vim will try to detect the filetype, but comes up empty in your case.

How are you invoking vim?
Top
dreamLogic
n00b
n00b
Posts: 15
Joined: Tue Mar 26, 2024 3:37 am
Location: Canada

  • Quote

Post by dreamLogic » Thu Apr 11, 2024 5:47 pm

Just normally, from the terminal.
vim 'file'
Maybe the filetype has to be set in the file, or there has to be a file extension for it to detect?
Top
bstaletic
Guru
Guru
Posts: 517
Joined: Sat Apr 05, 2014 5:46 pm

  • Quote

Post by bstaletic » Thu Apr 11, 2024 5:51 pm

Vim is a little smarter than just looking at the extension. It can detect the shell script shebang, for example. But yes, having an extension does help.

There're also modelines, as in :h modeline.

You can set the filetype manually with :h :setf.
Top
dreamLogic
n00b
n00b
Posts: 15
Joined: Tue Mar 26, 2024 3:37 am
Location: Canada

Ok I'm back on this I guess

  • Quote

Post by dreamLogic » Thu May 02, 2024 2:22 am

I've been running vim without syntax highlighting but think I'd like to try again to get this fixed.
I noticed there are no help files so :h option doesn't work with anything.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic