genoma / vim-less

Vim Less syntax highlighting
http://www.vim.org/scripts/script.php?script_id=4892
Vim License
16 stars 3 forks source link

Undefined variable, even tho is found in another file #3

Closed dvidsilva closed 9 years ago

dvidsilva commented 10 years ago

Hey, it would be good to differentiate between the variables that are defined in other files and those that aren't.

If you point me in a good direction I can try and code it myself, tho I haven't tried a vim plugin before. But I thought maybe having a variable where you declare the main file where everything else is imported could work to identify what's been defined and included.

genoma commented 10 years ago

Hi, yes it sure should be good, but for what i know about vimL and how syntax highlighting works, i can say that i have no idea how to do that, and haven't seen any Vim syntax highlighting doing that (sass, coffeescript and the likes). But again i have no real experience in this field and if you find a way to do that i'm more than happy to take in consideration any sort of code contribution.

dvidsilva commented 10 years ago

umm how are you currently doing it? it would be my first time trying this but it would be a great thing to learn.

genoma commented 10 years ago

If you are referring to the Less syntax runtime files i have modified Tim Pope Sass runtime files, and than i've gone trough some trial and error process, reading and learning from other syntax files like css. From a practical point of view, probably you should build a db/file with all the relevant variables and mixins and than highlight the results in a different way. Probably with ruby, python or lua should be easier than using vimL.

A good start point could be https://groups.google.com/forum/#!forum/vim_use and ask where to get the best documentation available, or even http://www.vim.org/.

I'm sorry i can't be of more help, but i haven't had any time to look further at how to build Vim plugins and never searched for more informations or documentation.