-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
TReq is heavily inspired in Vim, each key execute a command. However, a essential concept in TReq is the fact each KEY trigger a ACTION and each Action execute a command based on your current state.
For example, if you press TAB, it triggers the SWITCH
action. In Body section it change between Header and Body view, but in Url section it change the method used in request.
You can see all the Action and Commands they execute in Help Screen, clicking ?
in TReq.
Key | Action |
---|---|
RIGHT/l | Right |
UP/k | Up |
DOWN/j | Down |
LEFT/h | Left |
? | Help |
Enter | Submit |
Tab | Switch |
q | Quit |
n | New |
s | Save |
State | Action | Command |
---|---|---|
Default | Help | Open help screen |
Default | Submit | Make Request |
Default | Quit | Quit TReq |
Default | Save | Save opened Request |
Tab List | Edit | Edit title current tab |
Tab List | Switch | Change current tab |
Tab List | New | Create a empty request |
URL | Switch | Change METHOD |
URL | Edit | Edit URL |
URL | New | Create a empty request |
Request Body/Header | Edit | Open EDITOR to edit content |
Request Body/Header | Switch | Switch between Body/Header |
Response Body/Header | Edit | Open EDITOR to view content |
Response Body/Header | Switch | Switch between Body/Header |
There is also importants additional commands. Those maps triggers actions to only run those commands globally. Therefore, you can say those keymaps trigger those commands directly.
Key | Command |
---|---|
r | Reload content of file used to edit body. |
g v | Open view to edit VARIABLES |
g g | Go to Tab List Section |
g t | Go to next tab |
g T | Go to previous tab |
g l | Resize layout to GROW response view |
g h | Resize layout to GROW request view |
Each key trigger a action which trigger a command. Only to navigate throght content of some doc, help screen for example.
Normally when you trigger Edit
action in Normal mode. A pop-up is open to insert some text. Enter submit what you typed, ESC close and cancel the edition.
Only to navigate throght content of some doc, help screen for example. Only triggered actions are Up
and Down
, ESC and q quit.
To edit simple text like Urls, names of tabs or variables values TReq uses a built-in editor. However, to edit the BODY of requests is required use external text editor.
See how here: How to set up EDITOR used to edit request content