0

Some overview and history.

Environment:

  • OS: Windows 8.1
  • Emulator: cygwin (mintty)
  • Terminal: xterm-256
  • Vim: v8.0 (Cygwin edition)
  • Vim setup:
    • Plugin manager: VimPlug
    • Enabled plugins:
      Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
      Plug 'vim-airline/vim-airline'
      Plug 'preservim/nerdcommenter'
      Plug 'sakshamgupta05/vim-todo-highlight'
      Plug 'Shirk/vim-gas'
      Plug 'sheerun/vim-polyglot'
      Plug 'vim-jp/vim-cpp'
      Plug 'aserebryakov/vim-todo-lists'
      Plug 'vim-scripts/ironman.vim'
      Plug 'mhartington/oceanic-next'
      Plug 'sonph/onehalf', { 'rtp': 'vim/' }
      Plug 'chriskempson/base16-vim'
      Plug 'arcticicestudio/nord-vim'
      Plug 'morhetz/gruvbox'
      Plug 'altercation/vim-colors-solarized'
      
    • Color mode: 256
    • Enabled mouse support
    • Backgroud: dark
    • Current highlighting fixes (don't work):
      autocmd BufEnter * :syntax sync fromstart       
      syntax sync fromstart
      syntax sync minlines=100
      let c_minlines=100
      set redraw=1
      set redrawtime=100
      autocmd FileType cpp syn sync fromstart
      

History:

It was a normal day when I was working in the Vim editor under cygwin... And I began feel that the Vim editor was lagging. After this occasion, I have done some research and I haven't found where is the problem. So... after some days my Vim became normal i.e. didn't lag.

I have switched to an other code editor but from some reasons I needed use Vim for edit C++ files. When I was editing C++ files my Vim started break syntax highlighting randomly when I was editing strings.

I said it's fine and I have done some research for this problem but again I haven't found any answer. I have continued use Vim with not minding this problem. But AGAIN after some days, when I was editing two C files in vsplit mode, my syntax highlight in the right file have broke.

Overview

  • Syntax highlighting doesn't break when I run Vim in the clean mode (vim --clean ...).
  • Syntax highlighting with vertical split breaks only in large (100+ lines) and specific files.
  • Syntax highlighting with strings usually breaks in large files (100+ lines).

Conclusion

I have asked much people count about this problem, no one knows the answer. Please help me solve this problem!

If it need I can provide my full 'vimrc' file on the pastebin.

14
  • 1
    Hi @filbranden! Hmm, I will try to do things those you describe in your comment. And no, I can't reproduce those bugs, it does randomly, when I'm working in the editor. Jun 20 '20 at 13:56
  • 1
    Consider making an edit to your question including additional details. Do you think you can capture the problem in a video of some kind so you can actually show what it's like? There are some terminal recording applications such as asciinema (and others), maybe that would make it easier to actually demonstrate the issue?
    – filbranden
    Jun 20 '20 at 14:33
  • 1
    Hmm, I will try it soon, and will send here results. Ok? Jun 20 '20 at 14:42
  • 1
    Yes. Please edit your question to include more details. That should give it more visibility for others who might have a good answer for it!
    – filbranden
    Jun 20 '20 at 14:42
  • 1
    @filbranden I have reorganized my question, so you can know more. Jun 21 '20 at 13:13

Your Answer

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

Browse other questions tagged or ask your own question.