2

With a "long" ruby file (896 lines in my case) the ruby syntax highlighting is lost when I G to the bottom of the file. Once that happens and I go back to the top with gg, the syntax highlighting remains off. The only way to get the syntax highlighting back is to just reload the file with :e.

However, if I just <CTRL-F> from the top all the way to the bottom, then the syntax highlighting remains.

This is a bit similar to this post but definitely not the same, as this happens every time I follow the steps listed above. Highlighting for my :help or .vimrc files is NOT lost, even though my .vimrc file is over 1000 lines long [I know, I know... I have to reorganize this; just haven't had time:].

My syntax-specific plugins include the following; I guess the next thing to try is to remove them one at a time and see which one is the perp.

.vim/bundle/Decho/syntax
.vim/bundle/nerdtree/syntax
.vim/bundle/tagbar/syntax
.vim/bundle/tmux.vim/vim/syntax
.vim/bundle/vim-coffee-script/after/syntax
.vim/bundle/vim-coffee-script/syntax
.vim/bundle/vim-cucumber/syntax
.vim/bundle/vim-haml/syntax
.vim/bundle/vim-javascript/syntax
.vim/bundle/vim-jsx/after/syntax
.vim/bundle/vim-markdown/syntax
.vim/bundle/vim-ruby/syntax
.vim/bundle/vim-snipmate/syntax
.vim/bundle/vimoutliner/syntax
.vim/bundle/Vundle.vim/syntax
.vim/eclim/syntax
.vim/Plugin/mpc/syntax

And the last change is:

  filetype=ruby
        Last set from /usr/local/Cellar/vim/8.0.0692/share/vim/vim80/filetype.vim

So not much information there.

This only started happening "recently" (past few weeks, plus my machine was re-imaged for macOS Sierra and I've now got the latest versions of everything).

Happens both inside/outside of tmux

Any suggestions besides the brute force approach?

Thanks

0

sounds like a synchronization issue. Try

:syntax sync maxlines=1000

Find the details in :help :syn-sync

  • Already tried the following which do not work: :syntax sync fromstart, :syn off | syn on, :redraw, and various combinations of your :syntax sync maxlines=1000plus combinations with minlines= – JESii Jul 24 '17 at 14:00

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.