gko / vim-coloresque

css/less/sass/html color preview for vim
351 stars 63 forks source link

Motion and syntax highlighting errors with .slim and probably .haml files #26

Open cseelus opened 9 years ago

cseelus commented 9 years ago

Installed it yesterday (via vim-plug) and worked very nice so far.

When editing some .slim files for a Rails project today, I noticed IDs and classes weren't highlighted anymore. Also the motion keys w, e and b didn't work as usual, e.g. w moved from [s]pan.amount = @spending.amount to span.amount [=] @spending.amount instead of span.[a]mount = @spending.amount.

willthemoor commented 9 years ago

I had similar problems in Jade templates (essentially the same syntax as Slim). Tried to sort it out by commenting out this section of the plugin to no avail. After uninstalling and restarting I had clear out the associated view files before it was back to normal.

Highlighting, nice as it is to have, wasn't my main problem. Movements and pattern searching with * were broken. So hitting * here: href="#pr[*]ofile" wouldn't find <section id="profile">.

Enjoyed this plugin. Will keep an eye on this thread in the hopes that someone else with more marbles than I gives it a shot.

willthemoor commented 9 years ago

Just tried installing it again. Changing those 3 lines linked above from

:set isk+=-
:set isk+=#
:set isk+=.

to

setlocal isk-=-
setlocal isk-=#
setlocal isk-=.

seems to have sorted it out. Not sure if there any actual repercussions from changing it.

geoffharcourt commented 8 years ago

PR to make this fix: #30.