vim-slim icon indicating copy to clipboard operation
vim-slim copied to clipboard

Slow

Open seanabrahams opened this issue 12 years ago • 23 comments

Running MacVim 7.3 (62) with Janus (https://github.com/carlhuda/janus) and vim-slim.

Navigating a 241 line slim file is slow and painful. Disabling vim-slim and having no syntax highlighting speeds things right up.

Anyone else experiencing this?

seanabrahams avatar Mar 23 '12 18:03 seanabrahams

+1, it's really slow, especially if file contains javascript or coffeescript parts

maxprokopiev avatar Apr 11 '12 09:04 maxprokopiev

+1

shilov avatar Apr 17 '12 21:04 shilov

Two things that slightly helped in speeding things up..

  • Enable experimental renderer in MacVim preferences
  • If you have syntax-folding enabled, switch to indent-based folding

Unfortunately very large .slim files are still uncomfortably slow to work with.

shilov avatar May 30 '12 22:05 shilov

+1

redeemedfadi avatar Aug 09 '12 15:08 redeemedfadi

+1

rous-gg avatar Sep 13 '12 07:09 rous-gg

+2 ... Does anyone know why it is so slow? I'd be even willing to learn vimscript and fix it, if I knew where to start :shipit:

darthdeus avatar Oct 09 '12 17:10 darthdeus

I just did a little goofing around, and commenting out the additonal syntaxes starting from here to line 41 made it subjectively a lot faster, at least on the file I tested it.

At least for me I don't really need syntax highlighting for all of the inline options, except for Ruby. I would even go as far as saying this is a feature, since you shouldn't have 5 different languages in one file anyway.

darthdeus avatar Oct 09 '12 17:10 darthdeus

+1. Still slow, even for small files.

nicholaides avatar Feb 05 '13 01:02 nicholaides

+1 Very slow for any file and the master branch as source.

skyeagle avatar Sep 29 '13 18:09 skyeagle

+1

jgarber avatar Sep 30 '13 21:09 jgarber

+1

mattmcmanus avatar Sep 30 '13 23:09 mattmcmanus

Guys, if nobody has an idea why it is slow we cannot do much. Please help by trying to find out what causes this.

minad avatar Oct 01 '13 00:10 minad

+1

oraclebill avatar Oct 01 '13 17:10 oraclebill

This line is the culprit.

syn region slimRuby matchgroup=slimRubyOutputChar start="\s*[=]\==[']\=" skip=",\s*$" end="$" contained contains=@slimRubyTop keepend

skyeagle avatar Oct 05 '13 21:10 skyeagle

Removing syntastic and replacing powerline with vim-airline makes it much faster then before.

skyeagle avatar Jul 23 '14 19:07 skyeagle

It's slow because of ruby symbols, here https://github.com/onemanstartup/vim-slim/blob/master/syntax/slim.vim people please try this. Some symbols is messed up a little but it is better than dealing with slow vim.

onemanstartup avatar Jul 30 '14 12:07 onemanstartup

The version onemanstartup linked to is much faster for me.

arjun810 avatar Feb 19 '15 02:02 arjun810

+1

chalmagean avatar Apr 27 '15 16:04 chalmagean

+1

itmammoth avatar Jun 10 '16 11:06 itmammoth

set synmaxcol=100 Make it much faster.

lingceng avatar Oct 13 '16 10:10 lingceng

https://github.com/onemanstartup/vim-slim is so much faster, omg

evmorov avatar May 03 '17 21:05 evmorov

thanks @onemanstartup!!!

kleinjm avatar Feb 21 '18 15:02 kleinjm

I've been struggling with this too. Editing slim files is painfully slow, even just very simple rails forms that aren't even that long. Simply typing in insert mode had so much latency that it was incredibly annoying. The fork of @onemanstartup works much better, but seems a bit outdated.

As far as I understand this plugin loads the actual ruby syntax highlighting for Ruby code. While this may be nice from a feature view point, I think murdering the editor performance is not worth it. Maybe it would be possible to give the option to enable more simple ruby syntax highlighting like in the forked version? I'm not really familiar with vim syntax highlighting, so I'm a bit at a disadvantage here.

strayer avatar Apr 06 '21 16:04 strayer