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

Why it doesn't work? #44

Open
JSDurand opened this issue Jul 22, 2016 · 6 comments
Open

Why it doesn't work? #44

JSDurand opened this issue Jul 22, 2016 · 6 comments

Comments

@JSDurand
Copy link

JSDurand commented Jul 22, 2016

I am using sublime text 3 (3114) on a mac with el capitan. I downloaded smart markdown, but, in editing a markdown file, nothing as claimed in the read me file happens.
First of all, section folding does not work: TAB just gives me some spacing, not folding.
Second, table does not function either. But automatic list-generation does work, which starts to confuse me. What might I have done wrong?
Thanks in advance for any help.

@JSDurand
Copy link
Author

JSDurand commented Jul 22, 2016

I found that there were no folders named SmartMarkdown in the packages folder, so I manually git cloned to the package folder. Per chance I have done it wrong? I typed
git clone https://github.com/demon386/SmartMarkdown.git Path_to_package/SmartMarkdown
After this, global folding / unfolding & increase/decrease heading depth work well, but others do not.
Then I downloaded ST2, tested SM, and it worked!
Basically everything is fine for ST2, just as I expected by looking at the readme file.
So I guess something is wrong with the support for ST3?
In summary, in ST3, the only thing that works is global folding / unfolding & increase/decrease heading depth.
Other features such as table support, smart folding, or list generation (yeah, it fails now for some reason. :( ) just fail to function.
Hope this issue can be solved.

@vovkkk
Copy link
Contributor

vovkkk commented Jul 22, 2016

It works for me in 3114 and 3118.

You probably have some keybinding for TAB which overrides SmartMarkdown ones.
Try FindKeyConflicts to see it.

Try to copy SM keybindings for TAB into your user keybindings file.

no folders named SmartMarkdown in the packages folder

Yes, you have to go up, then to Installed Packages there should be SmartMarkdown.sublime-package (it is zip archive) if you did installation with Package Control.

Then you can override some files (e.g. keybindings) of that package by placing them into Packages/SmartMarkdown folder; it is a feature of Sublime Text to make customisations more flexible;
see docs for details.

@JSDurand
Copy link
Author

Thanks for the information!
Indeed I got some key conflicts. But before I fix that, the problem is fixed now!
It seems that I just have to unarchive the sublime-package file to make everything OK.
Thanks for the help. 👍 :D
Also I learned some useful stuff about sublime plugins when trying to fix the problem; quite interesting. :)
Thanks again!

@ngmariusz
Copy link

I have same as @JSDurand on Build 3126 - smart folding, not working
ubuntu 16.04, Python 2.7.12
KeyConflicts - checked
Replacing with git clone - checked
no effect; couldn't hack the solution

i have also tried with ..../User/Default (Linux).sublime-keymap

{ "keys": ["super+shift+m"], "command": "smart_folding", "context":
    [
        { "key": "selector", "operator": "equal", "operand": "markup.heading.markdown" }
    ]
}

it just gives "M"

so maybe something with fireing smart_folding command?

@vovkkk
Copy link
Contributor

vovkkk commented Oct 26, 2016

so maybe something with fireing smart_folding command?

Or something with keyboard or the way how ST interprets input.

Command works just fine for me, you can check like this:

  • create markdown

    # title
    content
    
  • put cursor on first line

  • open console View → Show console

  • paste view.run_command('smart_folding') into console, press Enter

  • see second line become hidden

Not all keybindings can be used (super+shift+m does not work at all on Windows for example), there might be some bugs/regressions in recent versions of ST, some incompatibilities with different keyboard layouts, and so on and so forth.
Try different keys, try ST2 (2221).

@ngmariusz
Copy link

so,
inspired to "just" run_command('smart_folding') I've found there is some issue with 'context' filter.

NOT WORKING

  { "keys": ["shift+super+m"], "command": "smart_folding", "context":
    [
      { "key": "selector", "operator": "equal", "operand": "markup.heading.markdown" }
    ]
  }

WORKS FINE

 { "keys": ["shift+super+m"], "command": "smart_folding"}

with some "keybinding collision designing" I can use your plugin, now;
thnx

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