Sublime Forum

SublimePeek - quick access to help for functions

#21

hi, last solution doesn’t seem to work, i’m still getting the documentation from the system ri. I guess i can work this around by installing the library i want the documentation for also to system ruby, but unfortunately as you also said we can have documentation only for one version of ruby in this way

0 Likes

#22

Ok, i’ve found the solution and it was right there from the begging, i just needed to run ri without any arguments to find out that…:

By default ri searches for documentation in the following directories:
(...)
 /$HOME/.rdoc
(...)

so i just put all the documentation i care of there and it works…
only thing to modify in the script for this to work is to add the --home flag

0 Likes

#23

I have updated the plugin with a number of new features:
- Added support for JavaScript, PHP, Ruby, and Stata
**- Improved Python support **
- Overview of all available help topics based on the familiar ST2 quick select panel
(the same as the command panel, or the one for jumping from project to project)

  • Help files are now downloaded and compiled in the background
  • Bug fixes

francescob, I have revered the non-working solution with the shell=true argument. I could still add an option that sets the ri path so that you don’t have to overwrite default Ruby. You should go back to the main channel through Package Control. I am not sure how updating works when you installed the plugin manually from the dev branch.

0 Likes

#24

Just tried SublimePeek… I was desperately looking for something like that. THANKS!!

0 Likes

#25

Great plugins!!!
is there any way to add keyboard shortcut for closing popups?

0 Likes

#26

[quote=“vitaLee”]Great plugins!!!
is there any way to add keyboard shortcut for closing popups?[/quote]

esc ?

0 Likes

#27

@francescob that’s how you close sublime dropdown dialog, while i was referring to the actual popup displaying the doc snippets.
not sure if you got my point right.
im using v2181 and cant dismiss the popup with ESC.

0 Likes

#28

Hi, are you using Mac OS X 10.6? My experience is that you can close the quicklook window from the package with esc or space on 10.7. I tried 10.6 once and it didn’t work that way. If that is the case, I can try to fix it but not before sometime next week…

0 Likes

#29

Hi, yes i’m running OSX 10.6.8.
thanks.

0 Likes

#30

Firstly, you can pass a “packages.json” (or similar) to Package Control which will allow installation only from Mac OS.

Then, I’d love to be able to use something like this on Windows. I’ve been searching for this (not actively, but I have) and even considered to make it on my own, even though I clearly don’t have the time.
Drop me a message here, contact me on github or whatever. I’m open to testing and I know (some) package developing, but I’m also fine with testing :wink:

0 Likes

#31

FichteFoll, we can make it work for windows. It should not be hard but I just do not have a windows computer. Can you comment on this issue on github so that we can continue the discussion there (just so that we both get messages posted there):
github.com/jlegewie/SublimePeek/issues/4
I will add details next week.

Anyone with a unix system?
github.com/jlegewie/SublimePeek/issues/5

vitaLee, I will get to that next week.

0 Likes

#32

hi, it’s me again, i’m having a problem with ruby doc when looking up for certain words (a small number atm), this is the error i see in the sublime text console:

Traceback (most recent call last):
  File "/Applications/Sublime Text 2.app/Contents/MacOS/sublime_plugin.py", line 362, in run_
    return self.run(edit)
  File "./SublimePeek.py", line 84, in run
  File "./SublimePeek.py", line 222, in create_help_file
  File "./SublimePeek.py", line 175, in write_html_file
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3598: ordinal not in range(128)

and here: https://gist.github.com/2725230 is an example of the html produced by ri for words that give this error

0 Likes

#33

thanks for the report. I will look into it but it might take some time. Meanwhile, do you see any pattern in the keywords? The help file you posted is from .belongs_to, right? What are other examples?

0 Likes

#34

It seems to happen more often, but non exclusively, with methods from ActiveRecord::Base class

0 Likes

#35

Just because it came up multiple times on github: The current stable build of ST2 (2181) produces an error when you try to use the plugin with HTML, javascript, PHP or css because the ok_cancel_dialog was added after 2181. It works with the dev build of ST2: sublimetext.com/dev
You can switch back to the stable channel after using SublimePeek once with every language you want to use. I am reluctant to fix this because I am hoping for a new st2 stable release soon.

0 Likes