1.\" $NetBSD: editrc.5,v 1.29 2014/12/25 13:39:41 wiz Exp $ |
2.\" 3.\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This file was contributed to The NetBSD Foundation by Luke Mewburn. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.\" |
29.\" $FreeBSD: head/lib/libedit/editrc.5 276881 2015-01-09 07:40:56Z bapt $ |
30.\" |
31.Dd December 25, 2014 |
32.Dt EDITRC 5 33.Os 34.Sh NAME 35.Nm editrc 36.Nd configuration file for editline library 37.Sh SYNOPSIS 38.Nm 39.Sh DESCRIPTION 40The 41.Nm 42file defines various settings to be used by the 43.Xr editline 3 44library. 45.Pp 46The format of each line is: |
47.Pp |
48.Dl [prog:]command [arg ...] 49.Pp |
50.Ar command 51is one of the 52.Xr editline 3 53builtin commands. 54Refer to 55.Sx BUILTIN COMMANDS 56for more information. 57.Pp --- 43 unchanged lines hidden (view full) --- 101If 102.Ar key command 103is supplied, bind 104.Ar command 105to 106.Ar key . 107Options include: 108.Bl -tag -width 4n |
109.It Fl a 110List or change key bindings in the 111.Xr vi 1 112mode alternate (command mode) key map. |
113.It Fl e 114Bind all keys to the standard GNU Emacs-like bindings. |
115.It Fl k 116.Ar key 117is interpreted as a symbolic arrow key name, which may be one of 118.Sq up , 119.Sq down , 120.Sq left 121or 122.Sq right . --- 5 unchanged lines hidden (view full) --- 128.Ar command 129is taken as a literal string and treated as terminal input when 130.Ar key 131is typed. 132Bound keys in 133.Ar command 134are themselves reinterpreted, and this continues for ten levels of 135interpretation. |
136.It Fl v 137Bind all keys to the standard 138.Xr vi 1 Ns -like 139bindings. |
140.El 141.Pp 142.Ar command 143may be one of the commands documented in 144.Sx "EDITOR COMMANDS" 145below, or another key. 146.Pp 147.Ar key 148and 149.Ar command 150can contain control characters of the form 151.Sm off 152.Sq No ^ Ar character 153.Sm on |
154.Po 155e.g.\& 156.Sq ^A 157.Pc , |
158and the following backslashed escape sequences: 159.Pp 160.Bl -tag -compact -offset indent -width 4n 161.It Ic \ea 162Bell 163.It Ic \eb 164Backspace 165.It Ic \ee --- 18 unchanged lines hidden (view full) --- 184.Sq \e 185nullifies the special meaning of the following character, 186if it has any, notably 187.Sq \e 188and 189.Sq ^ . 190.It Ic echotc Oo Fl sv Oc Ar arg Ar ... 191Exercise terminal capabilities given in |
192.Ar arg ... . |
193If 194.Ar arg 195is 196.Sq baud , 197.Sq cols , 198.Sq lines , 199.Sq rows , |
200.Sq meta , 201or |
202.Sq tabs , 203the value of that capability is printed, with 204.Dq yes 205or 206.Dq no 207indicating that the terminal does or does not have that capability. 208.Pp 209.Fl s 210returns an empty string for non-existent capabilities, rather than 211causing an error. 212.Fl v 213causes messages to be verbose. |
214.It Ic edit Op Li on | Li off |
215Enable or disable the 216.Nm editline 217functionality in a program. 218.It Ic history Ar list | Ar size Dv n | Ar unique Dv n 219The 220.Ar list 221command lists all entries in the history. 222The --- 5 unchanged lines hidden (view full) --- 228.Ar unique 229command controls if history should keep duplicate entries. 230If 231.Dv n 232is non zero, only keep unique history entries. 233If 234.Dv n 235is zero, then keep all entries (the default). |
236.It Ic settc Ar cap Ar val 237Set the terminal capability 238.Ar cap 239to 240.Ar val , 241as defined in 242.Xr termcap 5 . 243No sanity checking is done. --- 14 unchanged lines hidden (view full) --- 258or 259.Sq execute 260set of tty modes respectively; defaulting to 261.Fl x . 262.Pp 263Without other arguments, 264.Ic setty 265lists the modes in the chosen set which are fixed on |
266.Po 267.Sq +mode 268.Pc |
269or off |
270.Po 271.Sq -mode 272.Pc . |
273.Fl a 274lists all tty modes in the chosen set regardless of the setting. 275With 276.Ar +mode , 277.Ar -mode 278or 279.Ar mode , 280fixes --- 5 unchanged lines hidden (view full) --- 286.Ic Setty 287can also be used to set tty characters to particular values using 288.Ar char=value . 289If 290.Ar value 291is empty 292then the character is set to 293.Dv _POSIX_VDISABLE . |
294.It Ic telltc 295List the values of all the terminal capabilities (see 296.Xr termcap 5 ) . |
297.El 298.Sh EDITOR COMMANDS 299The following editor commands are available for use in key bindings: 300.\" Section automatically generated with makelist 301.Bl -tag -width 4n 302.It Ic vi-paste-next 303Vi paste previous deletion to the right of the cursor. 304.It Ic vi-paste-prev 305Vi paste previous deletion to the left of the cursor. |
306.It Ic vi-prev-big-word |
307Vi move to the previous space delimited word. 308.It Ic vi-prev-word 309Vi move to the previous word. |
310.It Ic vi-next-big-word |
311Vi move to the next space delimited word. 312.It Ic vi-next-word 313Vi move to the next word. 314.It Ic vi-change-case 315Vi change case of character under the cursor and advance one character. 316.It Ic vi-change-meta 317Vi change prefix command. 318.It Ic vi-insert-at-bol --- 11 unchanged lines hidden (view full) --- 330.It Ic vi-insert 331Vi enter insert mode. 332.It Ic vi-add 333Vi enter insert mode after the cursor. 334.It Ic vi-add-at-eol 335Vi enter insert mode at end of line. 336.It Ic vi-delete-meta 337Vi delete prefix command. |
338.It Ic vi-end-big-word |
339Vi move to the end of the current space delimited word. |
340.It Ic vi-end-word |
341Vi move to the end of the current word. 342.It Ic vi-undo 343Vi undo last change. 344.It Ic vi-command-mode 345Vi enter command mode (use alternative key bindings). 346.It Ic vi-zero 347Vi move to the beginning of line. 348.It Ic vi-delete-prev-char --- 17 unchanged lines hidden (view full) --- 366.It Ic vi-to-next-char 367Vi move up to the character specified next. 368.It Ic vi-to-prev-char 369Vi move up to the character specified previous. 370.It Ic vi-repeat-next-char 371Vi repeat current character search in the same search direction. 372.It Ic vi-repeat-prev-char 373Vi repeat current character search in the opposite search direction. |
374.It Ic vi-match 375Vi go to matching () {} or []. 376.It Ic vi-undo-line 377Vi undo all changes to line. 378.It Ic vi-to-column 379Vi go to specified column. 380.It Ic vi-yank-end 381Vi yank to end of line. 382.It Ic vi-yank 383Vi yank. 384.It Ic vi-comment-out 385Vi comment out current command. 386.It Ic vi-alias 387Vi include shell alias. 388.It Ic vi-to-history-line 389Vi go to specified history file line.. 390.It Ic vi-histedit 391Vi edit history line with vi. 392.It Ic vi-history-word 393Vi append word from previous input line. 394.It Ic vi-redo 395Vi redo last non-motion command. |
396.It Ic em-delete-or-list 397Delete character under cursor or list completions if at end of line. 398.It Ic em-delete-next-word 399Cut from cursor to end of current word. 400.It Ic em-yank 401Paste cut buffer at cursor position. 402.It Ic em-kill-line 403Cut the entire line and save in cut buffer. --- 123 unchanged lines hidden --- |