In-App Editing & File Viewing
Editing

Slumber supports editing your collection file without leaving the app. To do so, open the actions menu (x by default), then select Edit Recipe. Slumber will open an external editor to modify the selected recipe. To determine which editor to use, Slumber checks these places in the following order:
editorfield of the configuration fileVISUALenvironment variableEDITORenvironment variable- Default to
vim
The VISUAL and EDITOR environment variables are a common standard to define a user's preferred text editor. For example, it's what git uses by default to determine how to edit commit messages. If you want to use the same editor for all programs, you should set these. If you want to use a command specific to Slumber, set the editor config field.
Slumber supports passing additional arguments to the editor. For example, if you want to open VSCode and have wait for the file to be saved, you can configure your editor like so:
editor: code --wait
The command will be parsed like a shell command (although a shell is never actually invoked). For exact details on parsing behavior, see shell-words.
In order to open the editor to a particular line+column, Slumber uses the editor-command crate. Most editors support the format file:line:column. A few popular editors that don't support that format (vim, emacs, and nano) have custom behavior instead. See the open_at method for more details.
Paging
You can open request and response bodies in a separate file browser if you want additional features beyond what Slumber provides. To configure the command to use, set the PAGER environment variable or the pager configuration field:
pager: bat
Slumber will check these places in the following order for a command:
pagerfield of the configuration filePAGERenvironment variable- Default to
less(Unix) ormore(Windows)
The pager command uses the same format as the
editorfield. The command is parsed with shell-words, then a temporary file path is passed as the final argument.
To open a body in the pager, use the actions menu keybinding (x by default, see input bindings), and select View Body.
Some popular pagers:
Setting a content-specific pager
If you want to use a different pager for certain content types, such as using jless for JSON, you can pass a map of MIME type patterns to commands. For example:
pager:
json: jless
default: less
For more details on matching, see MIME Maps.