Next is the next generation browsing experience designed for power users. 100% of the functions and classes are exposed to the end-user allowing for infinite customization.
- Advanced Topics
Within a tab, all navigation is possible using only the keyboard. To navigate up and down on a web page, the following keybindings are provided.
C-n: Move down
C-p: Move up
scroll-left: Move left (no keybindings for now)
scroll-right: Move right (no keybindings for now)
M->: Jump to bottom of page
M-<: Jump to top of page
Use the zoom keybindings to make everything on a webpage larger or smaller. These keybindings mimic the Emacs counterpart:
C-x C-=: Increase size
C-x C--: Decrease size
C-x C-0: Restore defaults
Jumping to links (link-hints)
In order to visit a link, one never has to remove their fingers from the keyboard. It works like this:
- Enter in a special key combination
- Several strings will appear on screen "AZ" "CY", these special strings represent links that you can visit
- Enter in one of these strings into the minibuffer
- Visit the page
The full key-bindings for link-hint based navigate are found below:
C-g: Go to link in current tab
M-g: Create new tab with link, focus on new tab
C-u M-g: Create new tab with link, keep focus on current tab
When ambiguous URLs are inputted, Next will attempt the best guess about what the user wishes. If the user does not supply a protocol in a URL,
https will be assumed. To visit a site supporting only
http, the user must explicitly type the full URL with
C-l: Change URL of current document
M-l: New document-mode tab
Searching via search engine
To search via search engine, within the the new URL prompt, simply enter "s your search query". In the previous example, a search engine would query "your search query".
Therefore, the complete steps to searching are
M-l, then, when the prompt appears, enter "s <search terms>".
Jumping to Headings
Jumping to different headings based on fuzzy completion is available via the following keybindings:
C-.: Jump to heading
All input is handled within a special area called the minibuffer. The minibuffer will appear at the bottom of the screen when the user is responsible for inputting some value. The minibuffer may also suggest completions.
Any time a function activates the minibuffer there are two applicable returns:
C-RET: Return Immediate - Return EXACTLY what has been typed into the minibuffer, ignoring completions.
RET: Return Complete - If completion function provided, return the selected completion candidate. If completion not provided return the EXACT text inputted into the minibuffer. If completion function provided, no completion applicable (selected), and the :empty-complete is a truthy value, the function will accept the EXACT text inputted into the minibuffer.
Below is a concrete example that may help clarify the usage of
In the above case
set-url-new-buffer will attempt to be completed by
history-typed-complete. If there are no suitable candidates, e.g. the user is attempting to visit a URL they have never visited before,
:empty-complete t will allow the
return-input to return the literal input to
Tabs are represented by a concept known as "buffers". Buffers are known in other GUIs as Views. Unlike in other GUI systems, the controller for a view can dynamically change. Given a buffer composed of a web-view and a document-mode model, one can dynamically set the controller to any other mode. This enables run-time specialization and modification of widget behavior.
The standard keybindings for tab management (within document-mode) are:
C-x b: Switch tab
C-x k: Kill tab
M-l: New document-mode tab
C-l: Change URL of current document
C-t: Make new empty buffer
Switching Tabs by Order
In addition to switching tabs by selecting the current tab, you can cycle through them. This enables you to jump back and forth between two tabs that are next to each other.
C-[: Switch tab previous
C-]: Switch tab next
There are a number of keybindings provided to enable searching within a buffer.
C-s s: Search for a Given Term: This command will place a red box next to every match on a given web-page.
C-s n: Next match: This command will move the next match to the top of the browser screen.
C-s p: Previous match: This command will move the previous match to the top of the browser screen.
C-s k: Clear Search: Remove the read search boxes from the screen.
History is represented as a tree that you can traverse. More complex than the "forwards-backwards" abstraction found in other browsers, the tree makes sure you never lose track of where you've been.
In the example below, the User performs the following actions:
- Starts page
- Visits page
- Returns to page
- Visits page
- Returns to page
forwardskeybind in history
It is at this point that a normal browser would NOT be able to navigate you forwards to your visit of
Ancient Greek. Instead of erasing your history, Next offers smart navigation and prompts the user. Do you wish to go forwards to
Ancient Greek or to
The standard keybindings for forward-backward navigation are:
C-f: Navigate Forward
C-b: Navigate Backward
M-f: Navigate Forward Tree
M-b: Navigate Backward
By using navigate forward tree you will be prompted for which branch you'd like to visit as in the example above. The simple navigate forward command will simply visit the first child of the current node in the tree.
Bookmarks are located in a database located in
~/.local/share/next/bookmark.db. This directory and database will be created automatically for you. The bookmark database is a SQLITE database that contains one table with two columns: id, url. In order to navigate and manage your bookmarks, a few functions are provided:
C-m k: Delete Bookmark
C-m o: Open Bookmark
C-m s: Bookmark Current Page
C-m u: Bookmark URL (input URL via minibuffer)
C-m g: Bookmark Anchor (input URL via link hints)
To exit Next enter the key-combination
C-x C-c and the program will quit. All of your open tabs and form data will not be persisted. The only information saved will be your filled in passwords, cookies, and other information within your cache.
Execute Extended Command
You can execute any command by name by typing
x. This will bring up a list of candidates that you can fuzzily complete.
The help system allows you to look up variable and function docstrings directly within Next. Docstrings will appear in a new help buffer.
C-h v: Look up a variable docstring
C-h c: Look up a command docstring
Slime with a compiled version of Next
Slime provides a way of interacting with Next, and with Lisp code in general (in a REPL like manner).
From the Slime Manual:
SLIME extends Emacs with support for interactive programming in Common Lisp. The features are centered around slime-mode, an Emacs minor-mode that complements the standard lisp-mode. While lisp-mode supports editing Lisp source files, slime-mode adds support for interacting with a running Common Lisp process for compilation, debugging, documentation lookup, and so on.
To use Slime with a compiled version of Next use the keybinding
s to launch a Swank server. Slime will connect to the Swank server and give you completion, debugging, documentation, etc. The default port for Swank on Next is
4006 to avoid collisions with the default Swank port of
4005 within an Emacs
After launching the Swank server in Next- within Emacs execute:
127.0.0.1for the host
4006for the port (Next variable
To customize the port that Swank starts on, edit the global variable
*swank-port* in your init file.
All customization begins by creating a
~/.config/next/init.lisp file. Within your init file you can write your own keybindings and customizations. If the directory
~/.config/next/ does not already exist, you will have to make it.
The first line of an init file should contain the following package declaration in order to modify Next specific variables and functions:
Following the package declaration, you can write or override any functions and variables.
Keys are defined with the following syntax:
in the previous example, the sequence of keys:
control+x, lift hands off control key,
o would invoke the "function-example". Additionally important to note is that the key sequence
control+x is now registered as a special type keybinding, a prefix. A prefix key can, but should not be mapped. If a subsequent mapping was to bind
control+x, it would be unclear to Next what keybinding invocation the user is trying to type.
The following keys exist as special keys:
S: Super (Windows key, Command Key)
M: Meta (Alt key, Option Key)
To load a file again, or reload an init file use the function load-file. Within the minibuffer prompt enter the full path to the file you wish to load.
C-o: Load File
A convenience function for reloading the init file called
reload-init can also be keybound.
Creating your own interactive commands
Creating your own invokable commands is the same as creating any other
defun except the form is
define-command. A docstring is highly reccommend and will produce a style warning when it is missing.
An example of a trivial command definition can be seen below.
Getting input from the user
Getting input from the user via the minibuffer is an asynchronous command. That is why the
read-from-minibuffer function is wrapped within a continuation passing style macro
with-result. The form therefore takes the following look: