Coder Social home page Coder Social logo

vim-browser-search's Introduction

vim-browser-search

CI

This plugin helps perform a quick web search for the text selected in (Neo)Vim

Installation

Plug 'voldikss/vim-browser-search'

Keymappings

This plugin doesn't supply any default mappings. Here are some recommended key mappings

nmap <silent> <Leader>s <Plug>SearchNormal
vmap <silent> <Leader>s <Plug>SearchVisual

Use cases

  • Select text and type <Leader>s to do a web search

  • Type <Leader>saw in to search web for a word

  • Type <Leader>sa( to search web for the text wrapped in the bracket

  • Type <Leader>sas to search web for a sentence

  • ...

Variables

g:browser_search_default_engine

Defaut: 'google'

g:browser_search_engines

Defaut:

  {
  \ 'google':'https://google.com/search?q=%s',
  \ 'github':'https://github.com/search?q=%s',
  \ 'stackoverflow':'https://stackoverflow.com/search?q=%s',
  \ 'bing': 'https://www.bing.com/search?q=%s',
  \ 'duckduckgo': 'https://duckduckgo.com/?q=%s',
  \ 'wikipedia': 'https://en.wikipedia.org/wiki/%s',
  \ 'youtube':'https://www.youtube.com/results?search_query=%s&page=&utm_source=opensearch',
  \ 'baidu':'https://www.baidu.com/s?ie=UTF-8&wd=%s'
  \ }

Commands

:Search {engine} {text}

Search text with engine

:SearchCurrentText [engine]

Search the text under the cursor with engine, if no engine, use g:browser_search_default_engine

:SearchVisualText [engine]

Search the selected text with engine, if no engine, use g:browser_search_default_engine

vim-browser-search's People

Contributors

icyflame avatar idanarye avatar voldikss avatar

Watchers

 avatar

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.