diff --git a/docs/blacklist.md b/docs/blacklist.md new file mode 100644 index 0000000..b854c07 --- /dev/null +++ b/docs/blacklist.md @@ -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 +shift+Esc. diff --git a/docs/console_commands.md b/docs/console_commands.md new file mode 100644 index 0000000..272ea0e --- /dev/null +++ b/docs/console_commands.md @@ -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 :. Or populate it with initial values using +o/O, t/T, or +w/W. + +## `: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 a 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. diff --git a/docs/index.md b/docs/index.md index 335f668..ad7c911 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,15 @@ +--- +title: Vim Vixen +--- + # Vim Vixen 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 has dropped support for legacy add-ons. Vim Vixen is a new choice for Vim users since it uses the WebExtensions API. + +## Related links + +- [Vim Vixen - GitHub](https://github.com/ueokande/vim-vixen) +- [Vim Vixen - Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/vim-vixen/) diff --git a/docs/keymaps.md b/docs/keymaps.md new file mode 100644 index 0000000..8952392 --- /dev/null +++ b/docs/keymaps.md @@ -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: + +## Console + +- :: open the console +- o, t, w: open a page in the current tab, a new tab, or new window +- O, T, W: similar to o, t, w, but using the current URL +- b: select tabs by URL or title +- a: add the current page to your bookmarks + +See the [console commands](./console_commands.html) section for a more detailed description. + +## Tabs + +- d: delete the current tab and select the tab to its right +- D: delete the current tab and select the tab to its left +- !d: delete a pinned tab +- u: reopen a close tab +- r: reload the current tab +- R: reload the current tab, bypassing the cache +- K or gT: select the previous tab +- J or gt: select the next tab +- g0: select the first tab +- g$: select the last tab +- Ctrl+6: open the previously-selected tab +- zp: pin the curent tab tab +- zd: duplicate the current tab + +## Scrolling + +- k: scroll up +- j: scroll down +- h: scroll left +- l: scroll right +- Ctrl+U: scroll up half a page +- Ctrl+D: scroll down half a page +- Ctrl+B: scroll up a page +- Ctrl+F: scroll down a page +- gg: scroll to the top of a page +- G: scroll to the bottom of a page +- 0: scroll to the leftmost part of a page +- $: scroll to the rightmost part of a page +- m: set a mark for the current position +- ': 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 + +- zi: zoom in +- zo: zoom out +- zz: zoom neutral (reset) + +## Navigation + +- f: follow links in the page in the current tab +- F: follow links in the page in a new tab +- H: go back in history +- L: go forward in history +- [[, ]]: find a link to the previous/next page and open it +- gu: go to the parent directory +- gU: go to the root directory +- gi: 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 + +- y: copy the URL of the current tab to the clipboard +- p: open the clipboard's URL in the current tab +- P: open the clipboard's URL in new tab +- Shift+Esc: enable or disable the add-on in the current tab +- /: start searching for text in the page +- n: find the next search result in the page +- N: find the previous search result in the page +- gf: view the source of the current tab + + diff --git a/docs/properties.md b/docs/properties.md new file mode 100644 index 0000000..1f62ff4 --- /dev/null +++ b/docs/properties.md @@ -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 Tab or Shift+Tab 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 +``` diff --git a/docs/search_engines.md b/docs/search_engines.md new file mode 100644 index 0000000..9436bf2 --- /dev/null +++ b/docs/search_engines.md @@ -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={}" + } + } +} +```