Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor movement slows to a crawl, temp fixed with :syntax off/on #401

Open
jasonl99 opened this issue Apr 28, 2015 · 5 comments
Open

Cursor movement slows to a crawl, temp fixed with :syntax off/on #401

jasonl99 opened this issue Apr 28, 2015 · 5 comments

Comments

@jasonl99
Copy link

I have this happen with rails/ruby files on a regular basis. It becomes painfully slow to move the cursor around, sometimes taking a full second moving the cursor one character in any direction.

I've narrowed it a little further, it's slows down frequently right after a save (maybe it's something related to linting?), but sometimes it does it whether I save or not. Nevertheless, I find it interesting that this always "fixes" the slowdown, regardless of when or why it happens:

:syntax off
:syntax on

Basically, toggling back and forth returns vim to normal behavior (until it slows down again).

Is there any data I can provide/collect when it occurs that might help debug this issue?

@tpope
Copy link
Owner

tpope commented Apr 28, 2015

Do you have one of those CSS color highlighters installed? Rule that out along with anything similar.

@m1foley
Copy link
Contributor

m1foley commented Apr 30, 2015

FWIW I usually narrow down Vim slowdowns by commenting out all the plugin loading in my .vimrc (Plug or equivalent) and then restoring them one-by-one. It's often a plugin I wouldn't expect.

Also, try starting up Vim with the -V option to see if there's extra events going on.

@aert
Copy link

aert commented Nov 30, 2016

On my setup happens specifically at the end of the controllers, when I break down the params.require fields in multiple lines

@tpope
Copy link
Owner

tpope commented May 1, 2017

The only additional advice I can offer is try commenting out part/all of the syntax highlighting support in rails.vim and see if you can get the problem to go away. If you can narrow it down to a problematic line or lines I can figure out how to fix it.

@mthadley
Copy link

I believe I ran into something similar. For me, the solution was to use the older regexp engine:

set regexpengine=1

I guess the newer one doesn't play nice with ruby's highlighting? Hopefully this helps someone else as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants