summaryrefslogtreecommitdiffstats
path: root/usr.bin/more/less.morerc
blob: 95fb9054cf0539cac1861567a7075872f4175359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# This sample .morerc causes more to emulate the default GNU less(1)
# keys, in so far as more(1) is capable (which is not very far at the
# moment).
#
# Some of this will/should/may be eventually merged into default.morerc.
#
# $FreeBSD$
#

# magic value indicating we should use ${sc_height}
set window 2424989898

macro 0 H	'help'
set com_getscr	'condition (${number} == 0);             \
              	   condition (${window} == 2424989898);  \
              	      set scr_scroll ${sc_height};       \
              	   condition_toggle;                     \
               	      set scr_scroll ${window};          \
              	 condition (${number} != 0);             \
              	   set scr_scroll ${number};             \
               	 condition true;'
macro 0 ""	'eval ${com_getscr}; forw ${scr_scroll};'
macro 0 z	'condition (${number} == 0);                \
         	   eval ${com_getscr}; forw ${scr_scroll};  \
         	 condition (${number} != 0);                \
          	   set window ${number}; forw ${number};    \
         	 condition true;'
macro 0 w	'condition (${number} == 0);                \
         	   eval ${com_getscr}; back ${scr_scroll};  \
         	 condition (${number} != 0);                \
          	   set window ${number}; back ${number};    \
          	 condition true;'
macro 0 "\ev"	'eval ${com_getscr}; back ${scr_scroll};'
macro 1 ""	'forw_scroll ${number};'
macro 1 e	'forw_scroll ${number};'
macro 1 ""	'forw_scroll ${number};'
macro 1 y	'back_scroll ${number};'
macro 1 ""	'back_scroll ${number};'
macro 1 ""	'back_scroll ${number};'
macro 1 ""	'back_scroll ${number};'
macro 8 \e)	'rscroll ${number};'
macro 8 \e[C	'rscroll ${number};'
macro 8 \e(	'lscroll ${number};'
macro 8 \e[D	'lscroll ${number};'
macro 1 "<"	'goline ${number};'
macro 1 "\e<"	'goline ${number};
macro 0 ">"	'condition (${number} == 0); goend;             \
           	 condition (${number} != 0); goline ${number};  \
           	 condition true;'
macro 0 "\e>"	'condition (${number} == 0); goend;             \
         	 condition (${number} != 0); goline ${number};  \
         	 condition true;'
macro 0 ""	'gomark ?;'
macro 0 ""	'askfile;'
macro 0 :f	'stat (${_stat_n} + 1);'
macro 0 V	'error "Less is not being run!"
macro 0 Q	'quit;'
macro 0 :Q	'quit;'
# It might be possible to match the brace/bracket-pairing feature of
# less using some complex regexps...  Project for a rain weekend...  :-)
OpenPOWER on IntegriCloud