- provides a set of mappings to search for custom text, text under cursor and visually selected text;
- provides search on Google, Youtube;
Mappings:
<leader>sgg -> Searchon Google Go (goes into command mode and waits for input)
<leader>sgw -> Searchon Google Word under cursor
<leader>sg -> Searchon Google visually selected text
<leader>syg -> Searchon Youtube Go (goes into command mode and waits for input)
<leader>syw -> Searchon Youtube Word under cursor
<leader>sy -> Searchon Youtube visually selected text
Mapping mnemonics:
- first letter (s) stands for "searchon"
- second letter (g, y) indicates the name of the target (ex: Youtube)
- third letter (g, w) stands for "go", word under cursor or (if missing) the visually selected words
- OSX
- Google Chrome
When a search is issued, a new tab is created in Google Chrome and a link with the specific search query is loaded.
In a vim environment that involves a lot of online text searches (ex: error messages, function names, etc.) or just to find out a nice song on Youtube to help with the programming flow :], a mechanism in which a command triggered in vim goes directly to the target webpage is quite liberating.
So, instead of:
- copy text in vim
- open Google Chrome
- create new tab in Google Chrome
- navigate to Google
- paste
- enter
with vim-searchon-go, the process becomes:
- select text in vim
- press \sg
(where "\" is the default leader key in vim).
Vundle
Plugin 'mihaicristiantanase/vim-searchon-go'
vim-plug
Plug 'mihaicristiantanase/vim-searchon-go'
Pathogen
git clone https://github.com/mihaicristiantanase/vim-searchon-go ~/.vim/bundle/vim-searchon-go