Improvement over `open` utility for macOS and Chrome; open URLs in the browser but instead of creating new tabs every time, use existing ones by mutating them.
GPL-3.0 License
Comparison with macOS's open
|
|
---|---|
open | |
reopen |
osascript
which is pre-installed macOS utilitynpm install --global reopen-cli
reopen '<url>'
reopen 'https://devdocs.io/#q=html'
reopen 'https://devdocs.io/#q=react'
Although you can use with any URL, one particular example would be opening
devdocs.io upon pressing 'keywordprg'
mapping which is K
by default.
Create a command.
command! -nargs=* Docs call system(printf('reopen "https://devdocs.io/?q=%s"', <q-args>))
Set 'keywordprg'
to that command.
set keywordprg=:Docs
Now, pressing K
under any keyword (or e.g. :Docs child_process
) will bring
DevDocs docs and repeating that would replace current open tab.
GPL-3.0