View previous topic :: View next topic |
Author |
Message |
dreamLogic n00b
Joined: 26 Mar 2024 Posts: 14
|
Posted: Wed Apr 10, 2024 1:17 am Post subject: VIM syntax highlighting, not working |
|
|
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 |
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 255
|
Posted: Wed Apr 10, 2024 5:07 am Post subject: |
|
|
That will show what vim scripts have been sourced.
That will show if you have really set `filetype`.
That will show all set options.
Code: | :verbose set $THING |
That will show from where was $THING set. |
|
Back to top |
|
|
dreamLogic n00b
Joined: 26 Mar 2024 Posts: 14
|
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 255
|
Posted: Thu Apr 11, 2024 9:45 am Post subject: |
|
|
`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? |
|
Back to top |
|
|
dreamLogic n00b
Joined: 26 Mar 2024 Posts: 14
|
Posted: Thu Apr 11, 2024 5:47 pm Post subject: |
|
|
Just normally, from the terminal.
Maybe the filetype has to be set in the file, or there has to be a file extension for it to detect? |
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 255
|
Posted: Thu Apr 11, 2024 5:51 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
dreamLogic n00b
Joined: 26 Mar 2024 Posts: 14
|
Posted: Thu May 02, 2024 2:22 am Post subject: Ok I'm back on this I guess |
|
|
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. |
|
Back to top |
|
|
|