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

Graphviz: Please place cursor in graphviz code before running #6

Open
lucbeta opened this issue Jan 1, 2015 · 14 comments
Open

Graphviz: Please place cursor in graphviz code before running #6

lucbeta opened this issue Jan 1, 2015 · 14 comments

Comments

@lucbeta
Copy link

lucbeta commented Jan 1, 2015

Hi,
just installed SublimeGraphvizPreview an a ubuntu 14.04 machine with sublimetext 2. After entering code I get the message: Graphviz: Please place cursor in graphviz code before running.

Placed the cursor before code and I still get the message. Any sugguestions on this Problem?

Happy New Year 2015
luc

@rlodbrok
Copy link
Collaborator

Hi, please do NOT place the cursor "before" or after the code but inside the digraph brackets. should work that way - please confirm.

@bugeb
Copy link

bugeb commented May 15, 2015

I also encountered the same problem, select a graphviz snippet in your file(or Ctrl+A).

@munro
Copy link
Owner

munro commented May 21, 2015

@lttowq Check out the video of the home page [1], you have to put your cursor inside the { ... } block. I did it that way because it was easier for me. 😄 If you want it to work in another way as well, you're free to make a pull request!

Could you record a video of the issue [2] if you think something is just broken with using it on Ubuntu?

[1] https://github.com/munro/SublimeGraphvizPreview
[2] http://askubuntu.com/questions/107726/how-to-create-animated-gif-images-of-a-screencast

@ulidtko
Copy link

ulidtko commented Oct 21, 2015

@munro
gif
Pardon the quality, I've spent like a minute recording this.

So yeah, as you can see, 3 people supposedly can't be so stupid as to not being able to place a cursor inside a block of code. The real problem is that the previewer just doesn't work (and probably also gives the wrong error message).

@ulidtko
Copy link

ulidtko commented Oct 21, 2015

By the way, those using Atom will be happy to know that it's Graphviz previewer actually does work.

@munro
Copy link
Owner

munro commented Oct 21, 2015

@ulidtko This sublime plugin searches for digraph so it can render graphviz embedded in other files. So to fix this for your use case, someone needs to make it look for strict graph as well, it should be pretty easy.

As a tangent, I use primarily use Atom, and have tried that plugin, but the usability of previewing inline graphviz snippets keeps bringing me back. XD I would really like to see a better markdown preview so I can add hooks to things like graphviz preview. Just throwing this out, since Christmas is coming up!

# my random idea

here's a diagram of what I'm thinking:
```graphviz
digraph {
    you -> are -> neat;
}
` ``

@AndrewMagerman
Copy link

I have the same issue. I'm doing a workaround of cmd-a, cmd-shift-G.

Observed behaviour:
cursor within blocks: abovementioned error message gets shows.
part of code selected: no preview generation
everything selected: no issues.

@timofg
Copy link

timofg commented Apr 30, 2017

In windows. I'm trying to execute sublime with administrator privileges. Then it seems to be solved.

@B04902047
Copy link

1.Select the parts of the code of which you want to generate a preview. (possibly by "command+a")
2."cmd+shift+g"

@bravedavid
Copy link

change helpers.py file, then I work well in Mac.

52 # compile pdf
53 pdf_filename = tempfile.mktemp(prefix='sublime_text_graphviz_', dir=None, suffix='.jpg')
54 call(['dot', grapviz.name, '-Tjpg', '-o' + pdf_filename], env=ENVIRON)

@AndrewMagerman
Copy link

where is the helpers.py file?

@fivedoumi
Copy link

I change the code in helpers.py,but is did no work either.
the problem still exists.

@munro
Copy link
Owner

munro commented Jun 12, 2018

@bravedavid oooo interesting you had to switch to JPG, is there something we could do to make PDFs work for you? I like PDFs 'cause it's vectorized, and it lets me zoom into really crazy diagrams

@fivedoumi could you share a video of it not working, and share any debugging output from the console?

@fivedoumi
Copy link

@munro
It works after I set the dot.exe's directory correctly,thanks.

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

10 participants