Vim-go: Slow scrolling when cursorline is enabled

Created on 29 Apr 2016  路  2Comments  路  Source: fatih/vim-go

Actual behavior

If I activate vim-go syntax highlighting with:

let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1

and also activate set cursorline in my .vimrc, vim gets really slow.
Without the hightlights functions and/or cursorline it works perfectly.

Expected behavior

vim should run smooth as always

Steps to reproduce:

1.Create minimal vimrc:

syntax on
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
set cursorline
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1

2.Put (only) vim-go into ~/.vim/bundle (if using pathogen)
3.Open a go file and start scrolling

Configuration

Add here your current configuration and additional information that might be
useful, such as:

  • vim version: 7.4.1795
  • vim-go version: master-branch
  • go version: 1.6.2
  • OS: OS X (if that matters)

Most helpful comment

Hi @moogle19

There are many highlight groups, and Vim continuously tries to rematch them. That's why we have flags, to disable some of those. You can these settings to make it faster:

 set lazyredraw          " Wait to redraw
 syntax sync minlines=256
 set synmaxcol=300
 set re=1

Other than this there is not much we can do. Thanks for opening.

All 2 comments

Hi @moogle19

There are many highlight groups, and Vim continuously tries to rematch them. That's why we have flags, to disable some of those. You can these settings to make it faster:

 set lazyredraw          " Wait to redraw
 syntax sync minlines=256
 set synmaxcol=300
 set re=1

Other than this there is not much we can do. Thanks for opening.

Okay, thanks for the info and keep up the good work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrejvanderzee picture andrejvanderzee  路  3Comments

cassiobotaro picture cassiobotaro  路  3Comments

derekchiang picture derekchiang  路  3Comments

korjavin picture korjavin  路  4Comments

groob picture groob  路  3Comments