Giter Club home page Giter Club logo

Comments (11)

danro avatar danro commented on June 15, 2024

I use the ZenCoding package as well, and your test case is working just fine for me. Are you sure both packages are updated to the most recent?

from less-sublime.

aaronmw avatar aaronmw commented on June 15, 2024

I believe they are. At least within the last week or so. I've just recently started using Sublime. I am on a Mac, however. Though I don't know if that would be relevant.

I couldn't find the binding for "Tab" expression expansion in the ZenCoding package to look at or edit its scope selector. It wasn't in the usual keymap settings file, at least.

from less-sublime.

danro avatar danro commented on June 15, 2024

If you're using Package Control, you can pull up the command palette shift+cmd+p, type in Upgrade Package and it will list any packages that are out of date. Please make sure you do this to rule out old versions.

from less-sublime.

aaronmw avatar aaronmw commented on June 15, 2024

It's saying there's nothing to update. I may try reverting all of my keymap files. Maybe I broke something while configuring keys. Though I didn't do that much :S

from less-sublime.

aaronmw avatar aaronmw commented on June 15, 2024

I've just reverted all preferences and commented all of my custom keymappings, and completely destroyed the ZenCoding and LESS packages (including the "Backups" folder which I noticed was preserving preferences?) and reinstalled them both. Also after removing pretty much all of my other packages to avoid conflicts.

Press "tab" in a .less file still doesn't do anything besides add a tab (I restarted Sublime). Blarg.

from less-sublime.

danro avatar danro commented on June 15, 2024

Oh I see what's happening now. I've never used tab completion for the ZenCoding package. I always use the "zen as you type" command (which is pretty awesome btw: ctrl+alt+enter). It looks like you're right.. the synthesized tab snippets are not working properly. It looks like ZenCoding is also conflicting with Sublime's native auto-complete as well. This issue should be moved to the ZenCoding package for sure.

https://bitbucket.org/sublimator/sublime-2-zencoding

from less-sublime.

aaronmw avatar aaronmw commented on June 15, 2024

Ah, okay. I've posted on that project. Still, did you notice that the scope reports differently inside the body {|} in LESS than in CSS? LESS seems not to have a meta.property-list.css equivalent. But you're confident that has nothing to do with the failed "tab" functionality?

Thanks again for your help with this! I'll make due with Zen As you Type :P

from less-sublime.

danro avatar danro commented on June 15, 2024

Yea, the LESS tmLanguage is a different beast than CSS.. because of the nesting and all.

For what it's worth, I did figure out how to fix the native Sublime autocomplete by editing the ZenCoding config. But unfortunately it disables all tab-completions (along with the zen auto-complete tips). For folks like me who only use zen as you type this is a viable workaround.

Packages/ZenCoding/zen-coding.sublime-setting

"disable_completions": true,

from less-sublime.

aaronmw avatar aaronmw commented on June 15, 2024

Ah, I edited something similar on line 31 of Packages/ZenCoding/zencoding/zen_settings.py

I hadn't noticed anything missing in the autocomplete though? Though I've had LESS and ZenCoding installed from Day 1 of using Sublime, so I'm likely to start seeing new things now, then... Heh.

Thanks again!

from less-sublime.

danro avatar danro commented on June 15, 2024

@aaronmw yea when disable_completions: false Zen will override Sublime's native (and really helpful) auto-complete with the contextual snippets. Ideally, they could both coexist peacefully- but Zen seems to be strictly matching against css properties & values.

from less-sublime.

aaronmw avatar aaronmw commented on June 15, 2024

I've noticed some different suggestions, but Sublime's suggestions (besides "color") seem to be pretty lacking? Like "w" autocompletes to "width", but not "width: |;" which I guess is what Zen is for.

Also, I've just noticed that this setting is required to be "true" in order to have Zen auto-expand when pressing tab (in HTML, anyway):

// When enabled, pressing tab will insert the best matching completion.
// When disabled, tab will only trigger snippets or insert a tab.
// Shift+tab can be used to insert an explicit tab when tab_completion is
// enabled.
"tab_completion": true

That's in Sublime's Preferences.sublime-settings file, and with it "true" (as I've always had it, apparently) you can type "ul>li*5" in HTML and just press TAB to expand it, rather than Zen as you Type. It's this functionality that just doesn't seem to be firing in LESS documents, but almost certainly because Zen is being too picky about what it figures is a CSS file. A glance at these two files suggests it's pretty hard-coded to work with CSS and SCSS files.

Packages/ZenCoding/sublimezen.py
Packages/ZenCoding/sublimezenplugin.py

Unless I'm reading them wrong. I'm no Python developer.

from less-sublime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.