{"id":15387374,"url":"https://github.com/rhysd/nyaovim-mini-browser","last_synced_at":"2025-04-14T10:04:49.754Z","repository":{"id":66059596,"uuid":"48655822","full_name":"rhysd/nyaovim-mini-browser","owner":"rhysd","description":"Embedded Mini Browser for NyaoVim","archived":false,"fork":false,"pushed_at":"2017-11-25T14:07:16.000Z","size":9,"stargazers_count":33,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T10:04:43.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/rhysd/NyaoVim","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhysd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-27T18:30:50.000Z","updated_at":"2025-02-06T14:38:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"90f80a25-1299-4177-98fd-71123dde8224","html_url":"https://github.com/rhysd/nyaovim-mini-browser","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"158c0725a936618b404bb05633fe07fd669a4d50"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-mini-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-mini-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-mini-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2Fnyaovim-mini-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhysd","download_url":"https://codeload.github.com/rhysd/nyaovim-mini-browser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860293,"owners_count":21173342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:53:45.132Z","updated_at":"2025-04-14T10:04:49.713Z","avatar_url":"https://github.com/rhysd.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Inner Mini Browser for [NyaoVim](https://github.com/rhysd/NyaoVim)\n==================================================================\n\nThis is [NyaoVim](https://github.com/rhysd/NyaoVim) UI plugin to open an embedded browser in window.  This is implemented as Web Component and built on [Electron's webview](https://github.com/atom/electron/blob/master/docs/api/web-view-tag.md).\n\n![screenshot](https://raw.githubusercontent.com/rhysd/ss/master/nyaovim-mini-browser/main.gif)\n\n## Installation\n\nInstall this repository as Vim plugin with your favorite plugin manager.  And put `\u003cmini-browser\u003e` component to your `nyaovimrc.html` as below.\n\n```html\n\u003cstyle\u003e\n  /* CSS configurations here */\n  .horizontal {\n    display: flex;\n    width: 100%;\n    height: 100%;\n  }\n  neovim-editor {\n    width: 100%;\n    height: 100%;\n  }\n\u003c/style\u003e\n\n\u003c!-- Put your component in flex box layout  --\u003e\n\u003cdiv class=\"horizontal\"\u003e\n  \u003cneovim-editor id=\"nyaovim-editor\" argv$=\"[[argv]]\"\u003e\u003c/neovim-editor\u003e\n  \u003cmini-browser editor=\"[[editor]]\"\u003e\u003c/mini-browser\u003e\n\u003c/div\u003e\n```\n\nThis is a setting example.  You can put `\u003cmini-browser\u003e` component as you like.\n\n## Commands\n\n- `:MiniBrowser [url]`: Open mini browser with specified URL.  If `url` is omitted, previous page is shown.  If you add `!` to the command, focus doesn't move after opening a browser.\n- `:MiniBrowserClose`: Close mini browser.\n\n## Keymaps In Browser\n\n| keymap | description |\n| ------ | ----------- |\n| `j` | Scroll half page down |\n| `k` | Scroll half page up |\n| `h` | Scroll half page left |\n| `l` | Scroll half page right |\n| `Ctrl+x` | Close mini browser |\n| `Ctrl+Shift+f` | Page goes forward |\n| `Ctrl+Shift+b` | Page goes back |\n| `Ctrl+r` | Reload page |\n| `Ctrl+Shift+i` | Open DevTools window |\n\n## Extend Your Usage\n\nThis plugin only provides very simple commands.  You can write script to extend your usage with the commands as below.\n\n- Open GitHub issues of current repository\n- Look for a word under the cursor in online documentations\n- Search something on Google Search\n- Play music on SoundCloud ;)\n- etc...\n\n### Example1: Open URL under cursor\n\nIf you want to open a URL under cursor, adding below mapping to `init.vim` will help you.  Mapping to `\u003cLeader\u003eo` is an example.  You can map it to your favorite key sequence.\n\n```vim\nnnoremap \u003cLeader\u003eo :\u003cC-u\u003eMiniBrowser \u003cC-r\u003e\u003cC-p\u003e\u003cCR\u003e\n```\n\n### Example2: [devdocs.io](http://devdocs.io/)\n\nBelow is an example configuration to search [devdocs.io](http://devdocs.io) instantly.  `:Devdocs` command is defined.  When parameter is given, it opens devdocs.io with the parameter as query.  If no parameter is given, it opens devdocs.io with the word under cursor.\n\n```vim\nfunction! s:devdocs(query) abort\n    if a:query ==# ''\n        let cword = expand('\u003ccword\u003e')\n        if cword ==# ''\n            MiniBrowser http://devdocs.io/\n        else\n            execute 'MiniBrowser' 'http://devdocs.io/#q='.escape(cword, ' \\')\n        endif\n        return\n    endif\n\n    execute 'MiniBrowser' 'http://devdocs.io/#q='.escape(a:query, ' \\')\nendfunction\ncommand! -nargs=* DevDocs call \u003cSID\u003edevdocs(\u003cq-args\u003e)\n```\n\n## Properties of `\u003cmini-browser\u003e`\n\nYou can specify `url`, `width`, `useragent`, and `visible` to the tag.\n\n```html\n\u003cmini-browser\n  url=\"https://google.com\"\n  width=\"600\"\n  useragent=\"...(snip)\"\n  visible\n\u003e\u003c/mini-browser\u003e\n```\n\n## License\n\n```\nCopyright (c) 2015 rhysd\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\nTHE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fnyaovim-mini-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhysd%2Fnyaovim-mini-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2Fnyaovim-mini-browser/lists"}