Home Explore Blog CI



man-pages

18th chunk of `less.man`
3e9b6ebd614e1dac244b68f72cd270886781626c55858d2c0000000100000fcc
      ^RIGHTARROW [ ESC‐w or ESC‐RIGHTARROW ]
              (That is, CONTROL and RIGHTARROW simultaneously.)  Move the cursor one word to the right.

       HOME [ ESC‐0 ]
              Move the cursor to the beginning of the line.

       END [ ESC‐$ ]
              Move the cursor to the end of the line.

       BACKSPACE
              Delete the character to the left of the cursor, or cancel the command if the command line is empty.

       DELETE or [ ESC‐x ]
              Delete the character under the cursor.

       ^BACKSPACE [ ESC‐BACKSPACE ]
              (That is, CONTROL and BACKSPACE simultaneously.)  Delete the word to the left of the cursor.

       ^DELETE [ ESC‐X or ESC‐DELETE ]
              (That is, CONTROL and DELETE simultaneously.)  Delete the word under the cursor.

       UPARROW [ ESC‐k ]
              Retrieve the previous command line.  If you first enter some text and then press UPARROW, it will retrieve the previous command which begins with that text.

       DOWNARROW [ ESC‐j ]
              Retrieve the next command line.  If you first enter some text and then press DOWNARROW, it will retrieve the next command which begins with that text.

       TAB    Complete the partial filename to the left of the cursor.  If it matches more than one filename, the first match is entered into the command line.  Repeated TABs will cycle thru the other matching filenames.  If
              the completed filename is a directory, a "/" is appended to the filename.  (On MS‐DOS systems, a "\" is appended.)  The environment variable LESSSEPARATOR can be used to specify a different character to  append
              to a directory name.

       BACKTAB [ ESC‐TAB ]
              Like, TAB, but cycles in the reverse direction thru the matching filenames.

       ^L     Complete the partial filename to the left of the cursor.  If it matches more than one filename, all matches are entered into the command line (if they fit).

       ^U (Unix and OS/2) or ESC (MS‐DOS)
              Delete the entire command line, or cancel the command if the command line is empty.  If you have changed your line‐kill character in Unix to something other than ^U, that character is used instead of ^U.

       ^G     Delete the entire command line and return to the main prompt.

KEY BINDINGS
       You  may  define  your own less commands by creating a lesskey source file.  This file specifies a set of command keys and an action associated with each key.  You may also change the line‐editing keys (see LINE EDIT‐
       ING), and to set environment variables.  If the environment variable LESSKEYIN is set, less uses that as the name of the lesskey source file.  Otherwise, less looks in a standard place for the lesskey source file:  On
       Unix  systems,  less looks for a lesskey file called "$XDG_CONFIG_HOME/lesskey" or "$HOME/.lesskey".  On MS‐DOS and Windows systems, less looks for a lesskey file called "$HOME/_lesskey", and if it is not found there,
       then looks for a lesskey file called "_lesskey" in any directory specified in the PATH environment variable.  On OS/2 systems, less looks for a lesskey file called "$HOME/lesskey.ini", and if it  is  not  found,  then
       looks  for  a  lesskey file called "lesskey.ini" in any directory specified in the INIT environment variable, and if it not found there, then looks for a lesskey file called "lesskey.ini" in any directory specified in
       the PATH environment variable.  See the lesskey manual page for more details.

       A system‐wide lesskey source file may also be set up to provide key bindings.  If a key is defined in both a local lesskey file and in the system‐wide file, key bindings in the local file take precedence over those in
       the system‐wide file.  If the environment variable LESSKEYIN_SYSTEM is set, less uses that as the name of the system‐wide lesskey file.  Otherwise, less looks in a standard place for the system‐wide lesskey  file:  On
       Unix systems,

Title: Less: More Line Editing Commands and Key Bindings
Summary
This section continues the description of line editing commands in `less`, detailing how to move the cursor by words (Ctrl+Left/Right Arrow), to the beginning/end of the line (Home/End), delete characters or words (Backspace, Delete, Ctrl+Backspace, Ctrl+Delete), retrieve previous/next command lines (Up/Down Arrow), and complete filenames (Tab, Backtab, Ctrl+L). It also covers commands to delete the entire command line (Ctrl+U/Esc, Ctrl+G). Finally, the section explains how to define custom commands by creating a lesskey source file, specifying the locations where `less` searches for these files, and detailing the precedence of local vs. system-wide key bindings.