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

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

Open
cseelus opened this issue Feb 26, 2015 · 3 comments
Open

Comments

@cseelus
Copy link

cseelus commented Feb 26, 2015

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
Copy link

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
Copy link

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
Copy link

PR to make this fix: #30.

geoffharcourt added a commit to geoffharcourt/vim-coloresque that referenced this issue Feb 5, 2016
Using `set isk` changes rules about what characters count as keywords in
buffers that don't contain CSS. Plugins should use `setlocal` for to
change settings for a buffer.

Updated the command invocation to use `iskeyword` to improve
clarity about what the function is doing.

Fix gko#20.
Fix gko#22.
Fix gko#26.
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

3 participants