GithubHelp home page GithubHelp logo

rajeshvaya / sublime-online-searcher Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 3.0 245 KB

This plugin enables the user to search online right from the sublime text editor. User can search through input, right-clicking the selected text and through general key-bindings.

License: MIT License

Python 100.00%

sublime-online-searcher's Introduction

Online searcher for Sublime Text

This plugin enables the user to search online right from the sublime text editor. User can search through input, right-clicking the selected text and through general key-bindings.

You can also add your own custom domains, search engines and other documentations which are not included by default in this plugin

Key Bindings

  • On pressing ctrl+alt+o you will be prompted to input the search string
  • On pressing ctrl+alt+s search the default domain with the selected text

You can change the default key binding at Preferences -> Package Settings -> Extended Tab Switcher -> Key Bindings User

Usage

  • Press ctrl+alt+o
  • Enter the search string in the input box with the format domain:text (e.g. google: css opacity or php:in_array)

Tip: If you have selected text to be searched the input box will be already pre-filled or your can simply right-click and click "Search online" and it will search with default configurations

Configurations

User can overwrite the following configurations by adding flags in the User - Settings section which can be access by Preferences -> Package Settings -> Extended Tab Switcher -> Settings - User

  • Default

    • google (e.g. google: best css practices)
    • stackOverflow (e.g. stackoverflow: jquery animate not working)
    • github (e.g. github: noSQL databases)
    • php (e.g. php: in_array)
    • jquery (e.g. jquery: fadeIn)
    • youtube (e.g. youtube: node.js tutorials)
    • image (e.g. image: facebook icon)
  • Custom

    • The above default configurations can be changed or new configs can be added in Preferences -> Package Settings -> Extended Tab Switcher -> Settings - User

How to Install

  • Via Package Control

    The easiest way to install is using [Sublime Package Control](https://sublime.wbond.net), where OnlineSearch is listed as `OnlineSearch`.
    
    1. Open Command Palette using menu item `Tools -> Command Palette...` (<kbd>⇧</kbd><kbd>⌘</kbd><kbd>P</kbd> on Mac)
    2. Choose `Package Control: Install Package`
    3. Find `OnlineSearch` and hit <kbd>Enter</kbd>
    
  • Manual

    You can also install the theme manually:
    
    1. [Download the .zip](https://github.com/rajeshvaya/sublime-online-searcher/archive/master.zip)
    2. Unzip and rename the folder to `OnlineSearcher`
    3. Copy the folder into `Packages` directory, which you can find using the menu item `Sublime Text -> Preferences -> Browse Packages...`
    

License

This projected is licensed under the terms of the MIT license.

The MIT License (MIT)

Copyright (c) [2014] [Rajesh Vaya <[email protected]>]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

sublime-online-searcher's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sublime-online-searcher's Issues

Different keyboard shortcuts for different queries?

Great plugin! I'd like to use this to emulate WriteMonkey's lookup feature. It permits one to have different keyboard shortcuts for different queries. So for example alt+1 would be google, alt+2 would be php, etc. Any idea how that could be achieved?

Feature request: fill search input with previously searched term

Hey, thanks for the great plugin. I have this strange problem with all of my ST2/3 web search plugins, that searching works in browser only after several tries. Could you please allow an option to maintain last searched text in the input so this experience could be less painful?

Disable domain keys in query

I want to use this plugin to search for symbols like Vec::new ... sadly it's recognized as the domain Vec and actually only searches for :new ...

I have custom settings with only one "default" domain, so it would be handy if the whole domain-key parsing would be disabled.

Not working if string to search for contains Unicode characters

Have to report another bug - if a string to be searched contains a Unicode character, search doesn't work and console gives this error:

Traceback (most recent call last):
  File "OnlineSearch in /Users/alex/Library/Application Support/Sublime Text 3/Installed Packages/OnlineSearch.sublime-package", line 62, in search
  File "X/webbrowser.py", line 70, in open_new_tab
  File "X/webbrowser.py", line 62, in open
  File "X/webbrowser.py", line 622, in open
UnicodeEncodeError: 'ascii' codec can't encode characters in position 47-54: ordinal not in range(128)

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.