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

cannot toggle it "on". #2

Open
richardh9935 opened this issue Mar 24, 2019 · 3 comments
Open

cannot toggle it "on". #2

richardh9935 opened this issue Mar 24, 2019 · 3 comments

Comments

@richardh9935
Copy link

I put
prismatic-parens:toggle
into init.coffee but it won't start. Error message is

Failed to load /Users/richardh9935/.atom/init.coffee
prismatic is not defined

I suspect the hyphen or the capitalisation is incorrect. What should I have put in?

@calebmeyer
Copy link
Owner

If you put only prismatic-parens:toggle into your init.coffee, you will get that error. That is the correct syntax for referring to the command in your keymap. Unfortunately, atom doesn't expose methods for each command.

To call it from your init script, you'd need to use something like

atom.commands.dispatch(atom.workspace, 'prismatic-parens:toggle')

However, I'm currently unable to get that to work:
image

It does work if you call it via the command palette, but I understand it's inconvenient to have to do that over and over again. I'll put some questions out to the slack to see what everyone thinks. Maybe we can find something.

@richardh9935
Copy link
Author

richardh9935 commented Mar 25, 2019 via email

@calebmeyer
Copy link
Owner

Richard, I did get a few comments on slack:
https://atomio.slack.com/archives/C04VAHX6F/p1553530996013700?thread_ts=1553462687.011700&cid=C04VAHX6F
https://atomio.slack.com/archives/C04VAHX6F/p1553530538013600

I haven't had time to see if they would work yet, and I don't anticipate having that time within the next week or so. Sorry for the long wait.

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

2 participants