Giter Site home page Giter Site logo

zeal's Introduction

Zeal for Sublime Text

Zeal integration for Sublime Text. Zeal is an offline documentation browser which similar to Dash.

Tested on Windows & Linux.

Usage

  • F1 - Search for the currently selected word. Shows a selection list if multiple docsets match for the current file.

    code docset list

  • Shift F1 - Custom search in Zeal docsets.

    custom search

Installation

The easiest way to install the package is to use Package Control. Choose Package Control: Install Package in the Command Palette (Ctrl Shift P) and select "Zeal" from the list.

Using Git

Go to your Sublime Text Packages directory and clone the repository using the command below:

$ git clone https://github.com/vaanwd/Zeal "Zeal"

Download Manually

  1. Download the files using the GitHub .zip download option.
  2. Unzip the files and rename the folder to Zeal.
  3. Copy the folder to your Sublime Text Packages directory.

Configuration

Select Preferences: Zeal Settings form the command palette to open the configuration files.

If your zeal executable cannot be found by default, change the zeal_command setting.

To add more docsets to choose from, add entries to the docsets_user list.

© 2014 Vaan Web Design
© 2020 FichteFoll

zeal's People

Contributors

alkuzad avatar ar7max avatar fichtefoll avatar fmcorz avatar glymehrvrd avatar nabijaczleweli avatar oconnor0 avatar rexdf avatar vaanwd avatar vlakarados avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeal's Issues

Why does the Zeal executable need to be described with the full path?

I tried specifying the zeal executable by including its path in PATH, but no luck. I had to say

{
  /**
   Zeal executable path. The instructions below require zeal
   to be located very precisely by its full path!?
   */
  "zeal_command": "C:\\Program Files\\Zeal\\zeal.exe",
  "mapping_sort" : true,

  // Language mapping.
  "language_mapping": {
    "Python": {"lang": "python", "zeal_lang": "python"},
    "Julia": {"lang": "julia", "zeal_lang": "julia"}
  }
}

Any particular reason?

By the way, many thanks for this useful package!

option to be able to deactivate language specific search mapping

Hey, first of all thx for this great plugin. Works great, but there is one problem.

In any javascript file, if i want to search with F1 for a specific method, and this method is e.g. a lodash method, he adds the javascript prefix to the search query. Now this is normally a good option, but as javascript can be used with many libs and each one might have its own documentation i think it would be cool to disable this language agnostic option.

something like
"language_mapping": {
"JavaScript": {activated:false}
}
so that in any javascript files he now searches just for the term under the cursor

Prevents ST from updating itself

Well, this problem is a bit stupid, but basically because Zeal is run inside the default working directory (which is the installation folder of ST3) and holds a file lock to it on Windows, it prevents ST3 from updating itself.

I had to close Zeal to be able to install it.

The issue was revealed by Process Hacker, which can show file handles of running processes.

TypeError: 'dict_values' object does not support indexing

Hey,

Trying to use the plugin on Ubuntu+ST3. I get this error in the console when doing a search:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "zeal in /[...]/Installed Packages/Zeal.sublime-package", line 181, in run
TypeError: 'dict_values' object does not support indexing

Any idea why? :)

No Zeal mapping for java on salesforce apex class

I'm using the MavensMate Sublime Text plugin to develop for the Salesforce platform. When pressing F1 Zeal throws an error stating "No Zeal mapping found for java language".

For some reason Zeal thinks its a Java file, not Apex file.

Every search triggered with the plugin actually searches for ' in Zeal

Hey,

Now the plugin doesn't crashes anymore, it acts weirdly: every search I do from the plugin (manual or selected word) actually just add ' in the Zeal search bar.

Do you think it's a problem from the plugin or my Zeal install could be responsible here?

Still on Ubuntu (with zeal installed through the PPA).

Thanks :)

Language mapping not working (C++)

After I press F1 in a .cpp file, why it say "No Zeal mapping was found for c language." ?
How to fix this problem?

Have I set something wrong?


{
"zeal_command": "E:\Software\Programming\Zeal\zeal.exe",

"mapping_sort" : true,

"language_mapping": {
"HTML": {"lang": "html", "zeal_lang": "html"},
"JavaScript": {"lang": "javascript", "zeal_lang": "javascript"},
"CSS": {"lang": "css", "zeal_lang": "css"},
"PHP": {"lang": "php", "zeal_lang": "php"},
"Python": {"lang": "python", "zeal_lang": "python"},
"C++": {"lang": "c++", "zeal_lang": "c++"} /* Is this correct? <<<<<<<<<<<<<<<<<<<<<<<<<<< */
}
}

Mapping to multiple zeal languages

I am trying to figure out what is the way to map the same language to several Zeal languages.

For example, map Ruby to both "Ruby" and "Ruby on Rails".

This is what I guessed so far:

    "Ruby": {"lang": "ruby", "zeal_lang": "ruby 2"},
    "Ruby": {"lang": "ruby", "zeal_lang": "ruby on rails 4"},

(Excellent plugin and application btw)

EDIT:

Ok - I think I figured it out. Had to use a different key, and then sublime opens a menu to choose from:

    "Ruby": {"lang": "ruby", "zeal_lang": "ruby 2"},
    "Rails": {"lang": "ruby", "zeal_lang": "ruby on rails 4"},

Is that right?

Hotkey issues

F1 hotkey is not ideal as it is currently bound to something else, please make the hotkey configurable if possible.

Language mapping not working (Processing)

I have added a language mapping to Zeal.sublime-settings as follows:

"Processing": {"lang": "Processing", "zeal_lang": "Processing"},

I have managed to get the Zeal search bar working with Shift+F1, however F1 gives me the following message (when e.g. 'mousePressed' is highlighted):

12 characters selected; No Zeal mapping was found for c language

Processing docset is installed in Zeal.

Does not work on ST3 when installing via Package Control

Your package does not work when it was installed via Package Control (or rather: installed using a sublime-package file). Since package on ST3 can be read from within .sublime-package files – and this is what ST prefers, see https://www.sublimetext.com/docs/3/packages.html – the file you want to copy does not exist on the target machine.

There is a feature in Package Control that tells it to extract the package by creating a .no-sublime-package file in the package root, but there is a better method for this. ST3 provides a sublime.load_resource() function that can open a package file's contents regardless of package position. See also Monnoroch/ColorHighlighter#36 (comment).

Problematic source:

    if not os.path.exists(user_settings_path):
        shutil.copyfile(default_settings_path, user_settings_path)

Traceback:

Traceback (most recent call last):
  File "zeal in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Zeal.sublime-package", line 209, in after_input
  File "zeal in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Zeal.sublime-package", line 120, in open_zeal
  File "zeal in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Zeal.sublime-package", line 20, in get_settings
  File "./shutil.py", line 109, in copyfile
    def copystat(src, dst):
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Sublime Text 3 Portable Beta\\Data\\Packages/Zeal/Zeal.sublime-settings'

Solution:

    if not os.path.exists(user_settings_path):
        if os.path.exists(default_settings_path):  # alternatively: `if int(sublime.version()) < 3000:`
            shutil.copyfile(default_settings_path, user_settings_path)
        else:
            with open(user_settings_path, 'w') as f:
                f.write(sublime.load_resource(default_settings_path))

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.