Is there something similar in Vim?
Thanks in advance!
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
To complement @laktak's answer, the author of the 'tyru/open-browser' plugin recommends the following maps:
nmap gx <Plug>(openbrowser-smart-search) vmap gx <Plug>(openbrowser-smart-search)
@laktak's suggestion of mapping
<F1> works, but why use a function key when you can keep your fingers on home row? :)
After installing the plugin, and putting these maps in your .vimrc, you should be able to press
gx to automatically open your default browser and search Google for the either the word under the cursor (in normal mode) or all the text included in your visual selection (in visual mode). If you already have an instance of your default browser open, a new tab will be opened..
It works great. There are even options to change the browser and search engine used.
And add the map:
map <F1> <Plug>(openbrowser-search)
This will allow you to search the word under the cursor or your selection.