https://github.com/rajasegar/vim-search-web
A vim plugin to search for things in Web
https://github.com/rajasegar/vim-search-web
search-interface searching vim vim-plugin
Last synced: about 1 year ago
JSON representation
A vim plugin to search for things in Web
- Host: GitHub
- URL: https://github.com/rajasegar/vim-search-web
- Owner: rajasegar
- License: mit
- Created: 2019-06-13T10:42:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T07:15:36.000Z (about 7 years ago)
- Last Synced: 2025-02-25T19:42:55.577Z (over 1 year ago)
- Topics: search-interface, searching, vim, vim-plugin
- Language: Vim script
- Size: 18.6 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-search-web
Search the web from your Vim editor
## Install
Place in `~/.vim/plugin/vim-search-web.vim`
### For Pathogen
```sh
cd ~/.vim/bundle
git clone https://github.com/rajasegar/vim-search-web.git
```
### With Vundle
Add this to your plugins list in `.vimrc`
```sh
Plugin 'rajasegar/vim-search-web'
```
## Usage
### Normal mode
Just place the cursor on any word about which you want to search and use
the key binding `sg`.
That's all, now a separate browser window will open with your search results.
### Visual mode
Just select any word about which you want to search and use
the key binding `sg`.
### Ex mode
You can specify the supported search engines as the first parameter and
then followed by the keyword.
```sh
:OpenSearch("Google", "hello world")
```
## Key Bindings
- [Leader]sdi => Dictionary Search
- [Leader]sd => DuckduckGo Search
- [Leader]sgi => Github Search
- [Leader]sg => Google Search
- [Leader]sn => npm Search
- [Leader]sr => reddit Search
- [Leader]ss => StackOverflow Search
- [Leader]st => Thesaurus Search
- [Leader]sw => Wikipedia Search
- [Leader]sy => Youtube Search
## Configuration
There are just a few global variables (options) you may set in the *.vimrc* file.
* `g:vsw_open_command`
Sets the command used to open the URL. In case of Ubuntu this would be
`"xdg-open"`:
let g:vsw_open_command = "xdg-open"
## FAQS
### Not able to search keywords with '-' (hyphens)
This plugin is using `CWORD` so spaces and other special characters like hyphens are ignored.
So if you want to include hypens also in your search keywords, just add them(temporarily) to `iskeyword`.
```sh
:set iskeyword+=-
```
## Other Similar plugins
- https://github.com/szw/vim-g
- https://github.com/mickaobrien/vim-stackoverflow
- [vim-search-me](https://github.com/rajasegar/vim-search-web)