Code Monkey home page Code Monkey logo

google-search's People

Contributors

mihai-vlc avatar nwjlyons avatar zeragamba avatar

Stargazers

 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

google-search's Issues

NOT INSTALLING

Sublime Text 3211 (also ST4-drag-drop-flop)
MacOS 11.4 MacPro 2018
PackageControl is not installing Google Search.
Just to be sure, can select to install Google Search.
PackageControl: Install Package - Google Search is there, select nothing happens.
/Users/.../Library/Application Support/Sublime Text 3/Installed Packages ...nothing.
/Users/.../Library/Application Support/Sublime Text 3/Packages/User/Package Control.sublime-settings ...nothing.
PackageResourceViewer confirms that Google Search is not installed.
PackageControl is not installing Google Search.

Feature request: Affix file type name

Could you tell me if there is a way to affix the file type name to the Google searches? For example, if I'm working on a .py file in Sublime Text and I highlight some text and use your google-search package, I want it to do a search for the highlighted text with " python" included automatically (same with ".php" and " php", etc...)

webbrowser not open default browser

Hi,
in mac os sierra, the webbrowser not open default browser.
You could add an option to select the browser to be used, such as:

    try:
        browser = settings.get('browser', '')
        webbrowser.get(browser).open(fullUrl)
    except:
        webbrowser.open(fullUrl)

thanks

Note: sublime text open url, has the same error.

Support double quotes ("") and other special characters, potential fix included

The plugin breaks when given search strings including quote characters, e.g.
search this "and this"

A potential fix would be to convert the query to URL format (substituting special characters) by using urllib like so:

import webbrowser
from urllib.parse import quote_plus         # <--- added
import sublime, sublime_plugin


def search(q):
    settings = sublime.load_settings("google_search.sublime-settings")
    # Attach the suffix and the prefix
    q = quote_plus(settings.get('prefix', '') + q + settings.get('suffix', ''))    # <--- changed

    fullUrl = settings.get('domain', 'https://www.google.com') + "/search?q=%s" % q

    webbrowser.open(fullUrl)

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.