gko / vim-coloresque

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

This overides 'iskeyword' for all filetypes. #20

Closed alex-ross closed 4 years ago

alex-ross commented 10 years ago

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 commented 10 years ago

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

onemanstartup commented 10 years ago

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

BenBergman commented 10 years ago

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

dmcinnes commented 10 years ago

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

gonzaloserrano commented 10 years ago

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

gko commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

svenstaro commented 9 years ago

Yo any news here?

onemanstartup commented 9 years ago

@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 commented 9 years ago

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

agirorn commented 9 years ago

Or just remove them from this plugin https://github.com/gorodinskiy/vim-coloresque/pull/25

faceleg commented 9 years ago

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 commented 8 years ago

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 commented 8 years ago

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

agirorn commented 8 years ago

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 commented 8 years ago

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

iamcco commented 8 years ago

The same issues

hbarcelos commented 4 years ago

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.