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

This overides 'iskeyword' for all filetypes. #20

Closed
alex-ross opened this issue Jan 8, 2014 · 20 comments
Closed

This overides 'iskeyword' for all filetypes. #20

alex-ross opened this issue Jan 8, 2014 · 20 comments

Comments

@alex-ross
Copy link

At after/syntax/css/vim-coloresque.vim:125 you will find these rows.

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

This actually overides iskeyword in all my filetypes and thats not what i expected. Motions and syntax highlighting becomes very different in example ruby and javascript where i expect . to actually break the word.

@gko
Copy link
Owner

gko commented Jan 8, 2014

This is weird, it should affect only css/html/stylus/less/sass filtypes.

@onemanstartup
Copy link

I confirm. Just about now i came up whith this bug.

@BenBergman
Copy link

I think this is the same issue referred to here: spf13/spf13-vim#547

@dmcinnes
Copy link

dmcinnes commented Feb 7, 2014

I'm running into the same issue, came here from
https://github.com/sheerun/vim-polyglot

@gonzaloserrano
Copy link

Yeah same problem, i'll probably fork it, delete those rows, UnBundle in spf13 and add my fork.

@gko
Copy link
Owner

gko commented Feb 10, 2014

Hi all, those rows are fix for this issue

The easiest way is to make a backup of isk and revert to it when buffer is not css/sass/less. I will try to fix that. Any pull requests are welcome.

@AndrewRadev
Copy link

Using :setlocal iskeyword+=. should fix the issue as well, no need to store and restore. It's also possible to enumerate several items with :setlocal iskeyword+=.,-,#, so there's no need to put them on several rows, unless you find it more readable.

(update: just found pull request #18, which does this)

On a separate note, I'd really prefer the full usage of iskeyword versus isk. It took me a while to find the issue since I was grepping for iskeyword. My mistake for forgetting short usage, but ultimately, it seems a bit safer. Your call, of course.

@AndrewRadev
Copy link

Incidentally, I don't think this is a good solution in general. This plugin is also activated for Vim files. Messing with iskeyword is very invasive and modifies not only syntax highlighting, but also movement. I'd leave that alone.

I'd recommend looking for a different solution to #7. Perhaps modifying your regexes to require they follow a :?

@adambiggs
Copy link

+1 this is very invasive and was difficult to track down :(

@svenstaro
Copy link

Yo any news here?

@onemanstartup
Copy link

@gorodinskiy just remove those lines already :) and remove colors for names, it's not so helpful anyway, you know that white is white, and orange is orange, there is no point in highlighting this. it is harder to see rgb or hex colors to see what colors are they.

@agirorn
Copy link

agirorn commented Feb 24, 2015

@gorodinskiy can you please just accept some of the patches or comment on them?

@agirorn
Copy link

agirorn commented Feb 24, 2015

Or just remove them from this plugin #25

@faceleg
Copy link

faceleg commented May 28, 2015

Seconded, I can't use this plugin until this is fixed, it breaks w movements along "dotted" JSON objects in JS, e.g.

some.object.property, w just jumps from the s to the y.

@ghost
Copy link

ghost commented Oct 30, 2015

This is an example of why I regret using plugins. You need to document this clearly until fixed otherwise you are wasting a lot of people's time trying to 'fix' their configuration.

@craigp
Copy link

craigp commented Nov 26, 2015

Just discovered that it was this plugin that was doing this to me as well, was driving me insane

@agirorn
Copy link

agirorn commented Nov 26, 2015

More than 2 years have passed since any code has been committed to this repo so I think it time to consider it dead.

@lithammer
Copy link

As an alternative, https://github.com/ap/vim-css-color seems to be maintained.

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#22. Close gko#20
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.
@iamcco
Copy link

iamcco commented Feb 24, 2016

The same issues

@hbarcelos
Copy link

Welcome to 2020. I'm facing this issue if I use this alongside styled-components/vim-styled-components.

More specifically, vim-styled-components includes all CSS syntax files in JavaScript ant TypeScript files:

" this is only possible on vim version above 7
if v:version >= 700
  try
    syn include @CSS3 syntax/css/*.vim
  catch
  endtry
endif

The word text object gets messed up with.

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