Vimperator

surfing browsing

Vimperator overrides nearly all Firefox keys in order to make browsing more pleasant for Vim users. In the rare occurrences where you want to pass a keystroke to the web page or to Firefox to retain its original meaning you have 2 possibilities:

pass-through <C-z> CTRL-Z

CTRL-Z

Disable all Vimperator keys except <Esc> and pass them to the next event handler. This is especially useful, if JavaScript controlled forms like the RichEdit form fields of Gmail don't work anymore. To exit this mode, press <Esc>. If you also need to pass <Esc> in this mode to the web page, prepend it with CTRL-V.

send-key <C-v> CTRL-V

CTRL-V

If you only need to pass a single key to a JavaScript form field or another extension prefix the key with <C-v>. Also works to unshadow Firefox shortcuts like <C-o> which are otherwise hidden in Vimperator. When Vimperator mode is temporarily disabled with <C-q>, <C-v> will pass the next key to Vimperator instead of the web page.

Opening web pages

opening

o :o :open

:o[pen][!] [arg1], [arg2], …

o

Open one or more URLs in the current tab. Multiple URLs can be separated with 'urlseparator' (default: ", " Note that the space after the comma is required.") Each token is analyzed and in this order:

  1. Opened as a local file if it is an existing relative or absolute filename.

    • :open /etc/fstab shows the file system table.

    • :open ../other/foo.html in your home directory opens /home/other/foo.html

  2. Opened with the specified search engine if the token looks like a search string and the first word is the name of a search engine (:open wikipedia linus torvalds opens the Wikipedia entry for linus torvalds). The short name of a search engine is automatically guessed from its name. If you want to set a custom name, you can change it with :dialog searchengines.

  3. Opened with the default search engine or keyword (specified with the 'defsearch' option) if the first word is no search engine (:open linus torvalds opens a Google search for linux torvalds).

  4. Passed directly to Firefox in all other cases (:open www.osnews.com, www.slashdot.org opens OSNews in the current, and Slashdot in a new background tab).

You can use :open -tags linux torvalds<Tab> to complete bookmarks with tag "linux" and which contain "torvalds". Note that -tags support is only available for tab completion, not for the actual command. The items which are completed on <Tab> are specified in the 'complete' option. Without argument, reloads the current page. Without argument but with [!], reloads the current page skipping the cache.

t :t :tabopen :tabnew :tabe :tabedit

:tabopen[!] [arg1], [arg2], …

t

Just like :open, but opens the resulting web page(s) in a new tab. When used with [!], the 'tabopen' value of the 'activate' option is negated.

T

T

Open one or more URLs in a new tab, based on current location. Works like t, but preselects current URL in the :tabopen query.

:tabd :tabduplicate

:[count]tabd[uplicate][!]

Duplicates current tab [count] times. Uses 'tabopen' value of the 'activate' to determine if last cloned tab should be activated. When used with [!], 'tabopen' value is negated.

O

O

Open one or more URLs in the current tab, based on current location. Works like o, but preselects current URL in the :open query.

:winopen :wopen :winedit

:wino[pen][!] [arg1], [arg2], …

Just like :open, but opens the resulting web page(s) in a new window.

<MiddleMouse> p

p

Open (put) a URL based on the current clipboard contents in the current buffer. You can also just select (for non-X11 users: copy) some non-URL text, and search for it with the default search engine or keyword (specified by the 'defsearch' option) with p.

P

P

Open (put) a URL based on the current clipboard contents in a new buffer. Works like p, but opens a new tab.
Whether the new buffer is activated, depends on the 'activate' option.

gP

gP

Open (put) a URL based on the current clipboard contents in a new buffer. Works like P, but inverts the 'activate' option.

<C-x>

[count]<C-x>

Decrements the last number in URL by 1, or by count if given.

<C-a>

[count]<C-a>

Increments the last number in URL by 1, or by count if given.

~

~

Open home directory. You can also use the hints and have the probably fastest file browser on earth. :)

Navigating

navigating

H <C-o> CTRL-O :ba :back

:[count]ba[ck][!] [url]

CTRL-o

Go [count] pages back in the browser history. The special version :back! goes to the beginning of the browser history.

L <C-i> CTRL-i :fo :fw :forward

:[count]fo[rward][!] [url]

CTRL-i

Go [count] pages forward in the browser history. The special version :forward! goes to the end of the browser history.

:ju :jumps

:ju[mps]

List all jumps aka current tab's history aka session history.

Current history position is marked with >, jump numbers are counters to be used with :back (above zero record) or :forward (below zero record).

gh

gh

Go home. Opens the homepage in the current tab.

gH

gH

Go home in a new tab. Opens the homepage in a new tab. Whether the new tab is activated or not depends on the 'activate' option.

gu

[count]gu

Go to [count]th parent directory.

2gu on http://www.example.com/dir1/dir2/file.htm opens http://www.example.com/dir1/.

gU

gU

Go to the root of the web site.

gU on http://www.example.com/dir1/dir2/file.htm opens http://www.example.com/. When browsing a local directory, it goes to the root directory.

Reloading

reloading

r

r

Force reloading of the current page.

R

R

Force reloading of the current page skipping the cache.

:re :reload

:re[load][!]

Reload current page. Forces reloading of the current page. If [!] is given, skip the cache.

:reloada :reloadall

:reloada[ll][!]

Reload all pages. Forces reloading of all pages. If [!] is given, skip the cache.

Stopping

stopping

<C-c>

<C-c>

Stop loading the current web page.

:st :stop

:st[op]

Stop loading. Stop loading current web page.

Writing

save-file writing

:w :write :sav :saveas

:sav[eas]

Save current web page to disk. Opens the original Firefox "Save page as…" dialog. There, you can save the current web page to disk with various options. Use [!] to save the file with a default filename to the current working directory, skipping the "Save as…" prompt

Quitting

save-session quitting

:q :quit

:q[uit]

Quit current tab. If this is the last tab in the window, close the window. If this was the last window, close Vimperator. When quitting Vimperator, the session is not stored.

:qa :qall :quita :quitall

:quita[ll]

Quit Vimperator. Quit Vimperator, no matter how many tabs/windows are open. The session is not stored.

:wc :wclose :winc :winclose

:winc[lose]

Close window.

:xa :xall :wq :wqa :wqall

:wqa[ll]

:xa[ll]

Save the session and quit. Quit Vimperator, no matter how many tabs/windows are open. The session is stored. :wq is different as in Vim, as it closes the window instead of just one tab by popular demand. Complain on the mailing list, if you want to change that.

ZQ

ZQ

Quit and don't save the session. Works like :qall.

ZZ

ZZ

Quit and save the session. Quit Vimperator, no matter how many tabs/windows are open. The session is stored. Works like :xall.

The current directory

current-directory

:chd :chdir :cd

:cd [-|path]

Change the current directory. :cd - changes to the last directory.

:pw :pwd

:pw[d]

Print the current directory name.