lnav/docs/source/hotkeys.rst

249 lines
6.1 KiB
ReStructuredText
Raw Normal View History

2013-07-14 18:25:04 +00:00
2013-08-26 14:20:01 +00:00
.. _hotkeys:
2013-07-26 03:41:42 +00:00
Hotkey Reference
================
2014-03-28 13:55:24 +00:00
This reference covers the keys used to control **lnav**. Consult the `built-in
help <https://github.com/tstack/lnav/blob/master/src/help.txt>`_ in **lnav** for
a more detailed explanation of each key.
2013-08-26 14:20:01 +00:00
2013-07-26 15:23:45 +00:00
Spatial Navigation
------------------
2013-07-26 03:41:42 +00:00
.. list-table::
:header-rows: 1
2020-05-07 14:08:59 +00:00
:widths: 6 6 6 20
2013-07-26 03:41:42 +00:00
* - Keypress
-
-
- Command
* - :kbd:`Space`
- :kbd:`PgDn`
2013-07-26 03:41:42 +00:00
-
- Down a page
* - :kbd:`b`
- :kbd:`Backspace`
- :kbd:`PgUp`
2013-07-26 03:41:42 +00:00
- Up a page
* - :kbd:`j`
- :kbd:`Return`
- :kbd:`↓`
2013-07-26 03:41:42 +00:00
- Down a line
* - :kbd:`k`
- :kbd:`↑`
2013-07-26 03:41:42 +00:00
-
- Up a line
* - :kbd:`h`
- :kbd:`←`
2013-07-26 03:41:42 +00:00
-
- Left half a page. In the log view, pressing left while at the start of
the message text will reveal the source file name for each line.
Pressing again will reveal the full path.
* - :kbd:`Shift` + :kbd:`h`
- :kbd:`Shift` + :kbd:`←`
-
- Left ten columns
* - :kbd:`l`
- :kbd:`→`
2013-07-26 03:41:42 +00:00
-
- Right half a page
* - :kbd:`Shift` + :kbd:`l`
- :kbd:`Shift` + :kbd:`→`
-
- Right ten columns
* - :kbd:`Home`
- :kbd:`g`
2013-07-26 03:41:42 +00:00
-
- Top of the view
* - :kbd:`End`
- :kbd:`G`
2013-07-26 03:41:42 +00:00
-
- Bottom of the view
* - :kbd:`e`
- :kbd:`Shift` + :kbd:`e`
2013-07-26 03:41:42 +00:00
-
- Next/previous error
* - :kbd:`w`
- :kbd:`Shift` + :kbd:`w`
2013-07-26 03:41:42 +00:00
-
- Next/previous warning
* - :kbd:`n`
- :kbd:`Shift` + :kbd:`n`
2013-07-26 03:41:42 +00:00
-
- Next/previous search hit
* - :kbd:`>`
- :kbd:`<`
2013-07-26 03:41:42 +00:00
-
- Next/previous search hit (horizontal)
* - :kbd:`f`
- :kbd:`Shift` + :kbd:`f`
2013-07-26 03:41:42 +00:00
-
- Next/previous file
* - :kbd:`u`
- :kbd:`Shift` + :kbd:`u`
2013-07-26 15:23:45 +00:00
-
2013-07-26 03:41:42 +00:00
- Next/previous bookmark
* - :kbd:`o`
- :kbd:`Shift` + :kbd:`o`
-
2015-11-25 04:59:24 +00:00
- Forward/backward through log messages with a matching "opid" field
* - :kbd:`y`
- :kbd:`Shift` + :kbd:`y`
2013-07-26 15:23:45 +00:00
-
- Next/previous SQL result
* - :kbd:`s`
- :kbd:`Shift` + :kbd:`s`
2014-03-28 13:55:24 +00:00
-
- Next/previous slow down in the log message rate
* - :kbd:`{`
- :kbd:`}`
-
- Previous/next location in history
2013-07-26 15:23:45 +00:00
Chronological Navigation
------------------------
.. list-table::
:header-rows: 1
:widths: 5 5 20
* - Keypress
-
- Command
* - :kbd:`d`
- :kbd:`Shift` + :kbd:`d`
2013-07-26 15:23:45 +00:00
- Forward/backward 24 hours
* - :kbd:`1` - :kbd:`6`
- :kbd:`Shift` + :kbd:`1` - :kbd:`6`
2013-07-26 15:23:45 +00:00
- Next/previous n'th ten minute of the hour
* - :kbd:`7`
- :kbd:`8`
- Previous/next minute
* - :kbd:`0`
- :kbd:`Shift` + :kbd:`0`
2013-07-26 15:23:45 +00:00
- Next/previous day
* - :kbd:`r`
- :kbd:`Shift` + :kbd:`r`
2015-09-14 15:56:42 +00:00
- Forward/backward by the relative time that was last used with the goto command.
2013-07-26 03:41:42 +00:00
.. _hotkeys_bookmarks:
2013-07-26 03:41:42 +00:00
Bookmarks
---------
.. list-table::
:header-rows: 1
:widths: 5 20
* - Keypress
- Command
* - :kbd:`m`
2013-07-26 03:41:42 +00:00
- Mark/unmark the top line
* - :kbd:`Shift` + :kbd:`m`
2013-07-26 03:41:42 +00:00
- Mark/unmark the range of lines from the last marked to the top
* - :kbd:`Shift` + :kbd:`j`
2013-07-26 03:41:42 +00:00
- Mark/unmark the next line after the previously marked
* - :kbd:`Shift` + :kbd:`k`
2013-07-26 03:41:42 +00:00
- Mark/unmark the previous line
* - :kbd:`c`
2013-07-26 03:41:42 +00:00
- Copy marked lines to the clipboard
* - :kbd:`Shift` + :kbd:`c`
2013-07-26 03:41:42 +00:00
- Clear marked lines
Display
-------
.. list-table::
:header-rows: 1
:widths: 5 20
* - Keypress
- Command
* - :kbd:`?`
2013-07-26 03:41:42 +00:00
- View/leave builtin help
* - :kbd:`q`
2013-07-26 03:41:42 +00:00
- Return to the previous view/quit
* - :kbd:`Shift` + :kbd:`q`
- Return to the previous view/quit while matching the top times of the two views
* - :kbd:`a`
- Restore the view that was previously popped with 'q/Q'
* - :kbd:`Shift` + :kbd:`a`
- Restore the view that was previously popped with 'q/Q' and match the top times of the views
* - :kbd:`Shift` + :kbd:`p`
- Switch to/from the pretty-printed view of the displayed log or text files
* - :kbd:`Shift` + :kbd:`t`
2013-07-26 03:41:42 +00:00
- Display elapsed time between lines
* - :kbd:`t`
2013-07-26 15:23:45 +00:00
- Switch to/from the text file view
* - :kbd:`i`
2013-07-26 15:23:45 +00:00
- Switch to/from the histogram view
* - :kbd:`Shift` + :kbd:`i`
2013-07-26 15:23:45 +00:00
- Switch to/from the histogram view
* - :kbd:`v`
2013-07-26 15:23:45 +00:00
- Switch to/from the SQL result view
* - :kbd:`Shift` + :kbd:`v`
2013-07-26 15:23:45 +00:00
- Switch to/from the SQL result view and move to the corresponding in the
log_line column
* - :kbd:`p`
2013-07-26 15:23:45 +00:00
- Toggle the display of the log parser results
* - :kbd:`Tab`
2021-01-24 22:35:14 +00:00
- In the log/text views, focus on the configuration panel for editing
filters and examining the list of loaded files. In the SQL result view,
cycle through columns to display as bar graphs
* - :kbd:`Ctrl` + :kbd:`l`
2014-11-11 16:44:44 +00:00
- Switch to lo-fi mode. The displayed log lines will be dumped to the
terminal without any decorations so they can be copied easily.
* - :kbd:`Ctrl` + :kbd:`w`
- Toggle word-wrap.
* - :kbd:`Ctrl` + :kbd:`p`
- Show/hide the data preview panel that may be opened when entering
commands or SQL queries.
* - :kbd:`Ctrl` + :kbd:`f`
- Toggle the enabled/disabled state of all filters in the current view.
* - :kbd:`x`
- Toggle the hiding of log message fields. The hidden fields will be
replaced with three bullets and highlighted in yellow.
* - :kbd:`=`
- Pause/unpause loading of new file data.
2013-07-26 15:23:45 +00:00
Session
-------
.. list-table::
:header-rows: 1
:widths: 5 20
* - Keypress
- Command
* - :kbd:`Ctrl` + :kbd:`R`
- Reset the current :ref:`session<sessions>` state.
Query Prompts
-------------
2013-07-26 15:23:45 +00:00
.. list-table::
:header-rows: 1
:widths: 5 20
* - Keypress
- Command
* - :kbd:`/`
- Search for lines matching a regular expression
* - :kbd:`;`
- Open the :ref:`sql-ext` to execute SQL statements/queries
* - :kbd:`:`
2014-03-28 13:55:24 +00:00
- Execute an internal command, see :ref:`commands` for more information
* - :kbd:`\|`
- Execute an lnav script located in a format directory
* - :kbd:`Ctrl` + :kbd:`]`
- Abort the prompt
2020-05-13 16:38:41 +00:00
Customizing
-----------
2020-09-14 06:03:23 +00:00
You can customize the behavior of hotkeys by defining your own keymaps.
Consult the :ref:`Keymaps<keymaps>` configuration section for more information.