2

So I've installed http://vimawesome.com/plugin/vim-polyglot as per those instructions (it shows up with :ListPlugins ), but it's not highlighting any of my code.

I realise that's not a lot to go on, but is there any configuration work? Or should it all be automatic?

I do see yellow and blue tag indicators though - is it possible that terminal theming breaks the syntax highlighting?

Does anyone have any experience or would know why? Thanks. :)

  • Did you tried :set hl ? – SibiCoder Jun 28 '16 at 5:37
  • If I do that I get: highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLi ne,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D :DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:Pme nuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn – user1775718 Jun 28 '16 at 5:41
  • This happened for us in vi editor. May be, you cab set compatible to nocomaptible or vice versa to see the effect. – SibiCoder Jun 28 '16 at 5:42
  • 1
    The output shows that your vim has applied colorscheme., but the terminal may have a problem. Did you tried set t_Co=256 in your vimrc file. This might show ttesut. – SibiCoder Jun 28 '16 at 5:43
  • 1
    I've used polyglot in the past, and I never got any problem. Do you have syntax on ? – nobe4 Jun 28 '16 at 6:35
4

To be able to use the syntax highlighting in vim you must put the following line on your vimrc:

syntax on

Depending on your preferences/plugin manager (if any), it may want to put it at the start of your vimrc.

Have a look at :

  • :h usr_06.txt
  • :h syntax

PS: to sort my vim options, I use the :options command and sort using the existing groups.

  • 3
    TIL: there is an useful command named :options. – Sato Katsura Jun 28 '16 at 15:34
-1

sometimes you might have to add to your vimrc:

au! BufNewFile,BufReadPost Jenkinsfile set filetype=Jenkinsfile foldmethod=indent syntax=on
autocmd FileType Jenkinsfile setlocal  ts=2 sts=2 sw=2 expandtab
  • 1
    Welcome to our site! I think there are several problems with your answer: firstly why do you choose to focus on JenkinsFile filetype? How is it relevant to OP question? Secondly how does your autocommands work? Remember that not every readers know what an autocommand is and when the autocommand event you chose are triggered. And lastly why would you recommend these settings more than others? – statox May 7 at 7:06
  • I think I responded to the wrong question, by mistake though. Right I'll make sure to be more explicit next time. I am new to stackoverflow. My response is bad :( – Sanhaji Omar Oct 3 at 9:25
  • If you responded to the wrong question you can delete this answer and post it to the correct question (and don't forget to add the details I mentioned). But don't worry about your response being bad, if you delete it and improve it nobody will give you trouble about that, we all have to learn :) – statox Oct 4 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.