commit
1afdb51fea
10 changed files with 561 additions and 274 deletions
278
README.md
278
README.md
|
@ -1,7 +1,6 @@
|
||||||
# Vim Vixen
|
# Vim Vixen
|
||||||
|
|
||||||
[](https://greenkeeper.io/)
|
[](https://greenkeeper.io/)
|
||||||
|
|
||||||
[](https://gitter.im/vim-vixen/vim-vixen)
|
[](https://gitter.im/vim-vixen/vim-vixen)
|
||||||
[](https://circleci.com/gh/ueokande/vim-vixen)
|
[](https://circleci.com/gh/ueokande/vim-vixen)
|
||||||
[](https://david-dm.org/ueokande/vim-vixen?type=dev)
|
[](https://david-dm.org/ueokande/vim-vixen?type=dev)
|
||||||
|
@ -11,279 +10,9 @@ keyboard. Since version 57, Firefox has migrated to the WebExtensions API and
|
||||||
has dropped support for legacy add-ons. Vim Vixen is a new choice for Vim users
|
has dropped support for legacy add-ons. Vim Vixen is a new choice for Vim users
|
||||||
since it uses the WebExtensions API.
|
since it uses the WebExtensions API.
|
||||||
|
|
||||||
## Basic usage
|
To get Vim Vixen, install it from [Firefox add-ons][AMO].
|
||||||
|
|
||||||
### Keymaps
|
For usage and more detailed information, check out our [documentations][documentations].
|
||||||
|
|
||||||
Keymaps are configurable in the add-on's preferences by navigating to `about:addons` and selecting "Extensions".
|
|
||||||
The default mappings are as follows:
|
|
||||||
|
|
||||||
#### Console
|
|
||||||
|
|
||||||
- <kbd>:</kbd>: open the console
|
|
||||||
- <kbd>o</kbd>, <kbd>t</kbd>, <kbd>w</kbd>: open a page in the current tab, a new tab, or new window
|
|
||||||
- <kbd>O</kbd>, <kbd>T</kbd>, <kbd>W</kbd>: similar to <kbd>o</kbd>, <kbd>t</kbd>, <kbd>w</kbd>, but using the current URL
|
|
||||||
- <kbd>b</kbd>: select tabs by URL or title
|
|
||||||
- <kbd>a</kbd>: add the current page to your bookmarks
|
|
||||||
|
|
||||||
See the [console commands](#console-commands) section for a more detailed description.
|
|
||||||
|
|
||||||
#### Tabs
|
|
||||||
|
|
||||||
- <kbd>d</kbd>: delete the current tab and select the tab to its right
|
|
||||||
- <kbd>D</kbd>: delete the current tab and select the tab to its left
|
|
||||||
- <kbd>!</kbd><kbd>d</kbd>: delete a pinned tab
|
|
||||||
- <kbd>u</kbd>: reopen a close tab
|
|
||||||
- <kbd>r</kbd>: reload the current tab
|
|
||||||
- <kbd>R</kbd>: reload the current tab, bypassing the cache
|
|
||||||
- <kbd>K</kbd> or <kbd>g</kbd><kbd>T</kbd>: select the previous tab
|
|
||||||
- <kbd>J</kbd> or <kbd>g</kbd><kbd>t</kbd>: select the next tab
|
|
||||||
- <kbd>g</kbd><kbd>0</kbd>: select the first tab
|
|
||||||
- <kbd>g</kbd><kbd>$</kbd>: select the last tab
|
|
||||||
- <kbd>Ctrl</kbd>+<kbd>6</kbd>: open the previously-selected tab
|
|
||||||
- <kbd>z</kbd><kbd>p</kbd>: pin the curent tab tab
|
|
||||||
- <kbd>z</kbd><kbd>d</kbd>: duplicate the current tab
|
|
||||||
|
|
||||||
#### Scrolling
|
|
||||||
|
|
||||||
- <kbd>k</kbd>: scroll up
|
|
||||||
- <kbd>j</kbd>: scroll down
|
|
||||||
- <kbd>h</kbd>: scroll left
|
|
||||||
- <kbd>l</kbd>: scroll right
|
|
||||||
- <kbd>Ctrl</kbd>+<kbd>U</kbd>: scroll up half a page
|
|
||||||
- <kbd>Ctrl</kbd>+<kbd>D</kbd>: scroll down half a page
|
|
||||||
- <kbd>Ctrl</kbd>+<kbd>B</kbd>: scroll up a page
|
|
||||||
- <kbd>Ctrl</kbd>+<kbd>F</kbd>: scroll down a page
|
|
||||||
- <kbd>g</kbd><kbd>g</kbd>: scroll to the top of a page
|
|
||||||
- <kbd>G</kbd>: scroll to the bottom of a page
|
|
||||||
- <kbd>0</kbd>: scroll to the leftmost part of a page
|
|
||||||
- <kbd>$</kbd>: scroll to the rightmost part of a page
|
|
||||||
- <kbd>m</kbd>: set a mark for the current position
|
|
||||||
- <kbd>'</kbd>: jump to a marked position
|
|
||||||
|
|
||||||
Lowercase marks (`[a-z]`) store the position of the current tab. Uppercase and
|
|
||||||
numeric marks (`[A-Z0-9]`) store the position and the tab.
|
|
||||||
|
|
||||||
#### Zoom
|
|
||||||
|
|
||||||
- <kbd>z</kbd><kbd>i</kbd>: zoom in
|
|
||||||
- <kbd>z</kbd><kbd>o</kbd>: zoom out
|
|
||||||
- <kbd>z</kbd><kbd>z</kbd>: zoom neutral (reset)
|
|
||||||
|
|
||||||
#### Navigation
|
|
||||||
|
|
||||||
- <kbd>f</kbd>: follow links in the page in the current tab
|
|
||||||
- <kbd>F</kbd>: follow links in the page in a new tab
|
|
||||||
- <kbd>H</kbd>: go back in history
|
|
||||||
- <kbd>L</kbd>: go forward in history
|
|
||||||
- <kbd>[</kbd><kbd>[</kbd>, <kbd>]</kbd><kbd>]</kbd>: find a link to the previous/next page and open it
|
|
||||||
- <kbd>g</kbd><kbd>u</kbd>: go to the parent directory
|
|
||||||
- <kbd>g</kbd><kbd>U</kbd>: go to the root directory
|
|
||||||
- <kbd>g</kbd><kbd>i</kbd>: focus the first input field
|
|
||||||
|
|
||||||
Vim Vixen can be configured to follow links opened in tabs in the background
|
|
||||||
instead of switching to a new tab immediately. To do this, you'll need to update
|
|
||||||
the config file: change the `"background"` property of the `"follow.start"`
|
|
||||||
action to `true`, e.g.:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"keymaps": {
|
|
||||||
"F": { "type": "follow.start", "newTab": true, "background": true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Misc
|
|
||||||
|
|
||||||
- <kbd>y</kbd>: copy the URL of the current tab to the clipboard
|
|
||||||
- <kbd>p</kbd>: open the clipboard's URL in the current tab
|
|
||||||
- <kbd>P</kbd>: open the clipboard's URL in new tab
|
|
||||||
- <kbd>Shift</kbd>+<kbd>Esc</kbd>: enable or disable the add-on in the current tab
|
|
||||||
- <kbd>/</kbd>: start searching for text in the page
|
|
||||||
- <kbd>n</kbd>: find the next search result in the page
|
|
||||||
- <kbd>N</kbd>: find the previous search result in the page
|
|
||||||
- <kbd>g</kbd><kbd>f</kbd>: view the source of the current tab
|
|
||||||
|
|
||||||
### Console commands
|
|
||||||
|
|
||||||
Vim Vixen provides a console for `ex`-style commands, similar to Vimperator.
|
|
||||||
|
|
||||||
Open the console with <kbd>:</kbd>. Or populate it with initial values using
|
|
||||||
<kbd>o</kbd>/<kbd>O</kbd>, <kbd>t</kbd>/<kbd>T</kbd>, or
|
|
||||||
<kbd>w</kbd>/<kbd>W</kbd>.
|
|
||||||
|
|
||||||
#### `:open`
|
|
||||||
|
|
||||||
The `:open` command operates two different ways, depending on the parameter.
|
|
||||||
When the parameter is a URL, it's opened in the current tab.
|
|
||||||
|
|
||||||
```
|
|
||||||
:open http://github.com/ueokande
|
|
||||||
```
|
|
||||||
|
|
||||||
Otherwise, the current tab opens a search page with the supplied string (defaults to Google).
|
|
||||||
|
|
||||||
```
|
|
||||||
:open How to contribute to Vim-Vixen
|
|
||||||
```
|
|
||||||
|
|
||||||
To use a search engine other than the default, specify the search engine to use as the first parameter.
|
|
||||||
|
|
||||||
```
|
|
||||||
:open yahoo How to contribute to Vim-Vixen
|
|
||||||
```
|
|
||||||
|
|
||||||
To adjust the default search-engine and add/remove search engines, see the [search engines](#search-engines) section.
|
|
||||||
|
|
||||||
#### `:tabopen`
|
|
||||||
|
|
||||||
Open a URL or search-engine query in a new tab.
|
|
||||||
|
|
||||||
#### `:quit` or `:q`
|
|
||||||
|
|
||||||
Close the current tab.
|
|
||||||
|
|
||||||
#### `:quitall` or `:qa`
|
|
||||||
|
|
||||||
Close all tabs.
|
|
||||||
|
|
||||||
#### `:bdelete`
|
|
||||||
|
|
||||||
Close a certain tab.
|
|
||||||
|
|
||||||
You can add `!` to the end of the command to close a tab even if it is pinned:
|
|
||||||
|
|
||||||
```
|
|
||||||
:bdelete!
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `:bdeletes`
|
|
||||||
|
|
||||||
Close tabs matching the specified keywords.
|
|
||||||
|
|
||||||
You can add `!` to the end of the command to close pinned tabs:
|
|
||||||
|
|
||||||
```
|
|
||||||
:bdeletes!
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `:winopen`
|
|
||||||
|
|
||||||
Open a URL or search-engine query in a new window.
|
|
||||||
|
|
||||||
#### `:buffer`
|
|
||||||
|
|
||||||
Select tabs by URL or title keywords.
|
|
||||||
|
|
||||||
#### `:addbookmark`
|
|
||||||
|
|
||||||
Create a bookmark from the current URL.
|
|
||||||
|
|
||||||
```
|
|
||||||
:addbookmark My bookmark title
|
|
||||||
```
|
|
||||||
|
|
||||||
The keymap <kbd>a</kbd> is a convenient way to create a bookmark for the
|
|
||||||
current page. It populates the console with `:addbookmark` and the title of
|
|
||||||
the current page.
|
|
||||||
|
|
||||||
#### `:set`
|
|
||||||
|
|
||||||
The `:set` command can be used to temporarily override properties in the
|
|
||||||
console. See the [properties](#properties) section for more details on
|
|
||||||
the available properties.
|
|
||||||
|
|
||||||
### Properties
|
|
||||||
|
|
||||||
Vim Vixen can be configured by defining settings in a JSON document, e.g.:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"properties": {
|
|
||||||
"complete": "sbh"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Properties can be temporarily overridden by using the `:set` command in the
|
|
||||||
console.
|
|
||||||
|
|
||||||
The following properties are available:
|
|
||||||
|
|
||||||
#### `smoothscroll`
|
|
||||||
|
|
||||||
Enable/disable smooth scrolling.
|
|
||||||
|
|
||||||
```
|
|
||||||
:set smoothscroll " enable smooth scrolling
|
|
||||||
:set nosmoothscroll " disable smooth scrolling
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hintchars`
|
|
||||||
|
|
||||||
Set hint characters.
|
|
||||||
|
|
||||||
```
|
|
||||||
:set hintchars=0123456789
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `complete`
|
|
||||||
|
|
||||||
Set completion items on `open`, `tabopen`, and `winopen` commands.
|
|
||||||
The allowed value is character sequence of `s`, `b`, or `h`.
|
|
||||||
Hit <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> to select an item from the completion list.
|
|
||||||
Each character represents the following:
|
|
||||||
|
|
||||||
- `s`: search engines
|
|
||||||
- `b`: bookmark items
|
|
||||||
- `h`: history items.
|
|
||||||
|
|
||||||
```
|
|
||||||
:set complete=sbh
|
|
||||||
```
|
|
||||||
|
|
||||||
### Search engines
|
|
||||||
|
|
||||||
Vim Vixen supports searching with search engines such as Google and Yahoo.
|
|
||||||
|
|
||||||
You can configure search engines, including the default search engine, in the add-on's preferences.
|
|
||||||
The URLs specified in `"engines"` must contain a `{}`-placeholder, which will be
|
|
||||||
replaced with the search keyword parameters of the command.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"search": {
|
|
||||||
"default": "google",
|
|
||||||
"engines": {
|
|
||||||
"google": "https://google.com/search?q={}",
|
|
||||||
"yahoo": "https://search.yahoo.com/search?p={}",
|
|
||||||
"bing": "https://www.bing.com/search?q={}",
|
|
||||||
"duckduckgo": "https://duckduckgo.com/?q={}",
|
|
||||||
"twitter": "https://twitter.com/search?q={}",
|
|
||||||
"wikipedia": "https://en.wikipedia.org/w/index.php?search={}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Blacklist
|
|
||||||
|
|
||||||
The blacklist allows you to disable the plugin for certain pages by URL patterns.
|
|
||||||
For instance, you could use `"*.slack.com"` to disable the plugin on all Slack channels.
|
|
||||||
In addition, you can also specify path patterns, such as `"example.com/mail/*"`.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"blacklist": [
|
|
||||||
"*.slack.com",
|
|
||||||
"example.com/mail/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can toggle Vim Vixen between disabled and enabled with
|
|
||||||
<kbd>shift</kbd>+<kbd>Esc</kbd>.
|
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
|
@ -296,3 +25,6 @@ Copyright © 2017-2019 by Shin'ya Ueoka
|
||||||
## Licence
|
## Licence
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
|
[AMO]: https://addons.mozilla.org/en-US/firefox/addon/vim-vixen/
|
||||||
|
[documentations]: https://ueokande.github.io/vim-vixen/
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
theme: jekyll-theme-slate
|
|
46
docs/_layouts/default.html
Normal file
46
docs/_layouts/default.html
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ site.lang | default: "en-US" }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset='utf-8'>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,maximum-scale=2">
|
||||||
|
<link rel="stylesheet" type="text/css" media="screen" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Zilla+Slab:700&display=swap" rel="stylesheet">
|
||||||
|
{%- if page.title -%}
|
||||||
|
<title>{{ page.title }} - Vim Vixen</title>
|
||||||
|
{%- else -%}
|
||||||
|
<title>Vim Vixen</title>
|
||||||
|
{%- endif -%}
|
||||||
|
{% seo title=false%}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1><a href='index.html'>Vim Vixen</a></h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" rel="noopener" href='https://github.com/ueokande/vim-vixen'>GtiHub</a></li>
|
||||||
|
<li><a target="_blank" rel="noopener" href='https://addons.mozilla.org/firefox/addon/vim-vixen/'>Firefox Add-ons</a></li>
|
||||||
|
</ul>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<aside>
|
||||||
|
<h1>Guide</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href='./keymaps.html'>Keymaps</a></li>
|
||||||
|
<li><a href='./console_commands.html'>Console commands</a></li>
|
||||||
|
<li><a href='./blacklist.html'>Blacklist</a></li>
|
||||||
|
<li><a href='./search_engines.html'>Search engines</a></li>
|
||||||
|
<li><a href='./properties.html'>Properties</a></li>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<article>
|
||||||
|
{{ content }}
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
167
docs/assets/css/style.scss
Normal file
167
docs/assets/css/style.scss
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
---
|
||||||
|
---
|
||||||
|
|
||||||
|
$link-color: #0099ff;
|
||||||
|
$border-color: #dedede;
|
||||||
|
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: #222;
|
||||||
|
font-family: 'Open Sans',Arial,Helvetica,sans-serif;
|
||||||
|
line-height: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
&:link, &:active {
|
||||||
|
color: $link-color;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
&:hover, &:visited {
|
||||||
|
color: $link-color;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5 {
|
||||||
|
font-family: 'Zilla Slab','Open Sans',X-LocaleSpecific,sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #222;
|
||||||
|
|
||||||
|
a:link, a:visited, a:hover, a:active {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid $border-color;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
background-color: white;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
padding: 0 1.5rem;
|
||||||
|
float: left;
|
||||||
|
line-height: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
padding: 0 1rem;
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 1rem;
|
||||||
|
a {
|
||||||
|
line-height: 4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
width: 15rem;
|
||||||
|
position: fixed;
|
||||||
|
top: 4rem;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-right: 1px solid $border-color;
|
||||||
|
padding: 1rem 0;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
line-height: 2.5;
|
||||||
|
padding: 0 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
li {
|
||||||
|
a {
|
||||||
|
padding: .35rem 1.5rem .35rem 1.5rem;
|
||||||
|
line-height: 2.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
padding: 4rem 4rem 4rem 20rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
article {
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5 {
|
||||||
|
font-family: 'Zilla Slab','Open Sans',X-LocaleSpecific,sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
line-height: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
border-top: 1px dotted #c1c5c8;
|
||||||
|
font-size: 1.8;
|
||||||
|
margin-top: 36px;
|
||||||
|
padding-top: 36px;
|
||||||
|
font-family: 'Zilla Slab','Open Sans',X-LocaleSpecific,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 3px 5px;
|
||||||
|
line-height: 10px;
|
||||||
|
color: #444d56;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: #fafbfc;
|
||||||
|
border: 1px solid #c6cbd1;
|
||||||
|
border-bottom-color: rgb(198, 203, 209);
|
||||||
|
border-bottom-color: #959da5;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: inset 0 -1px 0 #959da5;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 16px;
|
||||||
|
overflow: auto;
|
||||||
|
line-height: 1.45;
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre > code {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: .2em .4em;
|
||||||
|
margin: 0;
|
||||||
|
background-color: rgba(27,31,35,.05);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
li {
|
||||||
|
padding: .25rem 0;
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: lightgreen;
|
||||||
|
}
|
21
docs/blacklist.md
Normal file
21
docs/blacklist.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
title: Blacklist
|
||||||
|
---
|
||||||
|
|
||||||
|
# Blacklist
|
||||||
|
|
||||||
|
The blacklist allows you to disable the plugin for certain pages by URL patterns.
|
||||||
|
For instance, you could use `"*.slack.com"` to disable the plugin on all Slack channels.
|
||||||
|
In addition, you can also specify path patterns, such as `"example.com/mail/*"`.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"blacklist": [
|
||||||
|
"*.slack.com",
|
||||||
|
"example.com/mail/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can toggle Vim Vixen between disabled and enabled with
|
||||||
|
<kbd>shift</kbd>+<kbd>Esc</kbd>.
|
92
docs/console_commands.md
Normal file
92
docs/console_commands.md
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
---
|
||||||
|
title: Console commands
|
||||||
|
---
|
||||||
|
|
||||||
|
# Console commands
|
||||||
|
|
||||||
|
Vim Vixen provides a console for `ex`-style commands, similar to Vimperator.
|
||||||
|
|
||||||
|
Open the console with <kbd>:</kbd>. Or populate it with initial values using
|
||||||
|
<kbd>o</kbd>/<kbd>O</kbd>, <kbd>t</kbd>/<kbd>T</kbd>, or
|
||||||
|
<kbd>w</kbd>/<kbd>W</kbd>.
|
||||||
|
|
||||||
|
## `:open`
|
||||||
|
|
||||||
|
The `:open` command operates two different ways, depending on the parameter.
|
||||||
|
When the parameter is a URL, it's opened in the current tab.
|
||||||
|
|
||||||
|
```
|
||||||
|
:open http://github.com/ueokande
|
||||||
|
```
|
||||||
|
|
||||||
|
Otherwise, the current tab opens a search page with the supplied string (defaults to Google).
|
||||||
|
|
||||||
|
```
|
||||||
|
:open How to contribute to Vim-Vixen
|
||||||
|
```
|
||||||
|
|
||||||
|
To use a search engine other than the default, specify the search engine to use as the first parameter.
|
||||||
|
|
||||||
|
```
|
||||||
|
:open yahoo How to contribute to Vim-Vixen
|
||||||
|
```
|
||||||
|
|
||||||
|
To adjust the default search-engine and add/remove search engines, see the [search engines](./search_engines.html) section.
|
||||||
|
|
||||||
|
## `:tabopen`
|
||||||
|
|
||||||
|
Open a URL or search-engine query in a new tab.
|
||||||
|
|
||||||
|
## `:quit` or `:q`
|
||||||
|
|
||||||
|
Close the current tab.
|
||||||
|
|
||||||
|
## `:quitall` or `:qa`
|
||||||
|
|
||||||
|
Close all tabs.
|
||||||
|
|
||||||
|
## `:bdelete`
|
||||||
|
|
||||||
|
Close a certain tab.
|
||||||
|
|
||||||
|
You can add `!` to the end of the command to close a tab even if it is pinned:
|
||||||
|
|
||||||
|
```
|
||||||
|
:bdelete!
|
||||||
|
```
|
||||||
|
|
||||||
|
## `:bdeletes`
|
||||||
|
|
||||||
|
Close tabs matching the specified keywords.
|
||||||
|
|
||||||
|
You can add `!` to the end of the command to close pinned tabs:
|
||||||
|
|
||||||
|
```
|
||||||
|
:bdeletes!
|
||||||
|
```
|
||||||
|
|
||||||
|
## `:winopen`
|
||||||
|
|
||||||
|
Open a URL or search-engine query in a new window.
|
||||||
|
|
||||||
|
## `:buffer`
|
||||||
|
|
||||||
|
Select tabs by URL or title keywords.
|
||||||
|
|
||||||
|
## `:addbookmark`
|
||||||
|
|
||||||
|
Create a bookmark from the current URL.
|
||||||
|
|
||||||
|
```
|
||||||
|
:addbookmark My bookmark title
|
||||||
|
```
|
||||||
|
|
||||||
|
The keymap <kbd>a</kbd> is a convenient way to create a bookmark for the
|
||||||
|
current page. It populates the console with `:addbookmark` and the title of
|
||||||
|
the current page.
|
||||||
|
|
||||||
|
## `:set`
|
||||||
|
|
||||||
|
The `:set` command can be used to temporarily override properties in the
|
||||||
|
console. See the [properties](./properties.html) section for more details on
|
||||||
|
the available properties.
|
|
@ -1,6 +1,60 @@
|
||||||
|
---
|
||||||
|
title: Vim Vixen
|
||||||
|
---
|
||||||
|
|
||||||
# Vim Vixen
|
# Vim Vixen
|
||||||
|
|
||||||
Vim Vixen is a Firefox add-on which allows you to easily navigate the web by
|
Vim Vixen is a Firefox add-on which allows you to easily navigate the web by
|
||||||
keyboard. Since version 57, Firefox has migrated to the WebExtensions API and
|
keyboard. Since version 57, Firefox has migrated to the WebExtensions API and
|
||||||
has dropped support for legacy add-ons. Vim Vixen is a new choice for Vim users
|
has dropped support for legacy add-ons. Vim Vixen is a new choice for Vim users
|
||||||
since it uses the WebExtensions API.
|
since it uses the WebExtensions API.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
### Install Vim Vixen
|
||||||
|
|
||||||
|
Vim Vixen is supported on Firefox 60 ESR. Please latest version of stable ESR
|
||||||
|
from the [download page](https://www.mozilla.org/en-US/firefox/).
|
||||||
|
You can install Vim Vixen from [Firefox add-ons (addons.mozilla.org)][AMO], and
|
||||||
|
manage installed addon-ons on Firefox preferences `about:preferences`.
|
||||||
|
|
||||||
|
### Quick start
|
||||||
|
|
||||||
|
After installation, you can control Firefox with vim-like keymaps. To scroll a
|
||||||
|
page in the browser, press <kbd>k</kbd>, <kbd>j</kbd>, <kbd>h</kbd> and
|
||||||
|
<kbd>l</kbd> keys. You can scroll to the top or the bottom of a page by
|
||||||
|
<kbd>g</kbd><kbd>g</kbd> and <kbd>G</kbd>.
|
||||||
|
|
||||||
|
To select a left and right of current tab, use <kbd>K</kbd> and <kbd>J</kbd>
|
||||||
|
respectively. To close current tab, use <kbd>d</kbd> and to restore closed
|
||||||
|
tabs, use <kbd>u</kbd>.
|
||||||
|
|
||||||
|
To open a link, press <kbd>f</kbd> to enter the **follow mode** to select a
|
||||||
|
link. Then you can select links by alphabetic keys.
|
||||||
|
|
||||||
|
See also [Keymaps](./keymaps.html) for more detailed of keymaps.
|
||||||
|
|
||||||
|
### Using commands
|
||||||
|
|
||||||
|
Vim Vixen supports command line to run commands that control tabs and opens a
|
||||||
|
tab. To open command line, press <kbd>:</kbd>.
|
||||||
|
|
||||||
|
To open a tab with URL, use `open` command as the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
:open https://github.com/ueokande/vimvixen
|
||||||
|
```
|
||||||
|
|
||||||
|
or search keywords with search engine (such as Google) like:
|
||||||
|
|
||||||
|
```
|
||||||
|
:open How to use Vim
|
||||||
|
```
|
||||||
|
|
||||||
|
You can see completed commands on [Console commands](./console_commands.html).
|
||||||
|
|
||||||
|
## Copyright
|
||||||
|
|
||||||
|
Copyright © 2017-2019 by Shin'ya Ueoka
|
||||||
|
|
||||||
|
[AMO]: https://addons.mozilla.org/en-US/firefox/addon/vim-vixen/
|
||||||
|
|
97
docs/keymaps.md
Normal file
97
docs/keymaps.md
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
---
|
||||||
|
title: Keymaps
|
||||||
|
---
|
||||||
|
|
||||||
|
# Keymaps
|
||||||
|
|
||||||
|
Keymaps are configurable in the add-on's preferences by navigating to `about:addons` and selecting "Extensions".
|
||||||
|
The default mappings are as follows:
|
||||||
|
|
||||||
|
## Scrolling
|
||||||
|
|
||||||
|
- <kbd>k</kbd>: scroll up
|
||||||
|
- <kbd>j</kbd>: scroll down
|
||||||
|
- <kbd>h</kbd>: scroll left
|
||||||
|
- <kbd>l</kbd>: scroll right
|
||||||
|
- <kbd>Ctrl</kbd>+<kbd>U</kbd>: scroll up half a page
|
||||||
|
- <kbd>Ctrl</kbd>+<kbd>D</kbd>: scroll down half a page
|
||||||
|
- <kbd>Ctrl</kbd>+<kbd>B</kbd>: scroll up a page
|
||||||
|
- <kbd>Ctrl</kbd>+<kbd>F</kbd>: scroll down a page
|
||||||
|
- <kbd>g</kbd><kbd>g</kbd>: scroll to the top of a page
|
||||||
|
- <kbd>G</kbd>: scroll to the bottom of a page
|
||||||
|
- <kbd>0</kbd>: scroll to the leftmost part of a page
|
||||||
|
- <kbd>$</kbd>: scroll to the rightmost part of a page
|
||||||
|
- <kbd>m</kbd>: set a mark for the current position
|
||||||
|
- <kbd>'</kbd>: jump to a marked position
|
||||||
|
|
||||||
|
Lowercase marks (`[a-z]`) store the position of the current tab. Uppercase and
|
||||||
|
numeric marks (`[A-Z0-9]`) store the position and the tab.
|
||||||
|
|
||||||
|
## Select and manage tabs
|
||||||
|
|
||||||
|
- <kbd>d</kbd>: delete the current tab and select the tab to its right
|
||||||
|
- <kbd>D</kbd>: delete the current tab and select the tab to its left
|
||||||
|
- <kbd>!</kbd><kbd>d</kbd>: delete a pinned tab
|
||||||
|
- <kbd>u</kbd>: reopen a close tab
|
||||||
|
- <kbd>r</kbd>: reload the current tab
|
||||||
|
- <kbd>R</kbd>: reload the current tab, bypassing the cache
|
||||||
|
- <kbd>K</kbd> or <kbd>g</kbd><kbd>T</kbd>: select the previous tab
|
||||||
|
- <kbd>J</kbd> or <kbd>g</kbd><kbd>t</kbd>: select the next tab
|
||||||
|
- <kbd>g</kbd><kbd>0</kbd>: select the first tab
|
||||||
|
- <kbd>g</kbd><kbd>$</kbd>: select the last tab
|
||||||
|
- <kbd>Ctrl</kbd>+<kbd>6</kbd>: open the previously-selected tab
|
||||||
|
- <kbd>z</kbd><kbd>p</kbd>: pin the curent tab tab
|
||||||
|
- <kbd>z</kbd><kbd>d</kbd>: duplicate the current tab
|
||||||
|
|
||||||
|
## Console
|
||||||
|
|
||||||
|
- <kbd>:</kbd>: open the console
|
||||||
|
- <kbd>o</kbd>, <kbd>t</kbd>, <kbd>w</kbd>: open a page in the current tab, a new tab, or new window
|
||||||
|
- <kbd>O</kbd>, <kbd>T</kbd>, <kbd>W</kbd>: similar to <kbd>o</kbd>, <kbd>t</kbd>, <kbd>w</kbd>, but using the current URL
|
||||||
|
- <kbd>b</kbd>: select tabs by URL or title
|
||||||
|
- <kbd>a</kbd>: add the current page to your bookmarks
|
||||||
|
|
||||||
|
See the [console commands](./console_commands.html) section for a more detailed description.
|
||||||
|
|
||||||
|
## Zoom
|
||||||
|
|
||||||
|
- <kbd>z</kbd><kbd>i</kbd>: zoom in
|
||||||
|
- <kbd>z</kbd><kbd>o</kbd>: zoom out
|
||||||
|
- <kbd>z</kbd><kbd>z</kbd>: zoom neutral (reset)
|
||||||
|
|
||||||
|
## Navigation
|
||||||
|
|
||||||
|
- <kbd>f</kbd>: follow links in the page in the current tab
|
||||||
|
- <kbd>F</kbd>: follow links in the page in a new tab
|
||||||
|
- <kbd>H</kbd>: go back in history
|
||||||
|
- <kbd>L</kbd>: go forward in history
|
||||||
|
- <kbd>[</kbd><kbd>[</kbd>, <kbd>]</kbd><kbd>]</kbd>: find a link to the previous/next page and open it
|
||||||
|
- <kbd>g</kbd><kbd>u</kbd>: go to the parent directory
|
||||||
|
- <kbd>g</kbd><kbd>U</kbd>: go to the root directory
|
||||||
|
- <kbd>g</kbd><kbd>i</kbd>: focus the first input field
|
||||||
|
|
||||||
|
Vim Vixen can be configured to follow links opened in tabs in the background
|
||||||
|
instead of switching to a new tab immediately. To do this, you'll need to update
|
||||||
|
the config file: change the `"background"` property of the `"follow.start"`
|
||||||
|
action to `true`, e.g.:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"keymaps": {
|
||||||
|
"F": { "type": "follow.start", "newTab": true, "background": true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
|
||||||
|
- <kbd>y</kbd>: copy the URL of the current tab to the clipboard
|
||||||
|
- <kbd>p</kbd>: open the clipboard's URL in the current tab
|
||||||
|
- <kbd>P</kbd>: open the clipboard's URL in new tab
|
||||||
|
- <kbd>Shift</kbd>+<kbd>Esc</kbd>: enable or disable the add-on in the current tab
|
||||||
|
- <kbd>/</kbd>: start searching for text in the page
|
||||||
|
- <kbd>n</kbd>: find the next search result in the page
|
||||||
|
- <kbd>N</kbd>: find the previous search result in the page
|
||||||
|
- <kbd>g</kbd><kbd>f</kbd>: view the source of the current tab
|
||||||
|
|
||||||
|
|
52
docs/properties.md
Normal file
52
docs/properties.md
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
---
|
||||||
|
title: Properties
|
||||||
|
---
|
||||||
|
|
||||||
|
# Properties
|
||||||
|
|
||||||
|
Vim Vixen can be configured by defining settings in a JSON document, e.g.:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"complete": "sbh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Properties can be temporarily overridden by using the `:set` command in the
|
||||||
|
console.
|
||||||
|
|
||||||
|
The following properties are available:
|
||||||
|
|
||||||
|
## `smoothscroll`
|
||||||
|
|
||||||
|
Enable/disable smooth scrolling.
|
||||||
|
|
||||||
|
```
|
||||||
|
:set smoothscroll " enable smooth scrolling
|
||||||
|
:set nosmoothscroll " disable smooth scrolling
|
||||||
|
```
|
||||||
|
|
||||||
|
## `hintchars`
|
||||||
|
|
||||||
|
Set hint characters.
|
||||||
|
|
||||||
|
```
|
||||||
|
:set hintchars=0123456789
|
||||||
|
```
|
||||||
|
|
||||||
|
## `complete`
|
||||||
|
|
||||||
|
Set completion items on `open`, `tabopen`, and `winopen` commands.
|
||||||
|
The allowed value is character sequence of `s`, `b`, or `h`.
|
||||||
|
Hit <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> to select an item from the completion list.
|
||||||
|
Each character represents the following:
|
||||||
|
|
||||||
|
- `s`: search engines
|
||||||
|
- `b`: bookmark items
|
||||||
|
- `h`: history items.
|
||||||
|
|
||||||
|
```
|
||||||
|
:set complete=sbh
|
||||||
|
```
|
27
docs/search_engines.md
Normal file
27
docs/search_engines.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
title: Search engines
|
||||||
|
---
|
||||||
|
|
||||||
|
# Search engines
|
||||||
|
|
||||||
|
Vim Vixen supports searching with search engines such as Google and Yahoo.
|
||||||
|
|
||||||
|
You can configure search engines, including the default search engine, in the add-on's preferences.
|
||||||
|
The URLs specified in `"engines"` must contain a `{}`-placeholder, which will be
|
||||||
|
replaced with the search keyword parameters of the command.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"search": {
|
||||||
|
"default": "google",
|
||||||
|
"engines": {
|
||||||
|
"google": "https://google.com/search?q={}",
|
||||||
|
"yahoo": "https://search.yahoo.com/search?p={}",
|
||||||
|
"bing": "https://www.bing.com/search?q={}",
|
||||||
|
"duckduckgo": "https://duckduckgo.com/?q={}",
|
||||||
|
"twitter": "https://twitter.com/search?q={}",
|
||||||
|
"wikipedia": "https://en.wikipedia.org/w/index.php?search={}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
Reference in a new issue